Understanding SoftAp0

Hey,

I’ve been through bb-wl18xx-tether and understand (mostly) what it is doing. However after boot, once there is an established wlan0 connection I would like to be able to shutdown SoftAp0, then start it up again if, and only if, the wlan0 connection fails.

Questions:

  1. I see functions meant to start it up at boot, are there any pre-written functions to bring it back down in another script?
  2. If not, what order should I undo things
  3. How is this being called during the boot process

Iv’e tried killing hostapd and doing ‘ip link set dev SoftAp0 down’, but doing so seems to cause issues with wlan0 stability, I get more lag with the wlan0 connection.

While I am not new to linux, I am still trying to wrap my head around some of the low level networking and the BeagleBone specific files for the first time.

Thanks,

Matrioux

OK, I tracked down how it is being called during startup, its called by bb-wl18xx-wlan0, which is installed as a systemd service., but the first two questions stand, whats the best way to make SoftAp0 something that can be turned on and off at will via the command line?

That would be a feature that would have to be added to it.

https://github.com/rcn-ee/repos/blob/master/bb-wl18xx-firmware/suite/jessie/debian/bb-wl18xx-tether

Right now there is a global disable:

TETHER_ENABLED

https://github.com/rcn-ee/repos/blob/master/bb-wl18xx-firmware/suite/jessie/debian/postinst#L21

You could boot up with:

TETHER_ENABLED=no

try to connect over wlan0, if failing, then do:

sudo sed -i -e 's:TETHER_ENABLED=no:ETHER_ENABLED=yes:g' /etc/default/bb-wl18xx
then run
sudo /usr/bin/bb-wl18xx-tether

little messy, as we are also messing with usb0.. might be eaiser to
just write your own variation that handles only SoftAp0...

Regards,