Report comment

Hi roboberry,

thanks for that guide, it'll help a lot for our donkey car using a raspi.

Unfortunately one thing was not working on my side. In case of being a wifi client the raspi connected to the hotspot on the smartphone but got (or requested) no ip address.
After some searching I found out that this could be done using the command 'dhclient -nw "$wifidev" '. Then, in case of switching to hotspot mode, I kill the dhclient process in function createAdHocNetwork using command 'dhclient -r'.

I refactored the wifi client start into a new function called "startWifiClient" including the wpa_supplicant call as well as the dhclient -nw call.
Then I replaced all wpa_supplicant commands this the function call startWifiClient.

In createAdHocNetwork at first I call the 'dhclient -r'.

Now the switching works on my side. I don't understand why it works on your side without the dhclient calls.

Best regards,