usb driver problem

Thomas McGrath III mcgrath3 at mac.com
Sun Jan 23 10:49:34 EST 2011


xfratboy,

One thing, in the past on the mac I had problems using a regular serial adapter but once I switched to a Keyspan high speed serial adapter everything worked fine and the driver for that was a standard driver that worked for FTDI devices. But that was a few years ago so things may be different.

Now as to FTDI, the Arduino Uno no longer uses the FTDI chip and instead uses the Atmega8U2 USB chip. So no driver is needed or used on the Mac side but one is supplied for the older boards that use the FTDI chip. I tried installing it anyway with no luck as I suspected it wouldn't.

The Atmega8U2 shows up in Networks as a real modem and as such does not show up in LC using the devicenames just like the internal modem does not show up. Mark has a bit of shell code that gets the address for the Arduino Uno and provides it to LC. This is what Claudi and I are using to get the port.

This does not rule out that something may have changed in either later versions of OSX or in later versions of LC as well.

I now understand (what I suspected) that both the PC and the Arduino Uno have a buffer waiting to be filled up and dumped. 

The Arduino fills up the buffer and then 'requests' to send it out ---- what command is sent? what should be listened for in LC?
The LC listens and 'gets' the data --- what command is sent to get the data? 

If no timer is entered then is there a default? anyway? 


We may need to register the USB (non-FTDI) in the plist you mention since it doesn't show up in driverNames if only for LC to 'see' it like it sees the FTDI chip (as in Marks Make Board example).

Hmmmm, I may contact you on that. Thanks.


-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net

On Jan 23, 2011, at 10:18 AM, xfratboy wrote:

> 
> I'm coming into this conversation a bit late, but I've been wrestling with
> USB/Serial communication in OSX for a several weeks now with no success.  I
> doubt if this makes you feel any better.  I'm working with an FTDI chipset
> (FT232R).  Communicating through this usb-to-serial-converter works
> perfectly in Windows .. If I take that same stack to OSX, it fails
> miserably.  It's like my code gets stuck in a sticky goo of zeros and ones. 
> Something that has been helpful for my understanding was this info provided
> by FTDI support:
> 
> ----------
> This may not be an issue with the serial settings. Understand that there’s a
> huge fundamental difference between USB and the old RS232 style interface.
> In the good old days, things were set up so that everything was character
> based – you send a single character, you receive a single character, and
> life was good. With USB, you send a single character, and…. Nothing happens
> until one of several conditions are met:
> 1.)	You fill up a buffer – when the buffer is full, USB automatically
> transmits out the data block (not just a single character)
> 2.)	Your product requests the buffer be sent (even if it’s not “full”)
> 3.)	The latency timer goes off, and says to send whatever is in the buffer,
> even if it’s not full (this could be a source of your lag/latency)
> 
> In order to address this, see  section 3.4 and 3.5 page 6 of TN105:
> http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_105%20Adding%20Support%20for%20New%20FTDI%20Devices%20to%20Mac%20Driver.pdf 
> 
> Also, keep this in mind when you are writing your application – in visual
> basic (for example), you could send out one character at a time, or a string
> of characters and with RS232 it wouldn’t make any difference. With USB,
> you’d want to send out a string long enough to fill the buffer length so
> that USB would send it off instead of waiting for the latency timer to trip.
> ------
> 
> So.... this still doesn't solve my problem with hang-ups and lags, but it
> did give me a place to start.  Basically, I have started poking around
> inside the FTDIUSBSerialDriver.kext file found in
> /System/Library/Extensions/ folder.  If your device is not showing up with
> the "DriverNames" function then it's probably not in the FTDI driver's
> 'info.plist' file.  In which case, you would have to create a new entry in
> the info.plist file for your specific device.  That's a whole-nutha-level of
> trial and error which I'm staring to figure out a little bit. Feel free to
> contact me off topic if you are interested in how to do this or maybe we can
> start another thread.
> 
> 
> 
> -- 
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/usb-driver-problem-tp3219220p3232620.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list