Trouble interfacing Telem2 port with Intel Edison

Hi,

I’m trying to get mavproxy to work serially with the Pixhawk on the Intel Edison. I flashed the latest firmware in Mission Planner (Arducopter 3.2.1). Followed this tutorial, everything is working; however, when I try to test the connection, I’m met with a simply MAV prompt without any indication that the edison is communicating with the drone. Parameters for serial 2 in mission planner are 57600 baud, and I have it set to GCS Mavlink. Any ideas?

I have the same problem. The Pixhawk is in AUTO. I confirmed that the baud rate and protocol are correct in APM Planner 2. I’ve connected GPIO UART1 to TELEM2 on the Pixhawk. This is what I get:

radagan@ubilinux:~$  mavproxy.py --master=/dev/ttyMFD1,57600 --rtscts
Connect /dev/ttyMFD1,57600 source_system=255
Logging to mav.tlog
libdc1394 error: Failed to initialize libdc1394
Failed to load module: No module named terrain. Use 'set moddebug 3' in the MAVProxy console to enable traceback
Running script /home/radagan/.mavinit.scr
-> module load droneapi.module.api
DroneAPI loaded
Loaded module droneapi.module.api
MAV> 

Is this what your seeing?

I ignored a couple of errors because they were also in the tutorial.

I also noticed this post that might be related, since I’m getting that error too: viewtopic.php?f=81&t=12373

I ended up switching to PX4 firmware, since it has more integration with ROS. However, it looks as though your serial isn’t initialized on the edison. Are you using ubilinux, or yocto?

Regardless, here’s a link to the code in order to instantiate UART1 on the edison. Make sure you run it as root! And be aware, it resets after every reboot, so I made a boot script that runs it whenever the edison is powered on.

communities.intel.com/message/255427

Lemme know if it works.

Hi Adrian, thanks for pointing me to that post. It did help, as I was not handling gpio initialization properly. Unfortunately, I still have the same problem…

I am running the edison under ubilinux. I set the UART port as follows:

root@ubilinux:/sys/class/gpio# export gpio130
root@ubilinux:/sys/class/gpio# export gpio131
root@ubilinux:/sys/class/gpio# echo 131 > /sys/class/gpio/export 2>&1
root@ubilinux:/sys/class/gpio# echo mode1 > /sys/kernel/debug/gpio_debug/gpio131/current_pinmux
root@ubilinux:/sys/class/gpio# echo out > /sys/class/gpio/gpio131/direction
root@ubilinux:/sys/class/gpio# echo 0 > /sys/class/gpio/gpio131/value
root@ubilinux:/sys/class/gpio# echo 130 > /sys/class/gpio/export 2>&1
root@ubilinux:/sys/class/gpio# echo mode1 > /sys/kernel/debug/gpio_debug/gpio130/current_pinmux
root@ubilinux:/sys/class/gpio# echo in > /sys/class/gpio/gpio130/direction

I then edited the Mavproxy script to “set mod debug 3” as suggested.

Running it now give this curious error right at the end:

Running script /root/.mavinit.scr
-> module load droneapi.module.api
Traceback (most recent call last):
  File "/usr/local/bin/mavproxy.py", line 260, in load_module
    m = import_package(modpath)
  File "/usr/local/bin/mavproxy.py", line 390, in import_package
    mod = __import__(name)
ImportError: No module named mavproxy_droneapi.module.api

DroneAPI loaded
Loaded module droneapi.module.api
MAV> 

I looked through the list of modules in the Mavproxy source and there’s not a mavproxy_droneapi in there. Doesn’t seem to be in the DroneAPI project either, unless I missed it. I am new to python, so it could be something I’m not doing right.

Is the example page from Kevin simply broken and maybe out of date?

Any updates on this?

I am trying to get a intel edison to be a companion computer for the pixhawk (apm firmware). I am using J18 pin 13, J19 pin 8 and 3 for the serial communication pins (this should be uart1). I have tested the pin connections and a have done loop back test and I believe that it is possible for the intel edison to recieve mavlink packets from the pixhawk. The intel edison is connect to telem2 and I have set the correct baudrates for both the intel edison and the pixhawk. The pixhawk is configure for mavlink as well.

My software setup is as follows I have ubilinux on board the intel edison with ROS. I am trying to use Roscopter node (communities.intel.com/message/265412) I have the latest adrucopter firmware uploaded through mission planner on the pixhawk. I don’t know what else to try. I have been working on this for sometime now and would really appreciate any help or guidance.

Thanks,
JB