MavProxy connecting to MP on TCP

Dear Michael Oborne, Peter Barker and Friends:

How can I connect MP (on windows10) to MavProxy (running on RPI3) on TCP?. Mavproxy is connected to Pixhawk on GPIO/tty of RPI3. I am making a very simple network to understand the basic concept. Both Winsows10 and RPI3 are conencted “directly” via ethernet cable and have following IPs , belong to same network.

Windows10 (say IP1): 169.254.193.16
RPI3 (say IP2): 169.254.21.164

MP is able to connect sucesfully to Mavproxy via following command. Question: What modification , in following command, require MP to connect on TCP?. is it possible to forward / stream the mavlink messages to MP on TCP or it require UDP messages wrapped in TCP?.

pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo mavproxy.py --master=/dev/ttyS0 --baudrate 57600 --out=udpout:169.254.193.16:14550 --aircraft MyCopter
Connect /dev/ttyS0 source_system=255
no script MyCopter/mavinit.scr
Log Directory: MyCopter/logs/2017-10-22/flight25
Telemetry log: MyCopter/logs/2017-10-22/flight25/flight.tlog
MAV> Waiting for heartbeat from /dev/ttyS0
online system 1
STABILIZE> Mode STABILIZE
fence breach
Vcc 4.1
APM: APM:Copter V3.5.3 (1a85c237)
APM: PX4: 1d6bf64c NuttX: 1a99ba58
APM: Frame: QUAD
APM: PX4v3 004D0040 3335510F 35303335
APM: PreArm: RC Roll not configured
APM: PreArm: Compass not calibrated
APM: PreArm: 3D Accel calibration needed
APM: PreArm: Check Board Voltage
APM: PreArm: Throttle below Failsafe
APM: APM:Copter V3.5.3 (1a85c237)
APM: PX4: 1d6bf64c NuttX: 1a99ba58
APM: Frame: QUAD
APM: PX4v3 004D0040 3335510F 35303335
Received 772 parameters
Saved 772 parameters to MyCopter/logs/2017-10-22/flight25/mav.parm

NOTE: I am following this and this wiki.

I had success with this:
Try to replace --out=udpout:169.254.193.16:14550
with --out=udpin:169.254.193.16:14550

MP try to connect with “UDPCI” and after pressing connect MP will aks for IP and Port

Good luck
Rolf

Thanks Rolf: It fix the issue but a minor correction … it is –out=udpin:169.254.21.164:14550 i.e. --out=udpin:IP of RPI3, connecting to MP and NOT the MP IP …then on MP, use RPI3 IP while selecting UDPCI.

Thanks for your support.

pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo mavproxy.py --master=/dev/ttyS0 --baudrate 57600 --out=udpin:169.254.21.164:14550 --aircraft MyCopter
Connect /dev/ttyS0 source_system=255
no script MyCopter/mavinit.scr
Log Directory: MyCopter/logs/2017-10-24/flight3
Telemetry log: MyCopter/logs/2017-10-24/flight3/flight.tlog
MAV> Waiting for heartbeat from /dev/ttyS0
fence breach
height -20
online system 1
STABILIZE> Mode STABILIZE
APM: APM:Copter V3.5.3 (1a85c237)
APM: PX4: 1d6bf64c NuttX: 1a99ba58
APM: Frame: QUAD
APM: PX4v3 004D0040 3335510F 35303335
APM: PreArm: RC Roll not configured
APM: PreArm: Compass not calibrated
APM: PreArm: 3D Accel calibration needed
APM: PreArm: Throttle below Failsafe
Received 772 parameters
Saved 772 parameters to MyCopter/logs/2017-10-24/flight3/mav.parm
APM: APM:Copter V3.5.3 (1a85c237)
APM: PX4: 1d6bf64c NuttX: 1a99ba58

Dear all i too need help for same. I am connecting pixhawk with mavproxy directly using telemetry module. Is it possible to connect mavproxy using telemetry and at the same time the same telemetry with missin planner ? If yes then how and if no then why ?

You can connect your drone to any of GCS, and restream telemetry fro one GCS to another, because You cant connect to 1 comport from 2 programs.

MP:

  1. Press ctrl+f to view temp window
  2. Click on mavlink, so restream menu will show up
    image
  3. Choose UDP/TCP client and speed press connect, enter ip/name and port
    If you click write access, it would be possible to control drone from another GCS

Mavproxy
You can either launch Mavproxy with restream from the start via start up option --out. Examples:

mavproxy.py --master=/dev/ttyUSB0 --out=udp:192.168.1.1:14550
mavproxy.py --master=/dev/ttyACM0,115200 --out=/dev/ttyUSB0,57600
mavproxy.py --master=/dev/ttyACM0,115200 --out=COM17,57600
mavproxy.py --master=/dev/ttyACM0,57600 --out=udpbcast:192.168.2.255:14550

Or via console. Module output is strarted by default.
Enter in console

output list

to view current output.
To add new connection:

output add 10.11.12.13:14550

To remove

 output remove 3      # to remove 3rd output

As far as I know Mavproxy gives all access to new output GCS.

i tried to established the connection of pixhawk and R-pi with mission planner using TCP. when i was doing it is seamlessly connecting with mavproxy but not with the mission planner. Will you please tell me the diagnosis that i can perform to establish a connection with mission planner also.

are you use its tcp? not udp?

Hi All,
I am new in this communication protocol field and therefore I want to know that How I can establish communication between BCI system and our ground control station through TCP/IP? Can you help me with this

Thanks:)

So… first up - what’s a “BCI system”?

Secondly, to send data from mavproxy to mission planner one would use
MAVProxy’s “–out” option. e.g. “–out udp:192.16.5.6:3456” (assuming you
can get missionplanner to listen on UDP port 3456 and that’s your IP
address.

Thirdly… why tcp?!

BCI system take it any system which is giving classified output.
TCP(Transmission Control Protocol) is a communication protocol I want to use for establish communication between my classifier output and Ground control station i.e. mission planner.

BCI system take it any system which is giving classified output.

OK… google only tells me “Brain Computer Interface” - which would be
nifty, if a little unlikely given your description :slight_smile:

TCP(Transmission Control Protocol) is a communication protocol I want to use for establish communication between my classifier output and Ground control
station i.e. mission planner.

You almost certainly want to use UDP here. Think about the properties a
TCP connection has (and what properties a UDP link has), and the
properties you want in a live link to a UAV, and consider the mismatch
between the two.

I knew Google will give you that definition…that’s why I told you BCI description according to my application :wink:

I am restricted to use TCP because TCP has several advantages over UDP such as acknowledgement, no duplicates, re-transmission etc.
Anyway thanks for the suggestion about the properties I should to see. :slight_smile:

My doubt is how to establish the communication between classifier system (BCI system) and live GCS.