Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFi Connect Issue #142

Closed
Tissy opened this issue Aug 22, 2024 · 12 comments · Fixed by #143
Closed

WiFi Connect Issue #142

Tissy opened this issue Aug 22, 2024 · 12 comments · Fixed by #143

Comments

@Tissy
Copy link

Tissy commented Aug 22, 2024

Anyone seen or aware of this issue with wifi-connect please?

The WiFi AP is broadcast as it should, I appear to be able to connect to the WiFI, however no landing page is displayed which would enable me to select the access point.

This is what am I seeing in the logs...

2024-08-22T13:49:15+01:00  wifi-connect  Starting WiFi Connect
2024-08-22T13:49:15+01:00  wifi-connect  Starting WiFi Connect
2024-08-22T13:49:16+01:00  wifi-connect  [<unknown>:WARN] Undefined device type: 32
2024-08-22T13:49:16+01:00  wifi-connect  WiFi device: wlan0
2024-08-22T13:49:16+01:00  wifi-connect  Access points: ["vodafoneXXXXXX", "DIRECT-1E-HP Laser 178nw", "EE WiFi", "BT-XXXXXX", "PLUSNET-XXXXXX", "SKYXXXXX", "EE WiFi-X"]
2024-08-22T13:49:16+01:00  wifi-connect  Starting access point...
2024-08-22T13:49:17+01:00  wifi-connect  Access point 'AS1-L_WiFi' created
2024-08-22T13:49:17+01:00  wifi-connect  Starting HTTP server on 192.168.42.1:8181

Many thanks :)

@shawaj
Copy link
Collaborator

shawaj commented Aug 22, 2024

@Tissy when you are connected to the WiFi AP, what does it show if you access 192.168.42.1:8181 in a browser?

@Tissy
Copy link
Author

Tissy commented Aug 22, 2024

Hi @shawaj , thank you for your reply.

When I connect to that IP, the screen is just blank, so nothing is displayed.

@shawaj
Copy link
Collaborator

shawaj commented Aug 22, 2024

Ah ok. Maybe it was a result of #130 🤔

Are you using a raspberry pi with onboard WiFi?

@Tissy
Copy link
Author

Tissy commented Aug 22, 2024

That looks to be a different issue as all the code is deploying and the service runs, just no portal page.

Yes, RaspberryPi 4 with onboard WiFi.

@shawaj
Copy link
Collaborator

shawaj commented Aug 22, 2024

What I meant was, that change moved the WiFi connect to a local implementation rather than upstream. And #114 changed it from kiosk.

This is a new install? Or it's updating a previous one?

For the time being, you can auto-add the WiFi credentials to the balena image using their "Deploy with Balena" dialog... If you toggle the advanced toggle...
Screenshot_20240822_162034_Chrome

You should then be able to add pre-configured WiFi credentials.

@shawaj
Copy link
Collaborator

shawaj commented Aug 22, 2024

Sorry, wrong screenshot... It's the "Add Device" screen where you can add WiFi credentials...

Screenshot_20240822_162412_Chrome

@shawaj
Copy link
Collaborator

shawaj commented Aug 22, 2024

@Tissy did you modify the WiFi AP name? As yours seems to be AS1-L_WiFi instead of balenaWiFi?

Anyway, I have managed to reproduce the same issue...
Screenshot_20240822_171114_Chrome

No idea why it's happening but will poke around

@shawaj
Copy link
Collaborator

shawaj commented Aug 22, 2024

Think this is the issue: balena-os/wifi-connect#588 (comment)

Will find a working version and hard-code something

@shawaj
Copy link
Collaborator

shawaj commented Aug 22, 2024

It seems v4.4.6 is the latest working version currently... https://github.com/balena-os/wifi-connect/releases/tag/v4.4.6 however this is quite old.

So I've created a forum post here... https://forums.balena.io/t/balena-wifi-issue/371182

And I think what I'll do is copy the repo UI folder into the correct location as a temporary fix

shawaj added a commit to shawaj/balena-ads-b that referenced this issue Aug 22, 2024
shawaj added a commit to shawaj/balena-ads-b that referenced this issue Aug 22, 2024
Temporary fix for ketilmo#142
- pull in required changes from balena-os/wifi-connect#566
- increase timeout from 120 seconds to 180 seconds
@shawaj
Copy link
Collaborator

shawaj commented Aug 22, 2024

Ok created #143 as a temporary fix until this upstream PR gets pulled in... balena-os/wifi-connect#566

I tested locally and was able to setup wifi and captive portal showed correctly.

shawaj added a commit to shawaj/balena-ads-b that referenced this issue Aug 22, 2024
Temporary fix for ketilmo#142
- pull in required changes from balena-os/wifi-connect#566
- increase timeout from 120 seconds to 180 seconds

Closes: ketilmo#142
@Tissy
Copy link
Author

Tissy commented Aug 23, 2024

That's absolutely brilliant @shawaj , I do indeed now have the portal web page running, thank you very much!
Hopefully Balena will merge soon !
Out of interest, once Balena is connected to an AP using the captive portal, is there a way within Balena cloud to tell it to ignore / reset any existing connections please? For example, whilst testing, I'd like to go through the setup process from the start, but have to keep changing my WiFi SSID for it to "forget" the existing AP.

@shawaj
Copy link
Collaborator

shawaj commented Aug 23, 2024

@Tissy you can either go into the "host OS" container and type nmcli device disconnect wlan0 and then hit the restart container icon for wifi-connect

Or you can go to the wifi-connect container and enter export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket and then ./wifi-connect and then you should get the WiFi AP starting up again which you can connect to to reconfigure the WiFi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants