• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Write to USB Port from Shell (DreamPlug)  (Read 1638 times)
rac
Newbie
*

Karma: 0
Posts: 5


View Profile
« on: August 22, 2011, 02:00:30 PM »

Can someone tell me how to do this please?

I have tried things such as

echo -ne "0466\r" > /dev/tty0

with no apparent result.

When I plug in the device that I want to talk to, lsusb shows it as Bus 001 Device 005. I tried /dev/bus/001/005 (or something like that), but not luck with that either.

I need help to the syntax right and to target the appropriate /dev I think.

Thanks.
Logged

rac
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #1 on: August 22, 2011, 06:44:00 PM »

A minor correction. The Bus/Device /devI that I tested was probably, /dev/bus/USB/001/005. It was certainly a valid path, found in the shell using ls.

The device that I want to talk to is an X10 home automation controller. When I plug it in, the shell shows a response listing the correct device name and Bus 001, Device 005.

If I get this working, the aim is to connect to the DreamPlug using iSSH on my iPad and use it to turn lights, on or off at home, eventually via the Internet.
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #2 on: August 23, 2011, 04:40:14 PM »

To talk to a USB device you probably need to talk using the USB protocol (see libusb for details).
I've never come across anything that lets you treat it as a simple character-based device.
Logged

rac
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #3 on: August 23, 2011, 11:22:34 PM »

To talk to a USB device you probably need to talk using the USB protocol (see libusb for details).
I've never come across anything that lets you treat it as a simple character-based device.

I was only attempting to do it by sending text to the device because I have seen that seem indicate that it should work. I have certainly had no success so far.

If I use libusb, can I do this from the Linux Shell or do I have develop an application? My experience with Linux it pretty well zero.
Logged

rac
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #4 on: August 24, 2011, 12:51:57 PM »

I was only attempting to do it by sending text to the device because I have seen that seem indicate that it should work. I have certainly had no success so far.

If I use libusb, can I do this from the Linux Shell or do I have develop an application? My experience with Linux it pretty well zero.

I have found a Perl wrapper for usblib. I haven't looked at it yet, but I was planning to write a Perl script anyway so that should be helpfull.
Logged

Pages: [1]
Print
Jump to: