WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Pi Zero 2 and NetworkManager  (Read 2312 times)

Offline kagouraki

  • Newbie
  • *
  • Posts: 20
Pi Zero 2 and NetworkManager
« on: June 24, 2022, 09:37:06 AM »
Hello i have installed the NetworkManager reading older posts.
It works perfectly when in station mode. But when i try to make a Hotspot connection, i get this error :
Code: [Select]
tc@box:~$ sudo nmcli d wifi hotspot ifname wlan0 ssid OpenMFD
Error: Failed to setup a Wi-Fi hotspot: wpa_supplicant does not support Access Point mode

Is there a solution ?

EDIT: I have also 2 more questions.
1)Why is ModemManager running ? i never installed it.
2)how can i delete the 90-nm-thunderbolt.rules file ? pizero 2 has no thunderbolt and i dont need it. It throughs some error when booting and the networkManager extension is loaded.
« Last Edit: June 24, 2022, 09:42:56 AM by kagouraki »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Pi Zero 2 and NetworkManager
« Reply #1 on: June 24, 2022, 12:51:08 PM »
Hi kagouraki
... EDIT: I have also 2 more questions.
1)Why is ModemManager running ? i never installed it. ...
Sure you did. It's a dependency of the  networkmanager.tcz  extension, see:
http://tinycorelinux.net/13.x/armv6/tcz/networkmanager.tcz.dep

Quote
2)how can i delete the 90-nm-thunderbolt.rules file ? pizero 2 has no thunderbolt and i dont need it. It throughs some error when booting and the networkManager extension is loaded.
Rather than deleting it, installing a dummy rules file before  networkmanager  loads should be simpler.
Code: [Select]
tce-load -wil squashfs-tools.tcz
Code: [Select]
mkdir -p pkg/etc/udev/rules.d
Code: [Select]
echo '# nm_thunderbolt placeholder' > pkg/etc/udev/rules.d/90-nm-thunderbolt.rules
Code: [Select]
echo 'GOTO="nm_thunderbolt_end"' >> pkg/etc/udev/rules.d/90-nm-thunderbolt.rules
Code: [Select]
echo 'LABEL="nm_thunderbolt_end"' >> pkg/etc/udev/rules.d/90-nm-thunderbolt.rules
Code: [Select]
mksquashfs pkg no-nm-thunderbolt.tcz -noappend
Code: [Select]
rm -rf pkg
Copy  no-nm-thunderbolt.tcz  to your  tce/optional  directory.
Add  no-nm-thunderbolt.tcz  to the beginning of your  tce/onboot.lst  file.

Now when  networkmanager.tcz  loads, it will see the rules file exists and not copy its version over.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Pi Zero 2 and NetworkManager
« Reply #2 on: June 24, 2022, 12:52:17 PM »
wpa_supplicant needs recompiling - I’ll have a look in the next couple of days.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Pi Zero 2 and NetworkManager
« Reply #3 on: June 25, 2022, 06:41:03 AM »
Updated wpa_supplicant-dbus posted - ap mode not tested.

Offline kagouraki

  • Newbie
  • *
  • Posts: 20
Re: Pi Zero 2 and NetworkManager
« Reply #4 on: June 27, 2022, 03:45:03 PM »
Thank you for the fast response.
The AP loads now and i can see it with my phone. Now the problem is that i cant connect to it. It seems that something is wrong with the password. I set the password with
Code: [Select]
sudo nmcli con modify Hotspot 802-11-wireless-security.psk 11223344and then when i check the connection with
Code: [Select]
nmcli -show-secrets c s Hotspotthere are two dashes in the psk field and not the password i insered.
when i see the config file in
/usr/local/etc/NetworkManager/system-connections/ with nano i can see the psk = 11223344 entry

so somehow the networkManager doesnt read the password from the config file  :(

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Pi Zero 2 and NetworkManager
« Reply #5 on: June 27, 2022, 04:24:52 PM »
Hi kagouraki
Maybe you need to run something like:
Code: [Select]
sudo nmcli connection reload

Offline kagouraki

  • Newbie
  • *
  • Posts: 20
Re: Pi Zero 2 and NetworkManager
« Reply #6 on: June 27, 2022, 04:48:36 PM »
I just tried. Nothing. The same thing

Offline kagouraki

  • Newbie
  • *
  • Posts: 20
Re: Pi Zero 2 and NetworkManager
« Reply #7 on: June 30, 2022, 02:31:54 AM »
Is there something i can do or should i go with raspbian os ?
I have also other problems with piCore.
My waveshare touchscreen is hdmi with i2c touch but i cant make it work in piCore. I should probably open a new thread for the screen but i am just saying.
I would like to go with piCore because of the no sd corruption advantage. But maybe i should go for the raspbian os

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Pi Zero 2 and NetworkManager
« Reply #8 on: June 30, 2022, 02:50:49 AM »
Have you tried to configure the access point using wpa_supplicant directly rather than via networkmanager?

Please start a separate thread for the touchscreen.

Offline gadget42

  • Hero Member
  • *****
  • Posts: 770
Re: Pi Zero 2 and NetworkManager
« Reply #9 on: June 30, 2022, 03:13:11 AM »
very interesting article and the comments are good as well:
https://hackaday.com/2022/03/09/raspberry-pi-and-the-story-of-sd-card-corruption/

this comment was informative as well:
https://hackaday.com/2022/03/09/raspberry-pi-and-the-story-of-sd-card-corruption/#comment-6448160
(and referenced: https://github.com/OneOfTheInfiniteMonkeys/sdinfo)

sharing is caring

20220630-0222-modified-added comment link and reference link
« Last Edit: June 30, 2022, 03:21:50 AM by gadget42 »
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580