paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Problem with FTDI ground station


From: Nicolas Quendez
Subject: Re: [Paparazzi-devel] Problem with FTDI ground station
Date: Thu, 21 Aug 2014 17:19:16 -0300


Thanks everybody for the help ! 
My answers  : 

Is this a Virtual Machine or dedicated hardware?

Dedicated Lenovo T400 only for paparazzi, with Ubuntu (only). 

Do you have anything else connected to USB?

No, except the autopilot when flashing the firmware, on the second USB...

As devices are found on startup (and after) they will be assigned a device with a number in /dev. So the first USB serial device is going to be given /dev/ttyUSB0. The second will become /dev/ttyUSB1 and so on. Your hard disk and about everything is a device and located in there so do not create or remove devices by editing or changing things in /dev/. Thankfully Linux comes with most all the drivers you need so this probably isn't a problem with a driver (.dll file in Windows). Usually it is the simplest thing (broken wire, mismatched Tx to Rx, wrong device directive in the command line for Data Link etc). Let's keep looking for a simple solution. 

Let's also keep it simple. Let's not debug the XBee modems yet. Unplug the XBee from the FTDIUtil as that will block the use of the cable to connect to the Lisa/M over serial. 

My debugging usually goes like: 

1. Unplug the FTDIUtil 
2. Make sure autopilot is powered off
3. In Paparazzi Center, click "Stop/Remove all Processes"
<order matters here so please follow these steps exactly>
4. Now plug the FTDUtil into USB to the Computer NOTE: Lisa/M powered off and the cable unplugged from the Lisa/M
5. At a  terminal window type: dmesg ... verify in the output the FTDIUtil appears as /dev/ttyUSB0 and « connected"

When typing dmesg  I do not see the term « connected » and I see ttyUSB0 but not /dev/ttyUSB0 : 

There are a lot of things written, and at the end : 

[80975.226298] sd 4:0:0:0: [sdb] No Caching mode page found
[80975.226307] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[80975.226315] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[81002.332104] usb 6-2: new full-speed USB device number 3 using uhci_hcd
[81002.529142] usb 6-2: New USB device found, idVendor=0403, idProduct=6001
[81002.529151] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[81002.529159] usb 6-2: Product: FT232R USB UART
[81002.529166] usb 6-2: Manufacturer: FTDI
[81002.529173] usb 6-2: SerialNumber: A600eGeJ
[81002.536216] ftdi_sio 6-2:1.0: FTDI USB Serial Device converter detected
[81002.536290] usb 6-2: Detected FT232RL
[81002.536297] usb 6-2: Number of endpoints 2
[81002.536304] usb 6-2: Endpoint 1 MaxPacketSize 64
[81002.536311] usb 6-2: Endpoint 2 MaxPacketSize 64
[81002.536317] usb 6-2: Setting MaxPacketSize 64
[81002.538290] usb 6-2: FTDI USB Serial Device converter now attached to ttyUSB0




6. Now connect the Lisa/M with the 3 wire connector to the FTDIUtil
7. Now power the Lisa/M 
8. Now in the Paparazzi Center set: Target = ap, Session = Flight address@hidden, and click "Execute"

3 processes should be launched each with a command line shown in an area. All 3 should show "Stop" if they are running for the button. If one says "Redo" then that means it did not start successfully. 


All the 3 processes are running smoothly. But GCS is empty with « waiting for telemetry ». 



What I have found is sometimes if the autopilot is powered and connected to the FTDIUtil the linux system may consider the device busy and assign a new device when the FTDI is connected like /dev/ttyUSB1. So the order of the above will make sure (for me at least) that /dev/ttyUSB0 is used each time. 

What is the output from the above? 

About the XBee you have. Here is what I do. 
1. Using the FTDIUtil plug in the GROUND modem and launch X-CTU
2. Add the XBee and verify it is set for:
a. 57,600 comm rate
b. Coordinator 
c. either API or AT but be sure both have the same directive as to the use of API or not using API

for the airborne one you setup the same settings except for one very important difference. The airborne one is not a coordinator it is an end-device/router. Granted I only work with the XBee Pro S1/S2 with mesh so if your are using non mesh maybe there is no option for coordinator and end-device. 

BTW: I have never seen the modems you show in the photo. Are they a new type? 



These modems are the xbee 868 LP, that should be OK for Europe if I understood well… 
So for now, no new test with the Xbee. I focus on the FTDI direct link for now...


Also if the FTDIUtil works with the cable it does not guarantee the XBee with wireless will work. They are separate problems. Just if you get the cabled way to work you can then focus on the XBee as the next problem. 

Hope this helps keep you going. Remember, it's almost always something simple. Paparazzi has been working since 2003. It's flexibility will become something you find very empowering down the road when this all starts to makes sense. Once past the startup learning process you will have a much better understanding how this all works and have more confidence with what you are doing with it. Keep trying is the path to success here.



I have no doubt about that. I will perseverate. I have skills in aerodynamics and flight mechanics, but new on linux and electronics… 

Thanks again
Nicolas


Cheers,
David


On Thu, Jul 24, 2014 at 5:52 AM, Nicolas Quendez <address@hidden> wrote:

Hi everybody,

I just begin to manipulate Paparazzi hardware and software. 

For now : 
- I succeed in working with flight plan simulation
- I succeed in uploading software into my Lisa M AP 
- I succeed into programming my Xbee modules with XCTU (windows) with the PPZUAV FDTI utility board. 

BUT : 
when I plug the FTDI board with xbee module (coordinator) by USB on my ubuntu computer, I have the following error when starting a session : 
Failure("Error opening modem serial device : fd < 0 (/dev/ttyUSB0) ») : 

RUN '/home/nicolas/paparazzi/sw/ground_segment/tmtc/link -d /dev/ttyUSB0 -transport xbee -s 57600'
Failure("Error opening modem serial device : fd < 0 (/dev/ttyUSB0)")
Broadcasting on network 127.255.255.255, port 2010
 Read Socket : Connection reset by peer
FAILED '/home/nicolas/paparazzi/sw/ground_segment/tmtc/link' with code 1


I have checked with dmesg that /dev/ttyUSB0 seems to be the good place for the board.
I have added the current user  to the modems group as explained in the FAQ (http://wiki.paparazziuav.org/wiki/FAQ). 
I made the xbee module set as coordinator, with baud rate set to 57000 
My Xbee is a 868 LP 80 K modem. 

On the PPZUAV FTDI board the red led is ON. 
The green led is ON (but not flashing).

Have you any idea of my mistake, or configuration that I did not do ? Are there some drivers to install for the FTDI board, or a configuration to put into the xml files ? 

Thanks in advance
Best regards
Nicolas


Hardware : 
<FTDI.jpg>

XCTU configuration : 

<XCTU6.gif>



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




--
address@hidden
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]