@dysri Hi, you may use the
-i, --portal-interface argument to specify the
You may find the list with arguments here: https://github.com/resin-io/resin-wifi-connect/blob/master/docs/command-line-arguments.md
Tha same repository contains all the source code of WiFi Connect as well.
As for using
wlan1 is not plugged in, then I think you may check before starting
wifi-connect for the existence of
wlan1. If it exists then pass
--portal-interface, otherwise pass
An easy way to check for the existence of
wlan1 would be checking the exit code of
ip link show wlan1:
ip link show wlan1
interface = $(if [ $? -eq 0 ]; then echo "wlan1"; else echo "wlan0"; fi)
You may take a look at the example start script we provide, which you will need to modify with such code as above according to your needs: https://github.com/resin-io/resin-wifi-connect/blob/master/scripts/start.sh
Please note that
wifi-connect currently binds the created connection profile to the device hardware address, not the interface name. That is to say, if you plug another dongle, you will need to create a new profile, even if it shows up as
wlan1. This is the default behavior for Desktop Linux systems that use NetworkManager as well.
Please let me know if you have any questions or if you encounter difficulties with setting this up.