OSX Snow Leopard tty.usbserial difficulties

I am attempting to send data to my arduino via usb from python and/or java. On my ubuntu machine I had no trouble opening the port as a file and writing to it. Now on my Mac machine I am trying the same thing but when I try to open the port in python with

file = open('tty.usbserial-A600egTb','w')

python just sits there and fails to execute the command as though it were waiting for something. A similar thing happens if I try to route output from java programs to the port from command line.

I had to modify the permissions in Ubuntu, however I have tried this in OSX to no avail. Could it have something to do with the transfer speed rate? If so, how do I alter the baud rate coming from my computer?

Thanks

Have you considered using the pyserial module? It enables serial communications from python and provides an API for all the communications parameters. You can see it in use for a general serial port proxy for use with Arduino here:

http://bitlash.net/wiki/bitty.py

I haven’t tried raw file i/o to the usbserial devices but I’m impressed that it works at all…

Hope that helps,

-br
http://bitlash.net
http://entropymouse.com

most likely you need to use the full path so try

file = open('/dev/tty.usbserial-A600egTb','w');

most likely you need to use the full path so try

file = open('/dev/tty.usbserial-A600egTb','w');

yeah I've tried that, as well as making a symlink to that port and changing permissions on the symlink and that didn't work. A friend suggested activating the root account and switching to that user to run any python code, but I figured that would be the same as using sudo... have you gotten it working on a Mac machine??

Have you considered using the pyserial module?

Yes, and I found that it is not supported for macs?? works on Linux and Windows but I see no mac version. I downloaded the raw tar.gz but the readme provides no insight into where to put anything assuming it would even work... do you happen to know how that works????

Thanks for the replies!