HobbyPCB.com

Built by Hobbyist for Hobbyist!
It is currently Wed Aug 21, 2019 2:15 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Fri May 13, 2016 11:41 am 
Offline

Joined: Fri Apr 15, 2016 9:15 am
Posts: 9
I am attempting to interact with my RS-UV3 from Linux.

My setup is:

Mint (rosa)/Ubuntu (14.04) with the Cinnamon desktop
i7 x86-64 mobo, etc.
Tried minicom from command line (does not support 19,200 but sometimes shows some signs of life)
Tried Putty in serial term mode (does support 19,200, but always refuses to connect)
port appears as /dev/ttyUSB0 owned by: root group: dialout (I am member of dialout)

Linux does see the FTDI appear & disappear with plug/unplug.
dmesg | tail:
-----------------
[1207111.233225] usb 1-5: new full-speed USB device number 54 using xhci_hcd
[1207111.366634] usb 1-5: New USB device found, idVendor=0403, idProduct=6001
[1207111.366636] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1207111.366638] usb 1-5: Product: FT232R USB UART
[1207111.366639] usb 1-5: Manufacturer: FTDI
[1207111.366639] usb 1-5: SerialNumber: A50285BI
[1207111.369235] ftdi_sio 1-5:1.0: FTDI USB Serial Device converter detected
[1207111.369253] usb 1-5: Detected FT232RL
[1207111.369490] usb 1-5: FTDI USB Serial Device converter now attached to ttyUSB0

USB cable -> FTDI dongle (purchased from HobbyPCB)
(FTDI ->RS-UV3)
-----------------
Tx -> Rx
Rx -> Tx
Gnd ->Gnd

FTDI dongle jumpered for 3.3 v

I have tried reversing Rx/Tx to no avail.

I routinely connect to FTDI, Microchip, Atmel, and SiLabs USB to serial interfaces from this machine (3d Printer, other radio interfaces, etc)

Any suggestion?


Top
 Profile  
 
PostPosted: Sun May 15, 2016 4:28 pm 
Offline

Joined: Fri Apr 15, 2016 9:15 am
Posts: 9
Ok, So far no help on this. So I have tried a bunch of things - removed and replaced the JP2 connector I had used, replaced all the cables involved, tried to evoke some response with other tools. No luck.

So I have resorted to the distasteful option - I set up an old Win7 machine, and plugged everything in. I downloaded all of the related Windows tools, set them up, and repeated my efforts.

I managed to get the board to work using the RS-UV3 Commander. Then I succeeded in getting Putty-windows to talk to the board. You have to check the setting Terminal->"Implicit LF in every CR", but that makes it much more readable. Under Windows, this works.

I went back to Linux, hoping that the exact HW setup from Windows would work. It did not. Putty refuses to connect at all, and Minicom ("minicom -D /dev/ttyUSB0 -b 19200") opens but does not respond to any commands. The port shows in /dev just fine, but I have not been able to interact in any useful way.

I'm going to have to use some kind of protocol analyzer, but I have not got one handy.

Even under Windows the interaction feels a bit odd. The requirement to insert LF characters in Putty is something that I haven't encountered in years. I wonder what others have encountered using Ras-Pi's or other Linux (or Mac) platforms.


Top
 Profile  
 
PostPosted: Tue May 17, 2016 11:42 am 
Offline

Joined: Mon Jul 23, 2012 6:25 am
Posts: 1143
If you are using JP2 on the RS-UV3 you will need to provide a voltage on VIO or nothing will come back from the RS-UV3. The FTDI USB-TTL provides this when it's plugged into the RS-UV3 but if you are cabling between the two you also need that line. If you use pins 7, 8 and 9 on the DB9 you don;t need to provide a signalling voltage, it's 3.3V output and the input is 2.8 - 5V

There is no requirement for LF termination but <CR> is required to terminate the line. I could have picked something else to terminate the command, something crazy like ";"


Top
 Profile  
 
PostPosted: Wed May 18, 2016 11:26 am 
Offline

Joined: Fri Apr 15, 2016 9:15 am
Posts: 9
jimveatch wrote:
If you are using JP2 on the RS-UV3 you will need to provide a voltage on VIO or nothing will come back from the RS-UV3. The FTDI USB-TTL provides this when it's plugged into the RS-UV3 but if you are cabling between the two you also need that line. If you use pins 7, 8 and 9 on the DB9 you don;t need to provide a signalling voltage, it's 3.3V output and the input is 2.8 - 5V

I thought that I read somewhere that I should not use VIO. I can't find it right now, but I thought that it was mentioned somewhere, as a mismatch might damage either the board or the FTDI converter.

This and quantum fluctuations doubtless account for my difficulties.

But I was careful to use the exact same cable under Linux as under Windows. I just unplugged the entire assembly (USB cable->FTDI dongle->Jumper Wires->RS-UV3) from the Windows box and carried it to the Linux Box and plugged in the cable. Then checked that the /dev/ttyUSB0 device appeared as it should.

I tried Putty using my regular user account (I am using it that way right now with another board). But it refused to connect - something it does not usually do unless it is given a bogus device. Then I tried the same using minicom (a rather minimalist console/"DOS" window type terminal program) as both my normal user account and sudo'ed as root. Both open normally, but show 'unconnected' in the status line, and even simple commands to the RS-UV3 like "TP" do not produce a response.

jimveatch wrote:
There is no requirement for LF termination but <CR> is required to terminate the line. I could have picked something else to terminate the command, something crazy like ";"

This is not a problem, just an observation. When used as a terminal to receive strings sent by the RS-UV3, Putty defaults to expecting a <CR><LF> pair, I guess. I just have to set it to insert the <LF> into the received stream itself, or the next line overwrites the first.

I just need to do some further experimentation along these lines. At first I thought I had damaged my board in some way. I am confident now that it is in working order. I just want to be able to talk to it from Linux.

Will any of your group be at Dayton?

Dave


Top
 Profile  
 
PostPosted: Wed May 18, 2016 1:40 pm 
Offline

Joined: Fri Apr 15, 2016 9:15 am
Posts: 9
Testing from Linux: Tying VCC on the FTDI board to VIO on the RS-UV3 did not change the behavior. I tried both the 3.3 v and the 5.0 v jumper setting on the FTDI board.
Besides, the VIO was not needed with Win7.
Harrumph! It really seems to be something in the driver or (hard to imagine) the data stream).

Dave


Top
 Profile  
 
PostPosted: Wed May 18, 2016 2:19 pm 
Offline

Joined: Mon Jul 23, 2012 6:25 am
Posts: 1143
Hi Dave,

I think that the issue is between the RPI and the FTDI not between the FTDI and the RS-UV3. You can try a loopback test to confirm this by disconnecting the RS-UV3 entirely and jumpering TXD to RXD on the FTDI. If you still get refuses to connect then it's pretty clearly a driver/configuration issue on the Linux side of the equation.

Jim,


Top
 Profile  
 
PostPosted: Wed May 18, 2016 5:10 pm 
Offline

Joined: Fri Apr 15, 2016 9:15 am
Posts: 9
Jim,

Thanks for the advice. Kind of embarrassed I didn't think to try the loopback myself. Loopback works perfectly with minicom both as normal user and as root. Everything is echoed back as it should be.

But Putty still won't connect, either as a normal user or as root. I don't know why that would be. I usually use it as my first choice, because it is very consistent across platforms. But not here, it seems.

I'm going on about this because someone else may have the same experience.

OBTW, I am doing this with desktop Linux (Mint 17.3 Cinnamon/Ubuntu 14.04), not on an RPI. I will try something like that next, and put the results here.

Dave, KD0EAG


Top
 Profile  
 
PostPosted: Fri May 27, 2016 3:53 pm 
Offline

Joined: Fri Apr 15, 2016 9:15 am
Posts: 9
Ok, just wanted to post a note for posterity that I have tracked this problem down to a FTDI driver that, while installed on the machine, is not working properly. It may have gotten klobbered somehow in a recent re-installation of the 14.04 OS.

I have decided not to fight it further, as I am planning a major upgrade on this machine when an Ubuntu 16.04.01 becomes available, which should be in the near future.

Dave, KD0EAG


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group