Servers by jDrones

Edison cann't connect pixhawk2!


(gengzhitao) #1

Hi,all

I installed the Edison module into pixhawk2, and flash apsyns-edison image to Edison, now I can run linux in Edison successfully, and I have set the parameters:
SERIAL2_PROTOCOL = 1
SERIAL2_BAUD = 921
LOG_BACKEND_TYPE = 3

but if I run command below:
spsync@apsync:~/dronekit-python/examples/vehicle_state$ python vehicle_state.py --connect ‘/dev/ttyMFD1,57600’

it print below:
Connecting to vehicle on: /dev/ttyMFD1,57600
link timeout, no heartbeat in last 5 seconds

I am not sure that baut rate, so I change the baut rate, and try another command below:
spsync@apsync:~/dronekit-python/examples/vehicle_state$ python vehicle_state.py --connect ‘/dev/ttyMFD1,921600’

unfortunity, the same error," timeout"

I am confused about it, woule you please give me some hints, thanks in advance…

Gavin


(peterbarker) #2

I installed the Edison module into pixhawk2, and flash apsyns-edison image
to Edison, now I can run linux in Edison successfully, and I have set the
parameters:
SERIAL2_PROTOCOL = 1
SERIAL2_BAUD = 921
LOG_BACKEND_TYPE = 3

but if I run command below:
spsync@apsync:~/dronekit-python/examples/vehicle_state$ python
vehicle_state.py --connect ‘/dev/ttyMFD1,57600’

it print below:
Connecting to vehicle on: /dev/ttyMFD1,57600
link timeout, no heartbeat in last 5 seconds

You can’t sensibly connect directly to the serial device, as cmavnode will
be holding the serial device open.

cmavnode relays onto various other ports you might try opening instead -
try “–connect udp:localhost:9000”, perhaps. See cmavnode.conf for other
ports.


(gengzhitao) #3

Hi,peterbarker

  thanks for your reply. I tried to run the command:

python vehicle_state.py --connect udp:localhost:9000

it print as below:
Connecting to vehicle on: udp:localhost:9000

APM:Copter V3.4-dev (c9bd67e4)
PX4: 44574c48 NuttX: 579e82d4
Frame: QUAD
PX4v2 002F002E 3435510A 38393730
Exception in message handler for HEARTBEAT
mode 0 not available on mavlink definition
Exception in message handler for HEARTBEAT
mode 0 not available on mavlink definition
Exception in message handler for HEARTBEAT
mode 0 not available on mavlink definition
Exception in message handler for HEARTBEAT
mode 0 not available on mavlink definition

I think this log indicate it’s unnormal, so what can I do
I see the cmavnode.conf file, the content as below:
[aseriallink]
type=serial
port=/dev/ttyMFD1
baud=921600
sim_enable=false

[to_mavproxy]
type=udp
targetip=127.0.0.1
targetport=14655
localport=14656
sim_enable=false

[to_dflogger]
type=udp
targetip=127.0.0.1
targetport=14555
localport=14556
sim_enable=false

[to_14550]
type=udpbcast
sim_enable=false
bcastport=14550
bcastip=10.0.1.255
bcastlock=1

[spare_out_0]
type=udp
targetip=127.0.0.1
targetport=9000
localport=9006
sim_enable=false

[spare_out_1]
type=udp
targetip=127.0.0.1
targetport=9001
localport=9007
sim_enable=false

[spare_in_0]
type=udp
targetip=127.0.0.1
localport=9010
sim_enable=false

[spare_in_1]
type=udp
targetip=127.0.0.1
localport=9011
sim_enable=false

thanks a lot!!!

(James Pattison) #4

try 921000 as your baudrate, as this is what you have everything else configured for.


(peterbarker) #5

I think this log indicate it’s unnormal, so what can I do
I see the cmavnode.conf file, the content as below:

Nah, sorry, that’s normal. We’re still discussing potential fixes for the
mavlink-heartbeat message stuff. Gory detils are here:

You’re certainly connected to your vehicle…


(gengzhitao) #6

hi, james, thanks
I have tried the bautrate 921600, unfortunately, have the same log, link timeout!