Re: How to access USB port on Mac
There's an amazing Unix tool called netcat (or nc or nc6) that (besides many other things) supports access to a USB port through a TCP/IP stream.
Here's a script that I have used to set it up, in Terminal, but it's been a while since I used it so I'm not sure of all the details. Diedrich Wolter provided the germ of this idea long ago on the MCL list. It basically creates a bidirectional pipe between a TCP/IP stream and a Unix device. I've only used it with MCL, but I don't see any reason it wouldn't work with LispWorks.
#!/bin/sh
tcpipport=$1
usbport=$2
while nc -l -n -p $tcpipport -vv \
>$usbport <$usbport | tee serial.out; do echo -----; done
The script takes two args, the TCP/IP port (e.g., 5678) you want to communicate through and the USB port that you're using (e.g., "/dev/cu.usbmodem0B19" has worked for me, but look in "ls /dev/cu.*" for the one that appears on your system). The "tee" command is for debugging, so you can see what's going on, but is not necessary.
On Oct 24, 2007, at 4:02 AM, Mitch Berkson wrote:
Is there a way to access a USB port on a Mac in LW?
I can do this on a PC using an emulated serial port and the LW serial port
functions, but they are Windows-only.
Mitch