1
votes

I'm new to the C++ world but have strong knowledge in several languages (so i'm not THAT lost). I just received an usb missile launcher as a gift and wanted to control it via different platforms, including web. To do so, i was planning to use a "serial to socket" proxy i wrote in python (and then use socket after that...). I found an opensource driver for my device, but it does not appear as a tty resource (with ls /dev/tty.*). That way, i'm not able to read/write into it with the pyserial library i use in my python script. My question is about finding tutorial/howto on creating such tty resources and "wire" them to usb devices...

Hoping u'll understand :)

Thanks

1
we do understand. But we don't have any information. What device, what USB vendor/product id (lsusb), what driver (module/kernel?) what device nodes, what permissions, what python modules. Basically: we're not psychic. We don't even know what you are looking for when you say "it does not appear as a tty resource" (I'm assuming you meant stty and you are looking for a device node, but perhaps you are looking somewhere else entirely?)sehe
Probably that rocket launcher is a HID device, not a tty (serial) class device.fvu
"TTY" is an ancient serial device running at 110 bits/second and using a current loop interface. I'm guessing that's not what you actually have.Hot Licks
ok sorry guys ! @sehe : so about vendor/product id, the opensource kernel driver says that datas : 514/4400. About device nodes, permissions, i'm not really sure to know what it is... about the python module, i wrote it myself with pyserial and sockets. I use it as a bridge between my arduino board and some flash apps. It's very basic and generic. What i meant by "it doesn't appear as a tty resource is that a ls /dev/tty.* does not show my device.y_nk
@fvu : i'm not sure it is, since the driver does not seem to have specific code written in it. There's only a big .plist with some device idenfitiers insidey_nk

1 Answers

4
votes

on linux it is easy to access the usb ports directly using the libusb-dev package and tools. Of course commands etc... are vendor specific but there exist already libs for perl and python to control various usb missle launchers. E.g.:

http://code.google.com/p/pymissile/

https://metacpan.org/pod/Device::USB::MissileLauncher

Sorry that's not a solution but hopefully a good starting point ;-)