Servers by jDrones

Pixhawk2.1 Edison APSync internet access using a Mac?

pixhawk2

(harvey) #1

Hi

The Mac ethernet is connected to the internet. The Mac wifi has been connected to the Edison/APSync latest image.

Internet Router 192.168.0.254
Mac NIC ethernet 192.168.1.65
Mac NIC wifi 10.0.1.38
APSync/Edison 10.0.1.128

on the Mac added ipforwarding
sudo sysctl -w net.inet.ip.forwarding=1

I have ssh into the Edison/APSync and added the gateway i.e.the Mac NIC wifi IP address.

root@apsync:# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.2.0 * 255.255.255.0 U 0 0 0 usb0

route add default gw 10.0.1.38 wlan0

root@apsync:# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.0.1.38 0.0.0.0 UG 0 0 0 wlan0
default 10.0.1.38 0.0.0.0 UG 0 0 0 wlan0
10.0.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.2.0 * 255.255.255.0 U 0 0 0 usb0

From the APSync/Edison I can’t ping the internet router 192.168.1.254 or the internet e.g. IP 8.8.4.4

Any ideas why i’m not getting successful ping test?


(peterbarker) #2

route add default gw 10.0.1.38 wlan0

That’s some pretty old-school routing right there :wink:

From the APSync/Edison I can¢t ping the internet router 192.168.1.254 or
the internet e.g. IP 8.8.4.4

Any ideas why i¢m not getting successful ping test?

Have you run tcpdump on the interfaces to see where the traffic is going?

repo:

at this point, MY LINUX HOST has a network interface corresponding

to the USB CDC device provided by edison. I added an address and

NAT rule - on the host machine - to provide internet access to

edison:

IFACE=enp0s20u2u2c2
sudo ip a a 192.168.2.1/24 dev $IFACE
sudo iptables -t nat -A POSTROUTING --source 192.168.2.15/24 -j SNAT
–to-source 192.168.1.194

add a default route from edison:

sudo ip r a default dev usb0 via 192.168.2.1


(harvey) #3

Didn’t have any luck with http://joshuawise.com/horndis Mac ethernet over usb tool when using the APSync flash image i.e. Edison NIC didn’t pop up in the Mac system network preferences when connected. Hence I used the Edison Wifi instead of Edison usb connector. Using Mac version High Sierria 10.13.5 and latest Horndis version.

Tcpdump not showing anything useful. yet.

New to NAT rules for iptables. Was expecting the packet routing to exist on the mac(to link the 2 NICs) not the Edison host. ?