start-os icon indicating copy to clipboard operation
start-os copied to clipboard

[bug]: WiFi on RaspberryPi - Country selection doesn't stick and continually re-prompts

Open gStart9 opened this issue 1 year ago • 7 comments

Prerequisites

  • [X] I have searched for existing issues that already report this problem.

Server Hardware

Pi (4 and 8GB)

StartOS Version

0.3.5.1

Client OS

Linux

Client OS Version

Debian 12

Browser

Firefox

Browser Version

120

Current Behavior

In the web-UI on a Pi, under System > WiFi, even after successfully selecting a Country, the UI prompts the user to select it again: image ^Note in this screenshot that the country is successfully sent to the backend.

Even after selecting a Country AND successfully connecting to a wifi AP, the UI prompts the user to select their country again: image

No real errors in the browser console to speak of: image Okin reported this error in the browser console:

main.db4020b2e4a1127a.js:1 ecode: -32600error: code: -32600data: "missing field country"message: "Invalid Request"[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ ()valueOf: ƒ valueOf()defineGetter: ƒ defineGetter()defineSetter: ƒ defineSetter()lookupGetter: ƒ lookupGetter()lookupSetter: ƒ lookupSetter()proto: (...)get proto: ƒ proto()set proto: ƒ proto()message: "RPC ERROR: Invalid Request\n\nmissing field country"[[Prototype]]: Objectconstructor: class egetMessage: ƒ getMessage()[[Prototype]]: Object (anonymous) @ main.db4020b2e4a1127a.js:1 main.db4020b2e4a1127a.js:1 ecode: -32600error: {code: -32600, message: 'Invalid Request', data: 'missing field country'}message: "RPC ERROR: Invalid Request\n\nmissing field country"[[Prototype]]: Object (anonymous) @ main.db4020b2e4a1127a.js:1

Expected Behavior

Users expect for their country selection to stick.

Steps to Reproduce

Boot up a pi on 0351 System > Wifi Attempt to select your country

Anything else?

No response

gStart9 avatar Dec 26 '23 21:12 gStart9

https://github.com/Start9Labs/start-os/pull/2283/files ^this might be related. I know we fixed a similar issue before with crda (and a command):

/usr/lib/embassy/scripts/chroot-and-upgrade
echo "options cfg80211 ieee80211_regdom=US"  >  /etc/modprobe.d/cfg80211.conf
apt update
apt install crda
exit

I noticed crda is missing from (what I presume is) the new version of that file: https://github.com/Start9Labs/start-os/blob/v0.3.5.1/build/dpkg-deps/depends

gStart9 avatar Dec 26 '23 22:12 gStart9

After speaking with George, we decided it best for me to add the findings from testing the WiFi connectivity for my Dell Inspiron 15 3000 with 8GB RAM & 1 TB HDD (StartOS v0.3.5.1):

  • After restarting the Dell laptop 3 times & running through the WiFi process twice per restart, it has now connected to wifi. However, the Country has switched to US -United States but is working.
  • The Dell however doesn't stay in the loop as is the experience with the pi.
  • Once I disconnect the Ethernet cable on the Dell the WiFi only works if the country is US. So could it be that the other codes just don't get enforced & are NULL?
  • I select Namibia, after a few tries it has it saved with the Green Tick but then after I disconnect the ethernet cable the server is disconnected from the internet.

What I did then was plug the ethernet cable back in & it still showed that the wifi had the green tick. So I restarted the server, with the ethernet still plugged in, went back to wifi & saw the green tick, then disconnected the ethernet again & this time it stayed on Wifi.

That was when I realised the country had switched to US like in the screenshot, even though I'm in Namibia. Screenshot 2023-12-27 at 12 36 18 AM Screenshot 2023-12-27 at 12 37 45 AM Screenshot 2023-12-27 at 12 36 59 AM Screenshot 2023-12-27 at 12 15 14 AM

BigBossRabbit avatar Dec 27 '23 08:12 BigBossRabbit

Looks like raspberry pi requires this specific version of the package: http://archive.raspberrypi.org/debian/pool/main/w/wireless-regdb/

dr-bonez avatar Jan 03 '24 23:01 dr-bonez

@BigBossRabbit are you on the nonfree iso?

dr-bonez avatar Jan 10 '24 21:01 dr-bonez

@BigBossRabbit are you on the nonfree iso?

Yes, I believe so. I've been running the machine strictly on WiFi since this test was done.

BigBossRabbit avatar Jan 11 '24 05:01 BigBossRabbit

@gStart9 @BigBossRabbit please test this once we have a 036 Ras Pi image.

MattDHill avatar Jul 30 '24 17:07 MattDHill

@MattDHill will definitely do. My RasPi is ready & waiting 🫡

BigBossRabbit avatar Jul 31 '24 11:07 BigBossRabbit