[SOLVEDusb to serial not working when connecting via USB hub

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

[SOLVEDusb to serial not working when connecting via USB hub

Postby goluram » Sun Dec 30, 2012 8:35 pm

Hoping somebody can help me with the issue. I am trying to use my pogoplug to support RS232 connectivity to some routers. The USB to serial converter (http://www.amazon.com/gp/product/B0007T27H8/ref=oh_details_o00_s01_i00works fine when connected to one of the USB ports of the pogo but doesn't works when connected via a powered USB hub (http://www.amazon.com/gp/product/B0051PGX2I/ref=oh_details_o00_s01_i02)

lsusb output
$this->bbcode_second_pass_code('', 'Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 005: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 006: ID 8564:1000
Bus 001 Device 007: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 008: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 009: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub')

dmesg output
$this->bbcode_second_pass_code('', '
[root@pogo ~]# dmesg | grep -Pi 'usb|pl2303'
[ 20.450118] usbcore: registered new interface driver usbfs
[ 20.450215] usbcore: registered new interface driver hub
[ 20.450318] usbcore: registered new device driver usb
[ 20.838014] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 20.838152] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[ 20.880921] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[ 20.881539] hub 1-0:1.0: USB hub found
[ 20.882074] Initializing USB Mass Storage driver...
[ 20.882172] usbcore: registered new interface driver usb-storage
[ 20.882182] USB Mass Storage support registered.
[ 20.882265] usbcore: registered new interface driver libusual
[ 21.200934] usb 1-1: new high speed USB device number 2 using orion-ehci
[ 21.353012] hub 1-1:1.0: USB hub found
[ 21.631262] usb 1-1.1: new full speed USB device number 3 using orion-ehci
[ 21.821287] usb 1-1.2: new full speed USB device number 4 using orion-ehci
[ 21.896807] usbcore: registered new interface driver r8712u
[ 22.011293] usb 1-1.3: new high speed USB device number 5 using orion-ehci
[ 22.122031] hub 1-1.3:1.0: USB hub found
[ 22.201287] usb 1-1.4: new high speed USB device number 6 using orion-ehci
[ 22.434230] scsi0 : usb-storage 1-1.4:1.0
[ 22.511028] usb 1-1.3.3: new full speed USB device number 7 using orion-ehci
[ 22.701034] usb 1-1.3.4: new full speed USB device number 8 using orion-ehci
[ 22.891037] usb 1-1.3.7: new high speed USB device number 9 using orion-ehci
[ 23.002018] hub 1-1.3.7:1.0: USB hub found
[ 36.199018] usbcore: registered new interface driver usbserial
[ 36.200071] USB Serial support registered for generic
[ 36.201755] usbcore: registered new interface driver usbserial_generic
[ 36.201769] usbserial: USB Serial Driver core
[ 36.208990] USB Serial support registered for pl2303
[ 36.209078] pl2303 1-1.1:1.0: pl2303 converter detected
[ 36.212407] usb 1-1.1: pl2303 converter now attached to ttyUSB0
[ 36.212467] pl2303 1-1.2:1.0: pl2303 converter detected
[ 36.216356] usb 1-1.2: pl2303 converter now attached to ttyUSB1
[ 36.216422] pl2303 1-1.3.3:1.0: pl2303 converter detected
[ 36.227823] usb 1-1.3.3: pl2303 converter now attached to ttyUSB2
[ 36.227886] pl2303 1-1.3.4:1.0: pl2303 converter detected
[ 36.232425] usb 1-1.3.4: pl2303 converter now attached to ttyUSB3
[ 36.232528] usbcore: registered new interface driver pl2303
[ 36.232538] pl2303: Prolific PL2303 USB to serial adaptor driver
[root@pogo ~]# ')

$this->bbcode_second_pass_code('', 'uname -a
Linux pogo 3.1.10-15-ARCH #1 PREEMPT Wed Dec 12 15:25:18 UTC 2012 armv5tel GNU/
')

Thanks,
Gaurav
Last edited by goluram on Mon Dec 31, 2012 2:55 am, edited 1 time in total.
goluram
 
Posts: 4
Joined: Sun Dec 30, 2012 8:27 pm

Re: usb to serial not working when connecting via USB hub

Postby goluram » Mon Dec 31, 2012 2:54 am

Turned out to be a pin out issue with the DB9 connector I was using. With the right pin out, everything works as desired. Less than $100 to connect 8 devices, while a serial console server would have costed a lot more and not to mention the low power consumption!
goluram
 
Posts: 4
Joined: Sun Dec 30, 2012 8:27 pm

Re: [SOLVEDusb to serial not working when connecting via USB

Postby wxtofly » Thu Jan 03, 2013 1:17 am

Can you use this setup to have the pogo usb directly connected to a serial port on another computer that can act as a smart terminal for the pogo?

Where did you find the "proper" pinouts for the rs232 end?

TJ
wxtofly
wxtofly
 
Posts: 17
Joined: Mon Dec 24, 2012 3:27 am

Re: [SOLVEDusb to serial not working when connecting via USB

Postby goluram » Thu Jan 03, 2013 3:08 pm

Yes. It works fine for serial port to another computer. I have used it successfully on my PC running CentOS.

I got the pinout instructions from http://www.cisco.com/en/US/products/hw/routers/ps332/products_tech_note09186a0080094ce6.shtml

HTH
goluram
 
Posts: 4
Joined: Sun Dec 30, 2012 8:27 pm

Re: [SOLVEDusb to serial not working when connecting via USB

Postby wxtofly » Thu Jan 03, 2013 7:58 pm

Thanks for that!
Another quesiton though, does it require the crossover or the straight cable?
TJ
wxtofly
 
Posts: 17
Joined: Mon Dec 24, 2012 3:27 am

Re: [SOLVEDusb to serial not working when connecting via USB

Postby goluram » Thu Jan 03, 2013 9:13 pm

Not sure I understand what you mean by a crossover or straight cable. The setup that I use is:

1. USB port of the pogoplug has a USB to serial cable connected (http://www.amazon.com/TRENDnet-RS-232-S ... B0007T27H8)
2. The USB to serial adapter connects to a Cisco console cable (http://www.amazon.com/Cisco-Console-Cab ... 000GL3MOY/). This is a rollover cable.
3. The RJ45 end connects to a DB9 to RJ45 adapter.

I hope this helps. Let me know if you need to see some photos and I can attach them to the post here.
goluram
 
Posts: 4
Joined: Sun Dec 30, 2012 8:27 pm

Re: [SOLVEDusb to serial not working when connecting via USB

Postby karog » Thu Jan 03, 2013 10:12 pm

$this->bbcode_second_pass_quote('wxtofly', 'C')an you use this setup to have the pogo usb directly connected to a serial port on another computer that can act as a smart terminal for the pogo?

Where did you find the "proper" pinouts for the rs232 end?
wxtofly

To be clear, you want a serial connection between computer A and a pogo P. On computer A you want to use its RS232 serial port. On pogo P you want to use its USB port. And finally, you want computer A to act like a login terminal to pogo P.

Not sure why you would want to do this rather than ssh across a network unless for some reason they are not on the same network.

If this correct, yes you should be able to do that. Connecting those ports should provide you a serial connection which is a bidirectional data connection. On the pogo P you would have to run agetty to accept the login connection. Do
$this->bbcode_second_pass_code('', 'ps ax | grep agetty') to see the agetty's that are already running on tty ports. ttyS0 is the 4 pin header on the pogo motherboard. Also man agetty for more info. On computer A you need to run some sort of terminal program. That depends on what OS you are running. On linux or OS X you can run "screen". You probably can use "putty" on Windows.

As for straight vs xover, the standard serial port on a computer is male and so is the USB to serial cable so I would think you need a female to female xover called a null modem adapter.

As for pinouts, just google it. You will get plenty of info.
karog
 
Posts: 305
Joined: Thu Jan 05, 2012 7:55 pm

Re: [SOLVED serial terminal to usb on the plug.]

Postby wxtofly » Fri Jan 04, 2013 9:20 am

Great! Thanks! and yes "they are not on the same network."

I need to be able to talk to pogoplugs that are being installed in the field to do odd things, like time lapse photography and weather measurement. Getting connectivity set up without a network already established becomes a chiken and egg problem, especially when it is a wireless connection on a secure network. It is doable, but an enormous hassle for the people who are being gracious enough to let me piggyback on their networks. If I have a way to directly talk to the plug from the serial port of my 1986 laptop running msdos kermit as its terminal :) it will be a very good thing.
Once it is established, I can ssh from anywhere :-)

I will see about making sure that enough of the right kind of TTY's are up and running before I take them in the field. I see that is set in /etc/inittab
$this->bbcode_second_pass_code('', 's0:12345:respawn:/sbin/agetty -8 -s 115200 ttyS0 linux
c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
etc.
')
I'm guessing c1 is console 1. I've a few Null modem (rxd->txd txd->rxd) adapters around I think.

(I've fantasized about somhow putting the pogo board inside the old Nec laptop, but it's more than I can manage.)

The next project will actually be attempting to set up point to point wifi connections between pogoplugs using highly directional antennae. If that doesn't work I will have to get a battery powered pogo to dialup a phone network to send its data. That is rather daunting.

Thanks again.
TJ
wxtofly
 
Posts: 17
Joined: Mon Dec 24, 2012 3:27 am

Re: [SOLVEDusb to serial not working when connecting via USB

Postby wxtofly » Fri Jan 04, 2013 9:27 pm

Having some other hardware lying around, http://www.ebay.com/itm/RS232-USB-to-UART-TTL-Cable-module-PL2303-Converter-/250736677870?ssPageName=ADME:L:OC:US:3160 I tried going from a
pogoplug usb prolific ttl with crossover rxd txt to a ttl prolific usb to another pogoplug.
Which means each prolific should think it is talking to a ttl serial line, right?

It seems as if this "should work."
I added a line to inittab:
usb0:2345:respawn:/sbin/agetty -L -8 115200,57600,38400,19200 ttyUSB0 vt102
on one
and tried to screen /dev/ttyUSB0 115200 8,N,1 from the other but screen does not get any feedback and the dmesg is quite obscure.
$this->bbcode_second_pass_code('', '
[490338.780000] oxnas-ehci oxnas-ehci.0: reused qh ffc00400 schedule
[490338.780000] usb 1-1.3: link qh1-0601/ffc00400 start 0 [1/2 us]
[490355.040000] usb 1-1.3: unlink qh1-0601/ffc00400 start 0 [1/2 us]

ps xua shows:
root 1044 0.0 0.5 1744 672 ttyUSB0 Ss+ 13:00 0:00 /sbin/agetty -L -8 115200 57600 38400 19200 ttyUSB0 vt102
on the altered inittab receiving side.

and the device /dev/ttyUSB0 exists on both plugs
')
I'm having memories of blind half-duplex communications, but it isn't acting quite right for that. I should at least get the /etc/issue message, even if I can't see what I type.
Should it work? If so, what do I need to tweak?
TJ
wxtofly
 
Posts: 17
Joined: Mon Dec 24, 2012 3:27 am

Re: [SOLVEDusb to serial not working when connecting via USB

Postby karog » Fri Jan 04, 2013 9:38 pm

I would start by just trying to get serial to work between the two, not with agetty. You should be able to run screen on both plugs and when you type on one, you should see it on the other. Once you get that figured out, then you can add agetty.

You did not mention which pogos you have. Being on the V1/V2/V4 thread, I am assuming not a V3 for either one. I have found serial to not function well or at all on my P21 and B01 (V3's) but very well on my E02 (V2).

By using 2 USB to TTL's maybe you are having power problems. I know when I first hooked my PL2303 to the header on my pogos I tried connecting RX, TX, GND, and the 3.3V which did not work. I removed the 3.3V connection and I was good.

You are just going to have to play with various combinations to find what works.
karog
 
Posts: 305
Joined: Thu Jan 05, 2012 7:55 pm

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 8 guests