[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: serial issue

From: Dirk van Oosterbosch   dirkixopusada.com
Date: Wed, 2 May 2007 02:19:58 -0700


On 2-mei-2007, at 1:38, Nell Tenhaaf wrote:

we are using a usb to serial adapter (brand pololu USB01A) that we found a generic driver for (there is no mac driver as yet). but the driver we were advised to use is not accompanied by any kind of interface on the mac to address the adapter, and find out its port info. so we can't set up the serial object in max/msp to match it and communicate through it. has anyone had any experience with such an adapter?

I might.
(I had a similar issue, not with max/msp and with a bit more-standard brand. I'll share my experience nonetheless, maybe it's useful). I hope you're a bit familiar with your terminal (Terminal.app), since that's where the action is.

The first thing you should do is check your devices folder (/dev). `ls /dev`
There should be an extra file there (it's not really a file, it's a port actually) when the USB-serial device is connected to your mac. Since I worked with an adapter from Keyspan, my file was called tty.KeySerial001 or tty.KeySerial002. The name you're looking for should probably start with 'tty.' and have something with USB, USA or the brand name in it.
So check `ls /dev/tty.*` without the device attached and then again with the device attached. You should see that file appearing. (Sometimes they can be multiple files, with a incrementing number in them, xxx001, xxx002, xxx003 )

Now you know the name of the port that the USB-Serial Adapter gives you, you might be able to use this name in your software to connect to it. But changes are you cannot. In that case you could to make a link (a symlink, symbolic link) from this device-port to the standard serial device port on a POSIX system, 'ttyS0'.
`sudo ln -s /dev/tty.MYDEVICE /dev/ttyS0` , where tty.MYDEVICE is the name of the port you just found.


If this solves your problem and you have to do this `ls`+`ln -s` over and over and become tired of the name of the tty.device changing every time, I have a little shell script I could send you to help.

HTH,
dirk





-----------------------------
Dirk van Oosterbosch
de Wittenstraat 225
1052 AT Amsterdam
the Netherlands
labs.ixopusada.com
-----------------------------