Home › Forums › Tech Support › Raspberry Pi Mavlink WiFi Bridge
Tagged: RaspberryPi
- This topic has 8 replies, 2 voices, and was last updated 8 years, 6 months ago by
Bill B.
-
AuthorPosts
-
-
February 20, 2016 at 16:06 #509
Spitfire76
ParticipantI 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.
-
February 20, 2016 at 17:23 #510
Spitfire76
ParticipantI 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.
-
February 21, 2016 at 06:15 #511
Bill B
KeymasterThanks 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
-
February 28, 2016 at 06:32 #516
Spitfire76
ParticipantI 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
-
February 28, 2016 at 20:59 #517
Bill B
KeymasterI 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
-
February 29, 2016 at 07:18 #518
Spitfire76
ParticipantI 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.
-
February 29, 2016 at 07:23 #519
Bill B
KeymasterI 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
-
March 1, 2016 at 06:40 #527
Spitfire76
ParticipantThanks 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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.