scotteggshell
Posts: 3
Joined: Sun May 12, 2013 1:55 am

USB Serial Adaptor Issue

Sun May 12, 2013 2:10 am

Hi , I am working on a simple data logging program using USB - serial adaptors.

When I execute this

Code: Select all

cat /dev/ttyUSB0 > /tmp/file.log


I can type on a terminal on another machine connected by null modem and the data is written into. file.log as expected.

However...

If I Ctrl-C and stop (or kill from separate session)the process then restart (with the same command) the Pi waits and is fine until the 1st character is sent from the other machine. then it freezes solid...pwr cycle required.

It is occurring on both Wheezy and Arch distros. Exactly the same symptoms.

Maybe I am doing something wrong, I'm quite green.
also, my USB adaptors are a few years old..

If anyone has any experience with anything like this, I'd appreciate any advice or comments you may have.
Thanx

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: USB Serial Adaptor Issue

Sun May 12, 2013 9:10 am

Freezing solid would indicate that it was a driver problem. Anything in user-space would leave you able to use at least SSH.

See also: http://www.raspberrypi.org/phpBB3/viewt ... 89#p287289
If anything in the kernel is alive, that will be better than just cycling power.

scotteggshell
Posts: 3
Joined: Sun May 12, 2013 1:55 am

Re: USB Serial Adaptor Issue

Sun May 12, 2013 8:28 pm

Thanx for the shutdown procedure. I'll use that for sure.

After more research I see plenty of issues with USB serial adaptors. The ones I am testing on are the 2303 chipset which are (I have recently learned) reputed to be wonky. I am ordering a dual port FTDI to try.

S

scotteggshell
Posts: 3
Joined: Sun May 12, 2013 1:55 am

Re: USB Serial Adaptor Issue

Thu May 23, 2013 1:39 am

If anyone is interested, the FTDI equipment / driver did the trick.

Bright Sparks NZ
Posts: 20
Joined: Fri Dec 21, 2012 8:11 pm

Re: USB Serial Adaptor Issue

Tue Jun 11, 2013 9:35 am

A link please ?
Any setup or install instructions ?
I am hoping to use FTDI serial to try out a few interfacing ideas since serial does not look like going away any time soon. Have to say that after several days searching I have not found much in the way of setting up or using one for general use. Seems like there have been lots of issues however...
Hope I can report back soon on how I get on !
~ Andrew

Excal
Posts: 3
Joined: Mon Jun 10, 2013 3:43 pm

Re: USB Serial Adaptor Issue

Tue Jun 11, 2013 10:14 am

I have tried usb to serial adapters and had bad experiences with them.

I have ordered a http://www.ebay.com/itm/New-MAX3232-RS2 ... 27c96d8b78 to connect to the serial gpio pins of the pi.

Its still underway from china though, i'll post my experience with it when i get it.

SteveSpencer
Posts: 357
Joined: Thu Mar 28, 2013 9:19 am
Location: Nottingham, UK

Re: USB Serial Adaptor Issue

Tue Jun 11, 2013 10:31 am

I have a box full (well, it's a small box of 20) of PL2303 USB/TTL(5v) adaptors which I originally bought to connect ATmega168/328/1284 chips to PCs. I've tried three or four on the previous latest Raspbian and not seen any problems with them.

Of course, I was using them in a powered hub (2.5A) rather than directly on the Pi, so that might well have helped. I was communicating at relatively low speed (9600).

My only disappointment was that they came as 4-wire connections (Tx, Rx, Gnd, Vcc), so I have replaced the 4 core cable with six to give me DTR as well.

Steve
Steve S
No, I can't think of anything funny that won't offend someone if they want it to...

Bright Sparks NZ
Posts: 20
Joined: Fri Dec 21, 2012 8:11 pm

Re: USB Serial Adaptor Issue

Fri Jun 14, 2013 12:57 am

Update on plug and pray USB serial...
* lsusb checks out the usb devices on your system
* Rev Ed AXE-027 FTDI-Phono RS232 reports in but does not appear under the dev directory
* Red Ed 9 pin adapter reports in as prolific and does appear under dev directory as ttyUSB0. With this I can start minicom with this and nothing happens until you exit the program when a burst of what sounds like all the serial data (key stroke attempts) is dumped out of the port at the very moment you 'X'it minicom
* Minicom working fine with AMA0 / GPIO header via the 2x transistor level shifter I cooked up.
Circuit >>> https://picasaweb.google.com/picaxe/Ras ... 1100772690
Photo >>> https://picasaweb.google.com/picaxe/Ras ... 9118413554
Several weeks so far of intermittent hacking and re flashing of SD cards
Learning lots
~ Andrew

Bright Sparks NZ
Posts: 20
Joined: Fri Dec 21, 2012 8:11 pm

Re: USB Serial Adaptor Issue

Fri Jun 14, 2013 2:18 am

Okay so after a few more tries and a bit more image blatting onto the SD card the Prolific works into a terminal program. (Correction it is Half working... It will Rx data into the 9 pin Prolific from anything but no data from Minicom TO the 9 pin serial adapter) Any ideas to test this or tweak Minicom as needed etc appreciated.

Here are some detail of the AXE-027 Lead if anyone can find a driver and just as important for beginners... Any manual install getting and setting up instructions please. Right click update would be so nice eh ? The chip is a FT232RQ. Here is a photo
https://picasaweb.google.com/picaxe/Ras ... 1515223730
A one chip and 4 wire solution for I/O expanding is just soooo close...
~ Andrew

Bright Sparks NZ
Posts: 20
Joined: Fri Dec 21, 2012 8:11 pm

Re: USB Serial Adaptor Issue

Fri Jun 14, 2013 5:41 am

Looks like the Prolific was working TOO well... The hardware flow control was ON.
Wonder how many 'faulty' USB Serial leads have been tossed aside on this basis...?
This is set within the Hardware Flow Control parameters within Minicom
See >>>
http://stackoverflow.com/questions/3913 ... 3#17101693
Next stop FTDI !
~ Andrew

Return to “General discussion”