Skip to content

Wi Fi support & configuration

Piotr Oniszczuk edited this page Jun 29, 2021 · 3 revisions

Wi-Fi Support

MiniMyth2 supports WLAN connectivity as much as Linux kernel supports WLAN hardware and MiniMyth2 image has desired WLAN firmware (if WLAN chipset requires firmware).

Usage Wi-Fi in MiniMyth2 is a bit tricky as MiniMyth2 by design is state-less. It means all machine specific configuration is:

  • auto-configured by HW auto-detection
  • defined in DHCP offer
  • configured in minimyth.conf

In case of WLAN networking - any communication with external world needs first attaching MiniMyth2 machine to WLAN network. To attach to WLAN network - required WLAN credentials ( SSID and password) needs to be provided. MiniMyth2 is getting WLAN credentials in following way:

  1. trying to mount partition with label boot
  2. if such partition is found, MiniMyth2 mounts it and looks for file minimyth.conf
  3. if file minimyth.conf is found, it looks for WLAN credentials
  4. if WLAN credentials are found - MiniMyth2 tries to connect to WLAN network
  5. if connection is successful, MiniMyth2 goes with standard process (exactly the same like in case LAN connectivity)

If connection is unsuccessful - MiniMyth2 fall-back to LAN interface and continues like with LAN connectivity

Enabling Wi-Fi

To enable WLAN connectivity, pleas do following: insert USB key or SD card with MiniMyth2 image into PC

  1. mount boot partition
  2. open minimyth.conf in editor and edit:
MM_WLAN_SSID=<WLAN_SSID>
MM_WLAN_PASS=<WLAN_Password>
  1. save minimyth.conf file
  2. unmount boot partition

Now You can insert USB key / SD card into MiniMyth2 machine and it should connect successfully to WLAN.

Troubleshooting

In case of unsuccessful WLAN connectivity You can telnet to MiniMyth2 and examine /var/log/iwctl.log

If iwctl.log not shows You any meaningful data, You can try repeat WLAN connection process manually:

  1. telnet to MiniMyth2 machine
  2. type killall iwd to stop iwd daemon
  3. Start verbose iwd daemon by typing iwd -d
  4. Start iwctl by starting new telnet window and typing iwctl
  5. On iwctl command prompt scan for existing WLAN networks by typing station wlan0 scan
  6. Next list discovered WLAN networks: station wlan0 get-networks
  7. If all is OK, You should see Your desired WLAN network so You can connect: station wlan0 connect <Your_WLAN_SSID>. Provide password to Your WLAN - when iwctl will ask for it
  8. Finally You may check for connection status by typing: station wlan0 show

If You will discover any issues at any stage of above - You may switch to telnet session running iwd daemon and look for error messages...

If there is still issue with connecting to WLAN network by IWD software used by MiniMyth2, there is build-in alternative WLAN connection tool: Connman You may try connect with Connman with following procedure:

  1. telnet to MiniMyth2 machine
  2. type killall iwd to stop iwd daemon
  3. Start connman daemon by typing connmand --nodevice=eth0 -n
  4. Start wpa_supplicant by starting new telent window and type wpa_supplicant -u -O /run/wpa_supplicant
  5. Start another telnet widnow and run the command connmanctl You should get the prompt connmanctl>. Type following:
connmanctl> enable wifi
connmanctl> agent on
connmanctl> scan wifi
connmanctl> services
......
{list of wifi networks}
......
connmanctl> connect <your Wi-Fi network from listed above>

This will ask for Wi-Fi password so enter password and type Enter.

If connection is unsuccessful - You can examine the output of connmand, wpa_supplicant and kernel's dmesg to diagnose where the potential issue is.