Precisely. hostapd is working. my desktop computer shows the wifi as connected successfully. dhcp hands an IP on the correct subnet to my desktop. I can ping the desktop from the imx6, but I cannot ping the imx6 from the desktop.
steve@trabajonuevo ~ $ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default tus-router.zong 0.0.0.0 UG 0 0 0 enp0s25
default 192.168.157.1 0.0.0.0 UG 0 0 0 wlp3s0
link-local * 255.255.0.0 U 0 0 0 enp0s25
192.168.157.0 * 255.255.255.0 U 0 0 0 wlp3s0
192.168.220.0 tus-router.zong 255.255.255.0 UG 0 0 0 enp0s25
192.168.221.0 tus-router.zong 255.255.255.0 UG 0 0 0 enp0s25
192.168.222.0 * 255.255.255.0 U 0 0 0 enp0s25
192.168.223.0 tus-router.zong 255.255.255.0 UG 0 0 0 enp0s25
sh-4.4# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.157.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.157.0 * 255.255.255.0 U 0 0 0 eth0
what I’m expecting to see also (must be cause usb cable is unplugged)
10.157.1.0 * 255.255.255.0 U 0 0 0 usb0
what I actually see once I plug in the usb cable:
sh-4.4# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.157.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.157.0 * 255.255.255.0 U 0 0 0 eth0
192.168.157.0 * 255.255.255.0 U 0 0 0 usb0
I think the systemctl dhcpd is too stupid and it’s trying to hand out leases for all three i/f’s even though it’s spec’d seperately in /lib/systemd/network/rndis.network and /lib/systemd/network/hostapd.network (and /lib/systemd/network/eth0.network doesn’t exist).
The config files I just mentioned specify different subnets in each file, but eth0 & usb0 are appearing on the hostapd.network subnet!
rndis.network:
[Match]
# We use type since device name depends on Kernel version
# udevadm info --query=property /sys/class/net/usb0
Type=gadget
[Network]
Address=10.157.1.1/24
Gateway=
DHCPServer=yes
[DHCPServer]
EmitDNS=no
EmitNTP=no
EmitRouter=no
EmitTimezone=no