yconst

  • *
  • 6
cc3d telemetry to raspberry to wifi to gcs
« on: June 02, 2016, 12:21:24 am »
Hello all, first post here.

I have a quad with a cc3d and a raspberry pi 2 onboard. I wish to configure the raspberry to act as a telemetry proxy for cc3d (connected via serial), so that I can receive telemetry via wifi on the ground station running on a laptop.

I think I can figure out the serial communication between the cc3d and the pi. But I am at a loss as to how to go about for setting up the pi as a telemetry proxy via wifi.

I understand that the ground station has an option to connect via udp, but I was unable to find any more information on it.

Does anybody have any experience with a similar setup? Can anyone provide some information on how to proceed?
Please note that the telemetry connection I wish to establish is not using an oplink modem, but a combination of serial and wifi.

Thanks a lot.

yconst

  • *
  • 6
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #1 on: June 05, 2016, 09:06:51 am »
Quick update here: I started my attempt at this by trying to directly forward the serial port communication to wifi, by using a utility called ser2net. The configuration options I am using are as follows (according to the format specified by the utility):

192.168.1.42,54444:raw:0:/dev/ttyACM0:57600 8DATABITS NONE 1STOPBIT NOBREAK

The data rate has been configured in the GCS as well to be the same.

The connection is picked up by the GCS when I click connect, and the RX/TX indicators are momentarily active at full. However, right after that there is no RX activity at all, the GCS shows a "Log Replay" indication, and almost all controls are disabled, as if disconnected. Furthermore, at the pi side, I get the following log message from ser2net:

ser2net[966]: Could not turn off break for device /dev/ttyACM0 port 192.168.1.42,54444: Broken pipe

By the way, I should mention that I am using a USB connection, with the USB Telemetry option of GCS.

Any ideas?

Mateusz

  • *
  • 808
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #2 on: June 05, 2016, 04:31:35 pm »
Just a short note. My HD cam using WiFi used to trigger failsafe on my frsky receiver. Lots of crashes before I figured out why. Frsky and many radio systems use 2.4G same as WiFi which can be 2.4/5.8. For vtx not an issue for control it may cause troubles.

Vixiom

  • *
  • 11
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #3 on: July 05, 2016, 08:39:12 pm »
I think I can figure out the serial communication between the cc3d and the pi.

Hi,

I tried to perform the same (rpi and cc3d serial link) with librepilot 15.09 and I cant have it working.

I tried by different ways, at the end I tried directly to connect my cc3d with an FTDI Usb adapter : dont work and I have exactly the same symptom : momentarily active at full, right after that there is no RX activity at all, then the GCS shows a "Log Replay" indication...

Serial link was working with cleanflight software so it's not an hardware/wiring issue.

I try with windows computer too, and nothing is coming on my FTDI.

With LP I try Flex port and main port, and modify CC Hardware Configuration in GCS accordingly (when connected to the functionnal USB to have change saved) then reboot and dont work (with usb disconnected as LibrePilot seem to only enable usb if this is connected).

Does the serial link is working on CC3D with serial peripheral other than a oplink modem ?
CC3D - DJI450 clone - Openlrsng TxRx - Rpi Zero with Camera

Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #4 on: July 06, 2016, 12:11:05 am »
I think there are many people who send serial telemetry from CC3D to OSD board.

I personally have set up serial telemetry from Revo to APM telemetry boards for a test.

Vixiom

  • *
  • 11
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #5 on: July 06, 2016, 06:24:59 pm »
Ok, thank you I will go back here if I found usefull information
CC3D - DJI450 clone - Openlrsng TxRx - Rpi Zero with Camera

Vixiom

  • *
  • 11
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #6 on: July 07, 2016, 01:11:29 am »
TheOtherCliff, you're great !!

I was thinking my need was like the Setup a bluetooth for telemetry, but I understood I was wrong since you say me about MinOPOSD, then I use this information:
https://librepilot.atlassian.net/wiki/display/LPDOC/MinOPOSD+setup

It's working fine now !

Thank you
CC3D - DJI450 clone - Openlrsng TxRx - Rpi Zero with Camera

yconst

  • *
  • 6
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #7 on: July 09, 2016, 11:00:32 am »
Hi all,

Thanks for all your replies. Unfortunately the problem still persists as described above.

Theothercliff, I am wondering if there is a way to simply test the serial connection using something like minicom. Does the cc3d answer to standard serial commands?

Also, is it possible for anyone who got serial working to share their complete serial port settings (rate/data bits/stop bits/parity etc)?

Vixiom

  • *
  • 11
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #8 on: July 11, 2016, 08:37:46 pm »
Hi,

As described in previous post I did a lot of tries before having a working system.

Maybe it should be good to create a wiki for serial link between CC3D and LibrePilot GCS, I'm volunteer to perform this task but I don't know how to do / which person to contact ?

My working serial configuration was :

CC3D with Tx, Rx and ground connected to FTDI
FTDI connected by Usb to my windows 7 computer,

And LibrePilot software was able to have usefull information (without becoming log review...).

Software config was like : https://librepilot.atlassian.net/wiki/display/LPDOC/MinOPOSD+setup

For baudrate I set 57600 (I found on another post on this forum that is hardcoded and cant be changed right now but it may be changed on future release, correct me if I'm wrong) for :
 - CC3D (please use usb cable to set it before, then change baudrates and save it, then unplug usb cable and power cycle your cc3d)
 - FTDI port com on my windows computer
 - Librepilot settings (on librepilot settings on top of software windows) then apply and close/open librepilot (maybe not usefull but...)

I dont remember about data bits/stop bits/parity but I try with default's one and it was good.

Hoping it help you !




CC3D - DJI450 clone - Openlrsng TxRx - Rpi Zero with Camera

yconst

  • *
  • 6
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #9 on: July 16, 2016, 11:06:48 pm »
Hi,

Thanks for your reply.

Were you able to establish a connection between a Raspberry and the CC3D?
I can imagine that using a COM port on a PC with the GCS available should be straightforward. However, on a Raspberry (where GCS is not available), there must be a different strategy I suppose.

So far, my attempts at forwarding the (USB) com port to TCP with ser2net have failed. I have tried many different options but to no avail. I suspect that the culprit lies in the serial communication between the PI and the CC3D. I will also try with different utilities and report.

If anyone has successfully succeeded at even a rudimentary attempt at communicating, either using Telemetry port or USB telemetry, it'd be great to chime in.

yconst

  • *
  • 6
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #10 on: July 16, 2016, 11:38:40 pm »
Ok so I've tried some diagnostics on the port and it seems that the CC3D is recognised as so (1st attachment).
A reminder that this is a serial connection over USB using the RPi

Also, the baud rate of the device is reported at 9600, which seems a bit strange (too low) (attachment 2)

Vixiom

  • *
  • 11
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #11 on: July 20, 2016, 03:38:45 pm »
I didn't try yet with a raspberry pi, I will do it when I receive my rpi0 which will handle the camera too, my goal is to connect through wifi with vpn on my android.

Once camera work I will try to add gcs (I dont have any idea how to compile that ?..) with serial telemetry.
CC3D - DJI450 clone - Openlrsng TxRx - Rpi Zero with Camera

yconst

  • *
  • 6
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #12 on: July 26, 2016, 11:12:47 pm »
Great, looking forward to your results as well! It's a no-go so far for me unfortunately.

Meanwhile, for FPV you may want to take a look at this, if you haven't already:
https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/

As far as I know compiling GCS for RPi is not possible.. (please correct me if wrong). That is the principal reason why I wanted to forward telemetry via WiFi.

Vixiom

  • *
  • 11
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #13 on: July 27, 2016, 09:46:46 pm »
Thank you for the link, I already see it before, it look great !

But as I want to be able to have the lightest on-field equipment, and dont bring laptop, raspberry with screen, usb batterie... I don't know if I will use it because it seem to need one raspberry pi to receive video too.

My main goal is to know what the copter is recording, if I'm able to perform it with my android it will be enough.

Anyway I will post future working solution, there's a lot of thing to do !
CC3D - DJI450 clone - Openlrsng TxRx - Rpi Zero with Camera

ryzhiy

  • *
  • 4
Re: cc3d telemetry to raspberry to wifi to gcs
« Reply #14 on: July 28, 2016, 11:15:35 am »
hi, have you tried doing the inverse, controlling CC3D with RPi?