This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thread Border Router 1.0.0 won't connect to wifi

I am using the Thread Border Router 1.0.0 on a Raspberry Pi 3B+

I have not been able to connect the RaspPi to our wifi network.

I tried this method first, as described here. Our network is hidden and does not appear in the list returned by iwlist wlan0 scan. I know the SSID and password and used that.

wifi_connect mynetwork mypassword

The network settings remain unchanged and the BorderRouter-AP was still present, and even after rebooting the RaspPi.

pi@raspberrypi:~ $ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.42.0.1 netmask 255.255.255.0 broadcast 10.42.0.255
inet6 fe80::ba27:ebff:fec1:2c66 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:c1:2c:66 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 2893 bytes 738594 (721.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I also tried the method described here. I modified /etc/wpa_supplicant/wpa_supplicant.conf as described in the "Hidden Networks" section.

Again, the network setting remain unchanged and the BorderRouter-AP was still present, and even after rebooting the RaspPi.

I also tried using raspi-config as to set the country code, network SSID, and network password. (I noticed that this method had not effect on the /etc/wpa_supplicant/wpa_supplicant.conf file.)  Still no wifi.

Here is what's in /etc/wpa_supplicant/wpa_supplicant.conf

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
  ssid="myssid"
  scan_ssid=1
  psk="mypassword"
  key_mgmt=WPA_PSK
}

What's wrong?

Mary

  • Yes, that was the first thing I tried.  It does not connect.

  • Hello Mary,

    Still waiting for a reply from our Thread team. I will keep you updated.

     

    BR,

    Edvin

  • Hello Mary,

    I received an explanation today. I suggest that you reload the image file for the bootloader to start with a clean build when you try this. The email I received follows:

    <email>

    The Border Router image uses systemd to start access point during each boot. To disable this feature use the following command:

    $sudo systemctl disable ap-config.service

    Note that the access point is still enabled, but it won't be enabled during the next boot sequence.

     

    The Border Router image uses the NetworkManager module to manage Wifi networks. It is recommended to use this module instead of wpa_supplicant directly.

    To switch off the access point and connect to other networks, use the following commands:

    $ nmcli connection down BorderRouter-AP
    $ nmcli connection add con-name <ssid> ifname wlan0 type wifi ssid <ssid> ipv6.method ignore wifi-sec.key.mgmt wpa-psk wifi-sec.psk <password>

    Connections added to NetworkManager is saved in NVM and is persistent after reboots. For details check the nmcli documentation:

    https://developer.gnome.org/NetworkManager/stable/nmcli.html

    </email>

     

    Try this, and see if you can connect to the hidden network.

    Best regards,

    Edvin

     

  • Yes, this worked, after some corrections.  I corrected a small typo (key.mgmt should be key-mgmt).  Also an additional command is required to bring up the connection:

    $ sudo nmcli con up <ssid>

    I created some scripts to perform these functions which others may find useful.  

    Note: I created these with Notepad++, using UTF8 encoding.  I transferred them to the RaspPi over Ethernet with WinSCP using 'Text' transfer setting.  Of course, you could write them using nano on the RaspPi.

    disable_ap.sh

    #!/bin/bash
    # Script for disabling wifi access point on a Raspberry Pi Border Router
    #
    # Execute this file on the RaspPi with the command:
    # sh disable_ap.sh
    #
    # Encoding: UTF8, use 'Text' for WinSCP transfers
    
    
    echo "Disable access point"
    sudo systemctl disable ap-config.service
    sudo nmcli connection down BorderRouter-AP

    enable_ap.sh

    #!/bin/bash
    # Script for enabling wifi access point on a Raspberry Pi Border Router
    #
    # Execute this file on the RaspPi with the command:
    # sh enable_ap.sh
    #
    # Encoding: UTF8, use 'Text' for WinSCP transfers
    
    
    echo "Enable access point"
    sudo systemctl enable ap-config.service
    
    echo "Reboot for this to take effect"
    

    setup_wifi.sh

    #!/bin/bash
    # Script for setting up wifi on a Raspberry Pi Border Router
    #
    # Execute this file on the RaspPi with the command:
    # sh setup_wifi.sh <SSID> <password>
    #
    
    # Check command line args
    if [ "$#" -ne 2 ]; then
    	echo "Error: 2 arguments required, SSID and password"
    	exit
    fi
    
    echo "Add new connection" $1 $2
    sudo nmcli connection add con-name $1 ifname wlan0 type wifi ssid $1 ipv6.method ignore wifi-sec.key-mgmt wpa-psk wifi-sec.psk $2
    sudo nmcli connection up $1
    nmcli connection show
    
    echo "Done"

    Thanks for the help.

    Mary

  • Hello Mary,

    Thank you for the typo correction. It is very helpful with this description if someone else wants to do the same.

    Best regards,

    Edvin

Related