Page 1 of 1
USB Communications?
Posted: Thu Jan 10, 2008 8:52 pm
by drbob001
I was digging through the documentation, trying to determine if there's a way to communicate via the USB interface under OS X -- I'd like to put a USB<->Serial adapter on my machine and read/control external hardware via a serial interface...
Any pointers would be helpful and appreciated.
Posted: Fri Jan 11, 2008 5:56 pm
by n.allan
You don't have to communicate via usb.
When you have installed your usb to serial adapter it will show up as a com port thus you can read and write from/to it via:
open driver "COMx:" for read --x being the number of the com port eg.
open file "COM2:" for update as binary --etc...
read from file/driver "COM1:" for 1char --etc
This is the case on win32 platform, I'm sure it will be similar on the MAC platform.
remember to close it after use..just like a file.
close file "COM1:"
Cool beans...
Posted: Fri Jan 11, 2008 6:41 pm
by drbob001
I was looking at the conversation regarding serial communications, just wasn't sure if this would apply to a USB-based item or not. I wonder if there is a way to 'talk' to/from the USB interface in other ways -- granted, most items will mount as a drive, or be seen as a com device, but does that concept apply to everything (pretty much) that plugs into a USB interface -- like a printer?
Posted: Fri Jan 11, 2008 8:30 pm
by BvG
Rev has currently no build in way to access usb interfaces. So it has to rely on other means to get at them (like your examples as hd's, serial ports or mouses). The problem is that most appliances that use usb do not have a standard interface, so you'd need to access interfaces that are different not only between manufacturers, but even between driver versions for the same device. If you do know the interface, you could make an external which talks to the driver (or hire a c programmer to create it), but I'm sure that this is not what you want.
Posted: Fri Jul 25, 2008 10:25 pm
by Nonsanity
Has anyone attempted communicating with a serial (RS232) port via a USB adapter on a Mac in Revolution? This is something I've been meaning to look into for controlling an X10 interface via my own home automation software.
I did this once years ago with an old Mac SE/30 and Hypercard. It controlled the lights and temperature of the house just fine. I could probably even revive it, but I'd rather make something new on a modern, RS232 port-deprived Mac.
I know it is possible, but was looking to see if anyone has already done it and can save me some trouble along the way.
Posted: Sun Dec 07, 2008 3:27 am
by mwieder
Coming in late to this discussion, but there's a thread about this at
http://forums.runrev.com/phpBB2/viewtopic.php?p=10896 . There's USB devices and USB devices. And then there's USB devices. Most of them, as mentioned above, will register themselves as serial devices. Under OSX you can usually check for cusbmodem. I've had success using the Make board to control the outside world and others have used the Arduino board.
If you're looking at x10 control, it will probably depend on the x10 device you select. I had an old one that rev couldn't control because it relied on switching the DSR and RTS serial port lines to get four bits of data. Rev's serial port control resets the port before setting the new value, so it wouldn't work out. Fortunately that controller got obsoleted and replaced by a spiffy newer one that didn't rely on anything so arcane.
Posted: Thu Jun 25, 2009 9:16 am
by Moskito67
A french Site where you can learn how to communicate with Usb / Serials.
http://www.1ou2clics.fr, on Mac and PC
Remote Control using IP Network
Un site français avec des solutions pour apprendre à créer et gérer des interfaces fonctionnant sur port Usb (orientation domotique), sur Mac et PC.
Avec la possibilité de tout contrôler et superviser à distance, via internet