Hans,

Many thanks for the response. It gave me a couple of important clues.

It turns out that the problem isn’t the configuration files. As you say, they 
are actually created automatically when you connect manually with connmanctl. 
However, wlan0 still wasn’t connecting at boot time after rebooting. I saw in 
the logs: “wlan0: link is not ready”.

It looks like creating a script/service to connect at boot time with connmanctl 
is the fix for this. You can read about that here:
https://groups.google.com/d/msg/beagleboard/jFJ_cOdh0Zk/JTImXUYWCQAJ

The end result of what is described there (and in the wildly/criminally out of 
date Adafruit github repo) is that two files are created:

/opt/wifi-reset/wifi-reset.sh
This is what is in that file:
-----------------------
sleep 30
connmanctl connect wifi_*_managed_psk
----------------------

and

/lib/systemd/system/wifi-reset.service
This is what’s in that file:
-------------------
[Unit]
Description=Wireless Network Reset

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/bash /opt/wifi-reset/wifi-reset.sh

[Install]
WantedBy=multi-user.target
--------------------------------

If you manually connected to wifi using connmanctl before rebooting, wifi 
should be connected after reboot now. As mentioned in that article, the 
ethernet port must be disconnected for wifi to connect at boot time.

A couple of notes:


  *   ‘ifup wlan0’ and ‘ipdown wlan0’ do not work for some reason. The new 
commands are (supposedly) ‘ip link set wlan0 up/down’.
  *   wpasupplicant isn’t used for controlling wifi in the latest images (as of 
March 2020, at least)

Thanks again for the response and help, Hans!

Llew


Op zondag 15 maart 2020 16:40:62 UTC+1 schreef Hans Leeuw:

Oh and what also helps to make it persistent is to remove all other directories 
with other wifi connections from the /var/lib/connman/ directory and only leave 
the one that you want to use.



Op zondag 15 maart 2020 16:39:14 UTC+1 schreef Hans Leeuw:
Hi Llew,

I am using connman to connect. It remembers the last network it was connected 
to and you can set it to auto connect.

A simple connection example:
https://www.ev3dev.org/docs/tutorials/setting-up-wifi-using-the-command-line/

You can also configure it to have a fixed ip and other configurations, eg:




# connmanctl config wifi_xxxxx_xxxxx_managed_psk --ipv4 manual 192.168.2.x 
255.255.255.0 192.168.2.1

# connmanctl config wifi_xxxxx_xxxxx_managed_psk --nameservers 192.168.2.1

# connmanctl config wifi_xxxxx_xxxxx_managed_psk --ipv6 off



Or even set it to connect to a hidden SSID by going directly into the 
configurations file.  /var/lib/connman/



cd /var/lib/connman/

sudo su

cd wifi_xxxxx_xxxxx_managed_psk#

And add Hidden=true to the settings file using your favorite text editor.

Hope that helps.

Best Hans.


Op zondag 15 maart 2020 15:37:40 UTC+1 schreef 
[email protected]<mailto:[email protected]>:
I've been trying for several days and I can't find any resources that 
definitively tell you how to configure wifi that persists after a reboot. What 
are the proper configuration files are and what needs to be in those files?

AdaFruit says to change the /etc/network/interfaces file. That doesn't work. 
https://learn.adafruit.com/setting-up-wifi-with-beaglebone-black

There are several references to "supplicant" but that doesn't seem to be 
current. Or is it?

This tutorial is a tease but it doesn't work either. It does mention that wifi 
won't connect if Ethernet is connected at boot, but I'm not sure if it's for 
this specific adapter or for BeagleBone Blacks in general. 
https://docs.google.com/document/d/1-CIGQYdk8ZhU3D3UCNn70jc7C9HdXvEZAsiNW71fGIE/edit#heading=h.ftleo32gu3jr

I've seen dozens of pages tell you how to use connmanctl to manually get a 
connection to work. That works flawlessly.

But I have found nothing that tells you how to configure connman so that wifi 
is connected at boot time.

I am using the Debian 9.9 2019-08-03 4GB SD IoT image. Unfortunately, repeated 
attempts to update the board with the LXQT image failed.

Can someone please help?

Thanks,

Llew Roberts
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google 
Groups "BeagleBoard" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/beagleboard/1o9h87ijuuA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/fb159725-c761-452b-a85d-40f3c30b58b8%40googlegroups.com<https://groups.google.com/d/msgid/beagleboard/fb159725-c761-452b-a85d-40f3c30b58b8%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/DM5PR13MB13873F643F3EB4A68968AD39ABF80%40DM5PR13MB1387.namprd13.prod.outlook.com.

Reply via email to