Serial TTL to Ethernet adapter you can get from ebay.
The UART ETH is a converter that provides an easy way for the UART devices to communicate using Ethernet. It supports multiple serial port and can be configured via web page. Best of all, it supports UDP.
Connect TTL adapter to your computer using Ethernet cable and run this program (Old Version)
Connect TTL adapter to your computer using Ethernet cable and run the configuration tool (Thanks to @UAVpilot for providing link to updated USR software)
- module IP = just pick a random IP adress within the same RPI Ethernet subnet.
- Gateway = RPI Eth0 ip address
- Baudrate = Use same baud rate as descibred in Mission Planner for Telemetry Port.
- Port= Default 14550
- Destination IP = RPI ip address.
Example config. USR-TCP232-Setup V4.2.2
Download and install dnsutils to your RPI
sudo apt-get install dnsutils
Download the udp_redirect file and compile it in your RPI with the following code:
gcc -o udp_redirect udp_redirect.c
./udp_redirect our-ip our-port send-to-ip send-to-port
./udp_redirect our-ip our-port (echo mode)
./udp_redirect 0.0.0.0 53 192.168.0.1 53
./udp_redirect 0.0.0.0 7
You could also make a script such as bellow and run it in boot up sequence.
This script will get the IP from your dns address and use that ip i conjunction with udp_redirect.
ip=`dig +short YOUR_DNS_ADDRESS`
/root/udp_redirect 0.0.0.0 14550 $ip 14550 &