0

Need to transmit and receive data(TCP/IP) between 2 raspberry through serial tx/rx pins (/ttyAMA0). Best way to do it? Better if this will be done from kernel space. Thanks!

0

sudo slattach -p slip -s 115200 -v -d /dev/ttyAMA0 //both

sudo ifconfig sl0 192.168.11.245 pointtopoint 192.168.11.246 // mirror ip on client

//host config

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -A FORWARD -i sl0 -o wlan0 -j ACCEPT

iptables -A FORWARD -i wlan0 -o sl0 -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.