Serial latency

This is a follow up of this post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1290819331/0 (and the related blog post here: Arduino Serial latency)

I was curious about the serial latency from a Processing Sketch to the Arduino and back, the best result was 20ms (tested with uno or duemillanove). However, Peter Stoffregen made some performance tests which are ALOT faster. After some more thinking and experimenting I guess I found the bottleneck: its the JNI interface of the rxtx library.

So If I want to reduce the latency I need another interface. One option would be a UDP Server which forwards the data to the serial port. This code should use a language which has fast access to the serial port... I guess I'm not the first with such a request, but I couldn't find such a project...

So my question is, do YOU know a UDP-to-Serial tool?

cheers
michu

message to myself, check the playground: Arduino Playground - SerialNet

I work on the Win32 platform, so it might not be all that relevant to you, but the latency problem exist here as well.
But as far as I can surmise, it's caused by the shitty FTDI USB driver, not the hardware itself.
It seems the chip is sending data, but the driver doesn't deliver due to it's unbelievably stupid design.
Using POLLING instead if interrupt, can you believe it, in this day and age.

My project is a drum pad thing, so I need IMMEDIATE response when I hit a pad.
Can you imagine playing a drum set that sounds > 10 ms after you hit the skin?
It can drive you nuts, the brain goes into short circuit.

So far, I figured I'd get a proper MIDI interface for my PC, so I can be free of the shitty FTDI driver
and get a properly designed driver instead. Roland (and others) make some good stuff, and adding
DIN connectors and an optocoupler to my hw would be straight forward. It's just such a damned shame
that it seems impossible to use the USB which is already there, and SHOULD be able to handle it with ease.
I've even tried to get FTDI to send me the relevant docs so I could write a new device driver myself,
but so far it's been like shouting into a black hole. The selfrighteous prigs won't listen.

Sorry I don't have a UDP/Serial solution for you ..
If you've stumbled across any info that could help me solve my problem
I'd love it if you could post a heads-up or a pointer here.

Interesting to see that the UNO seems to perform better.
All other things being equal, that would indicate it's a hardware problem after all.
Have you seen any tests pertaining to Win32?

WBR // L.

Actually, the problem is just that the default setting on the FTDI driver is for 16ms latency. In Win32, you can tune it down to 1ms. I wrote an article on my blog on how to do that:

Reducing Arduino/FTDI FT232R Serial Latency: Reducing Arduino/FTDI FT232R Serial Latency – Lincomatic's DIY Blog