For my current project, I would like to send telemetry/commands between the AMP2.0 and the computer via ethernet/wifi. The ethernet connection would replace the serial connection typically used by most folks. If I could find where the call to "Serial3.write()" occurs in the code, I could replace it with "Udp.sendpacket()", or something similar. Does anyone have any suggestions?
You need to be a member of diydrones to add comments!
Replies
I am not into programming so if that's where your going. I have nothing to add. But since the subject was Ethernet and Mavlink I couldn't help but jump in and say that I got my Mavlink data running over Ethernet here in my home. I am planning to build it into my ground station so I can have my tablet connected wirelessly to my hexa. It was dead simple to do, so simple I wish I had done it sooner.
I bought a second air module from Ebay and set it to the same Netid as my original equipment.
Then I bought one of these from ebay
http://www.ebay.com/itm/RS232-TTL-to-Ethernet-TCP-IP-RJ45-Converter...
I wired them together with a 5vdc supply and plugged it into my router.
the only issue I had was the software to configure it. The software sucks as its Chinese translated to English so its pretty disjointed. But once I figured it out. I made a UDP connection to the hexa and it works great.
Next step is to setup streaming video and then I can bung it all into a ground station. Wa hooo.
That looks like a perfect solution. This is especially good if you want to push telemetry over the internet.
Yes I agree.
I am going to play with it further in teh coming months as I beleive its a cool way to have the copter deliver telemetry data and as well streaming video so friends can watch it in other cities.
Perhaps one day even establish a webpage with live feeds from the device. Who knows. Sky is the limit.
Right now I just want to plug the whole thing into a base station so my table won't need to be hard wired to the reciever.
I've been using 3DR radios in addition to my wifi, which is a pain. I'm going to get back on this and I will share my results when I have them.
Another project I'll be attempting: displaying video from an IP camera on the HUD. I think there is a growing interest in using wifi devices, so these need to be done!
I have yet to discover how the code works in this respect, but I believe I've found a simple work-around solution: a UART to Ethernet converter. The code stays just as it is, and the data is converted according to the settings on the converter. Win win.
WIZnet W5100 Network Module with Mag Jack - WIZ811MJ
You'll find everything goes through the MAVLink library, but that in turn calls user-supplied functions to actually send to serial port using the FastSerial library. MAVLink facilitates "channels" which are virtual links rather than directly coding to ports. It's designed to be a portable protocol that compiles readily on a range of systems.
See http://qgroundcontrol.org/mavlink/start - there's a link to some simple implementation code. Then you have to figure out how it's hooked into ArduPilot and modify it.
One nice thing about going UDP is the ethernet module will have its own buffer big enough for a whole packet, and probably several packets. That can free up time/space constraints on the APM depending if/how you take advantage of it.
... in other words, does anyone know what changes are necessary to make Mavlink communicate over ethernet instead of serial?