The goal of this project is to control (fly) my quadcopter as from a normal pc with a usb joystick or gamepad. The APM Planner ground station software from DIYdrones support IP based telemetry via UDP. The arducopter firmware has build in telemetry code and a dedicated serial connection to send and recieve all data. So we just have to add a serial to wifi module.
My choice is the Lantroni MatchPort® b/g module. Because it can handle high data rates, it has a good tx power and you can connect any type of wlan antenna to maximaze tx/rx distance. But these features make it a bit more heavy then other modules. Compared to other modules it consumes a lot more. But if you want speed, power and distance then you have to deal with this.
Wired Ethernet-to-wireless bridging
Bulletproof security with IEEE 802.11i-PSK,WPA-PSK, TKIP and optional 256-bit AES end-to-end encryption
Full TCP/IP stack,web server and Windows deployment software
wlan data rates: 1Mbps up to 54Mbps
Two serial channels: up to 921 Kbps data rate
8 real time general I/O configurable pins
Output Power: 14dBm +2.0 dBm
Receive Sensitivity: -91dBm @ 1Mbps
To get this thing to work with the the diydrones ardupilot I configured it this way:
- cpu performance: low -> this is more than enough performance the handle everything it has to do.
- wlan power management: OFF -> default it is ON but this gives laggy/sturring data stream. Working with udp we want a steady smooth data stream. So make sure to set this to OFF
- wlan data tx rate -> 1mbps -> this is more then enough speed, setting it to 1mbps will give you max range.
- serial 1 protocol: RS232 -> note that is will operate at 3.3v TTL level
- serial 1 baud rate: 57600 -> this is the default confiration in the ardupilote firmware
- enable packing -> enabled (gap time 12ms) -> if you do not enable this fuctions the wifi module will tx data only when the MTU data block is full (1400b) and that will cause a hughe lag in our data stream. So enable this function.
- match 2 byte sequence: yes, 0D & 0A -> adding this will force the wifi to tx data when ar CRLF arrives from the serial data comming from ardupilot.
- send frame immediate: yes
documents about this module can be found on the lantronix website or my google drive