Raspberry Pi Mavlink WiFi Bridge

Home Forums Tech Support Raspberry Pi Mavlink WiFi Bridge

Tagged: 

Viewing 7 reply threads
  • Author
    Posts
    • #509
      Spitfire76
      Participant

      I just purchased the app and I am trying to get it to connect to my APM 2.6 via this bridge.

      http://dev.ardupilot.com/wiki/making-a-mavlink-wifi-bridge-using-the-raspberry-pi/

      I know that the bridge works since I can connect when using a laptop running Mission Planner. The Mav Pilot is configured with the IP address of the RP, protocol is UDP and the port is 14550 but remains in “connecting” status and I don’t see any traffic coming in from the iPhone when monitoring on the RP with wireshark. If I run a ping app on the iPhone to the RP IP address I do see the icmp traffic so I know that the iPhone can send and receive UDP packets to the RP. Any help would be appreciated.

    • #510
      Spitfire76
      Participant

      I got it to work!. Since I was not seeing any UDP traffic originating from the iPhone I assumed it was waiting to receive traffic from the APM via the bridge and maybe the bridge was not sending it. Further investigation revealed that the bridge was also waiting for traffic on port 14550 so neither side was talking. I simply changed the /etc/init.d/mavgateway file from this

      DAEMON_ARGS=”–master=/dev/ttyUSB0,57600 –out=udpin:0.0.0.0:14550 –daemon”

      to this

      DAEMON_ARGS=”–master=/dev/ttyUSB0,57600 –out=udp:192.168.1.9:14550 –daemon”

      where the IP address above is the iPhone. I’ll do some further testing but it looks promising.

    • #511
      Bill B
      Keymaster

      Thanks for posting. I’ll check the code as MAPilot should send packets to the set UDP port and IP address.

      Great that you have it working. Bill

    • #516
      Spitfire76
      Participant

      I did some further tests and it really does look like Mavpilot is waiting for the other side to send first. Its not a real problem providing I make the changes above to the mavgateway file. Also to ensure that the iPhone is aways assigned the same IP address I made the following changes to the /etc/dhcp/dhcpd.conf file.

      host iphone {
      hardware ethernet xx:xx:xx:xx:xx:xx;
      fixed-address 192.168.42.9;

      where xx:xx… is the Mac address of my iPhone

    • #517
      Bill B
      Keymaster

      I forgot, if you set the target IP in the host settings, and press the RDS toolbar button on the Dashboard it will send data to the RPi and that should trigger the sending of information. That if the PI is configured to send data to client that send a datagram.

      RDS means Request Data Streams

    • #518
      Spitfire76
      Participant

      I reverted back to the original configuration and tried the RDS but did not get telemetry data on the dashboard. I also have a small python script that simply displays any UDP data that it receives on port 14550 and nothing is displayed so I don’t think RDS is working.

    • #519
      Bill B
      Keymaster

      I suspect that the Raspberry Pi isn’t setup for this ‘auto’ connection. I’ll look at the instructions and maybe setup the RPi as a bring. I have the stuff, just have’t done it.

      I think you are right in that even with RDS, MAVPilot needs that first UDP packet from the Pi to know what address to send it to. And that’s the bit that is broken.

      I’ll try and find some time to get a fix, but you have a solution for now, so at least you are not blocked

    • #527
      Spitfire76
      Participant

      Thanks Bill, the workaround seems to work just fine so no hurry. Also if you are looking for more folks to test any new releases please add me to that list.

      • #529
        Bill B
        Keymaster

        Thanks I added you to the beta testers list.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.