User(s) browsing this thread: 1 Guest(s)
|
Driver for USB->RS232
|
|
10-07-2009, 03:24 PM
(This post was last modified: 10-07-2009 03:25 PM by anilsen.)
|
|||
|
|||
|
Driver for USB->RS232
Hi.
I have a 4x2 HDMI matrix with RS232 interface and I want to control this from my popcornhour box. I want to connect a STLAB USB RS232 adapter to my popcorn box USB port and RS232 to the matrix. Through my own application on the PopcornHour I want to control the matrix. When I connect the adapter to the PH unit and type dmesg I get a entry in log: usb 2-1: new full speed USB device using tangox-ohci-hcd and address 2 (I can also see in the /dev/ directory : usbdev1.1 usbdev2.1 usbdev2.2.) How do I access the serial port from my "C" application ? Do I need to install a driver. On the driver cd, there are some file call pl2303.c. I did not manage to compile this. Get a lot of errors I am not a linux expert, so is there anyone that can point me in to the right direction. André |
|||
|
10-07-2009, 08:08 PM
(This post was last modified: 10-07-2009 08:35 PM by bdb.)
|
|||
|
|||
RE: Driver for USB->RS232
(10-07-2009 03:24 PM)anilsen Wrote: Do I need to install a driver. On the driver cd, there are some file call pl2303.c.You will need a driver ... here is one I compiled earlier. (also includes a driver for the ftdi equivalent, an ati rf remote, and a 'garmin_gps' driver - whatever that may be) for the pl2303, run Code: insmod usbserial.koyou should not see any error messages; to check it is installed correctly, run Code: dmsgCode: usbserial: No versions for exported symbols. Tainting kernel.Plug the pl2303, run dmesg again, you should see something like: Code: usb 1-2: USB disconnect, address 2I've never tried to use it, it looks like you should now be able to use /dev/ttyUSB0 as a conventional serial port. bdb (10-07-2009 08:08 PM)bdb Wrote: I've never tried to use it, it looks like you should now be able to use /dev/ttyUSB0 as a conventional serial port.just tried it; seems to work ok to setup the serial port parameters, use stty, e.g. Code: stty -F /dev/ttyUSB0 cs8 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtsctsbdb |
|||
1 user says Thank You to bdb for this post |
|
10-08-2009, 06:57 PM
(This post was last modified: 10-08-2009 06:58 PM by anilsen.)
|
|||
|
|||
RE: Driver for USB->RS232
![]() :)Thank you bdbI have test your describtion, but I can not get it to work. When I run command: stty -F /dev/ttyUSB0 cs8 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts The program newer return to the console. I also tried to write my own application and my program hangs when command is excuted: tcsetattr(fd, TCSANOW, &tio); Here is the dump from dmesg: usbserial: No versions for exported symbols. Tainting kernel. usbcore: registered new driver usbserial drivers/usb/serial/usb-serial.c: USB Serial Driver core drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303 usbcore: registered new driver pl2303 drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver usb 2-1: new full speed USB device using tangox-ohci-hcd and address 2 drivers/usb/serial/usb-serial.c: descriptor matches drivers/usb/serial/usb-serial.c: found interrupt in on endpoint 0 drivers/usb/serial/usb-serial.c: found bulk out on endpoint 1 drivers/usb/serial/usb-serial.c: found bulk in on endpoint 2 pl2303 2-1:1.0: pl2303 converter detected drivers/usb/serial/usb-serial.c: get_free_serial 1 drivers/usb/serial/usb-serial.c: get_free_serial - minor base = 0 drivers/usb/serial/usb-serial.c: usb_serial_probe - setting up 1 port structures for this device drivers/usb/serial/usb-serial.c: usb_serial_probe - registering ttyUSB0 usb 2-1: pl2303 converter now attached to ttyUSB0 drivers/usb/serial/usb-serial.c: serial_open drivers/usb/serial/usb-serial.c: serial_ioctl - port 0, cmd 0x540d drivers/usb/serial/usb-serial.c: serial_ioctl - port 0, cmd 0x5407 drivers/usb/serial/usb-serial.c: serial_ioctl - port 0, cmd 0x540e drivers/usb/serial/usb-serial.c: serial_set_termios - port 0 drivers/usb/serial/usb-serial.c: serial_open drivers/usb/serial/usb-serial.c: serial_ioctl - port 0, cmd 0x540d drivers/usb/serial/usb-serial.c: serial_ioctl - port 0, cmd 0x5407 drivers/usb/serial/usb-serial.c: serial_ioctl - port 0, cmd 0x540e Do you have any tips of have to solve it. ASN |
|||
|
« Next Oldest | Next Newest »
|

Twitter
Facebook
NMT Wiki
Search
Member List
Help
A-400 [13 May 2013]




![[+]](images/collapse_collapsed.gif)

