While testing PAN I had an issue with my PC using the wrong address for the PAN network. It wasn't getting the DHCP server replies so was using some random address. This was caused by having another wifi network interface connected on the device at the same time. It was added later and had changed the default interface used for sending data.
I expect everything to route data correctly when IP addresses are assigned, so we just need to make sure the DHCP server sends it's replies on the right network. Add accessors for getting the interface from bnep and setting it in the dhcp server. Then fix this up in the PAN example. I can see from logging in the DHCP server and lease details on my PC that this works as expected.
Thanks. Yes, definitely works. I have to reboot my Windows PC to get it to forget the address it's got in the past, but with the fix it's getting the right address.
While testing PAN I had an issue with my PC using the wrong address for the PAN network. It wasn't getting the DHCP server replies so was using some random address. This was caused by having another wifi network interface connected on the device at the same time. It was added later and had changed the default interface used for sending data.
I expect everything to route data correctly when IP addresses are assigned, so we just need to make sure the DHCP server sends it's replies on the right network. Add accessors for getting the interface from bnep and setting it in the dhcp server. Then fix this up in the PAN example. I can see from logging in the DHCP server and lease details on my PC that this works as expected.