/dev/ttyUSB0 as a serial link

12 posts
by stevePIman » Tue May 29, 2012 9:59 am

Has anyone had any success using this for comms on debian6-19-04-2012?

I'm trying to connect a CrystalFontz 20x4+Keypad LCD http://www.crystalfontz.com/product/CFA635YYEKU and as soon as I try to access the port by the example C code (or LCDproc or LCD4linux) the Pi locks up - powercyling is the only way to get it working.

Here's what I've done so far:
Plugged the LCD into the PI & looked for the /var/log/messages entries to ensure the Pi can see the USB details - it mentions FTDI and ttyUSB0. I also used lsusb and lsmod to ensure the device had an entry.

I read on a UBUNTU forum that I had to add an entry to /etc/modules to assign the product to usbserial drivers...or something.

Code: Select all
usbserial vendor=0x0403 product=0xfc0d

Module                  Size  Used by
fuse                   49036  1
evdev                   6404  3
ftdi_sio               26384  0
usbserial              21720  1 ftdi_sio
Bus 001 Device 006: ID 413c:3016 Dell Computer Corp. Optical 5-Button Wheel Mouse
Bus 001 Device 005: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 0403:fc0d Future Technology Devices International, Ltd Crystalfontz CFA-635 USB LCD

I also read that other Linux versions have crashed systems when ttyUSB0 was accessed.

Does anyone know how to get this working?

Posts: 24
Joined: Tue May 29, 2012 8:07 am
by bootc » Fri Jun 01, 2012 5:00 pm
Does that mean you did change your /etc/modules or not?

If you did, try this instead of what you pasted above:

Code: Select all
ftdi_sio product=0xfc0d
Posts: 19
Joined: Mon May 28, 2012 7:45 pm
by stevewardell » Sat Jun 09, 2012 8:36 pm
have same/similar issue, FTDI usb/serial adapter is recognised but as soon as I try to read the port it hangs the RPi. The adapter is recognised fine but I do not think thats using the FTDI driver in the kernel.

I'm trying to find a solution but it seems to be that the FTDI kernel drivers are not ARM compatbile

http://stevewardell.wordpress.com/2012/06/09/389/ is my progress so far
Posts: 16
Joined: Thu Jun 07, 2012 9:15 pm
by therealeasterbunny » Tue Jun 12, 2012 4:44 pm
I have a Chinese rip off (apparently) (bought off ebay for tuppence so what did I expect huh?) PL2303 (with a see through outer cable to the silver shielding) USB to 9 pin serial cable which I am using to try to rig up a DEC VT520 to my Pi for subsequent nefarious activities involving Colossal Caves Adventure.


I first hooked up a 9-25 way rs232 converter from the 9 pin end of the PL2303 to the 25 pin port of the VT.

When I tried to echo stuff to the VT, ... nothing ... not a dicky bird.

And - my Pi hung! (Like you).

So, I thought, OK, cheapo PL2303... or cabling... or driver... etc

But then I tried my Windows laptop (using and older version of the Prolific driver for XP as the later versions seem to detect the chinese copied chip then force fail) and still nothing.

So I made a new 9 - 25 way converter cable which hooked up to my 9 pin connector of the PL2303 and hey presto it works! Windows communicates with VT.

So, with PL2303 proved and cabling proved, it was back to the Pi.

Now when I copy to /dev/ttyUSB0, it doesn't hang the Pi. All that is changed is the cabling pinout connections.

Nothing happens on the VT yet :) - but it doesnt crash the Pi. So I have made progress (of sorts:) )

I guess nothing happens on the VT maybe as I have not set word size, speed, parity etc which I am now about to do. Or it could be as the posters allude to above. We shall wait and see. I have also found some C source on the net for Linix driver source which may come in handy if I get nowhere.

Essentially my post here is to inform you I am also tinkering and you have a friend ... :)

Code: Select all
9 pin connector:

1--+ (DCD)
4--+ (DSR)
6--+ (DTR)

7--+ (RTS)
8--+ (CTS)

2---(Tx)-------------(Rx)----2 (25 pin connector)

3---(Rx)-------------(Tx)----3 (25 pin connector)

5---(GND)------------(GND)=--7 (25 pin connector)

9--Not connected


25 pin connector

6--+ (DCD)
6--+ (DSR)
20-+ (DTR)

4--+ (RTS)
5--+ (CTS)

3---(Tx)-------------(Rx)----3 (25 pin connector)

2---(Rx)-------------(Tx)----2 (25 pin connector)

7---(GND)------------(GND)=--5 (25 pin connector)

Will kep you posted on this topic of my progress also if you dont mind. :)
Posts: 77
Joined: Thu Feb 02, 2012 5:53 pm
by therealeasterbunny » Tue Jun 12, 2012 4:52 pm
May also look at this soon... https://bugs.launchpad.net/ubuntu/+sour ... bug/661321 - may be useful.

Just looking into setting up port on Pi first.
Posts: 77
Joined: Thu Feb 02, 2012 5:53 pm
by stevewardell » Tue Jun 12, 2012 4:54 pm
always keen to hear of the exploits of others :)

I've a PL2303 based adapter too, the RPi was fine with it, in fact I connected a PSION5 to it as a terminal, but my Weather Station was less keen and would not communicate.
Posts: 16
Joined: Thu Jun 07, 2012 9:15 pm
by therealeasterbunny » Tue Jun 12, 2012 5:36 pm
Hmmm... good news on the Psion side.

Could it be the weather station device needs rigging up differently, perhaps for different flow control handling if you have checked baud, data, stop bits and parity? I would retry PL2303 but with different pinout cabling as this seemed to work for me (giving rts=cts and dcd-dsr-dtr to allow Pi to think the other end has got the info so it can carry on). It must be something to do with signalling that the weather station is being strict about.... as I say... 'Hmmm'. Do you have a make / model of the weather station gadget? I am curious...

I seem to have comms to the DEC VT now ...


More photographic tomfoolery at:

http://www.facebook.com/media/set/?set= ... 1369325380
Posts: 77
Joined: Thu Feb 02, 2012 5:53 pm
by therealeasterbunny » Tue Jun 12, 2012 5:44 pm
Just re-read your blog ... "ws2350"

Will have a think.
Posts: 77
Joined: Thu Feb 02, 2012 5:53 pm
by scrishton » Tue Jun 12, 2012 7:38 pm
therealeasterbunny, my cheapo PL2303 USB to RS422 adaptors seem to have a totally non standard pinout on their 9-pin connectors. Took me a while to sort out how they should be wired, then found that Mr Sony had also come up with his own 9-pin pinout on the back of the video tape machines I'm trying to control. Somehow I managed to get the Raspberry Pi to successfully control one machine perfectly well - if you ever watch the penultimate episode of the new series of 'In With The Flynns', all the VT playins were cued up and run by the Pi. However I can't get the Pi to open more than one PL2303 port - it stops with a 'protocol error' when I try to open the second port.

Never had much success with a Psion 5 - I bought a second-hand one once. But I used to use a Psion 3a with a 'scope probe attached to a MAX232 as a very compact test system for PIC projects in a former life.

Now Colossal Caves. Was that the one with xyzzy and plover?
User avatar
Posts: 48
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
by therealeasterbunny » Tue Jun 12, 2012 7:54 pm
xyzzy indeed. Not sure about plover - but I guess will come across whatever it is in a bit :).

My Adventuring started in the early 80s with Scott Adams on a Vic but desperate now to play the game that started them all - and soak up the atmosphere (and phosphor / radiation) from an old green screen.

If you're gonna play an all time classic, may as well do it proper imo :)

Yes, Sony can be pigs for nonstandard stuff, its how they keep people buying their addons for their main kit as nothing else works with it unless you poke things about.

Unfortunately I only have 1 PL2303 so cant try to reproduce the error on mine. Will check out the TV episode though, thanks.

Steve Wardell, I have downloaded the WS PDF manual but not much about serial connectivity over and above the norm. A dumb question but needs to be asked - is your serial cable less than 15 meters?

Also checked out a different weather station PDF (LaCrosse Tech) and it states:
Code: Select all
One identified issue is the driver for the USB adapter used to connect to
the computer. Some computer like Prolific Chip Drivers and some will
crash when using that driver. Be sure your USB adapter is Windows
Certified and if using Vista, that is has a Vista driver.
Using non-certified adapters can lead to stability problems.

Sorry not much help I suppose. :|
Posts: 77
Joined: Thu Feb 02, 2012 5:53 pm
by stevewardell » Tue Jun 12, 2012 8:09 pm
my problem solved with newer FTDI chipset viewtopic.php?f=44&t=8010
Posts: 16
Joined: Thu Jun 07, 2012 9:15 pm
by therealeasterbunny » Tue Jun 12, 2012 8:20 pm
cool! Looks like we are all winners tonight :mrgreen:
Posts: 77
Joined: Thu Feb 02, 2012 5:53 pm