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

RPi Does not connect to Wi-Fi from the first shot #314

Open
myamo1 opened this issue Dec 1, 2023 · 8 comments
Open

RPi Does not connect to Wi-Fi from the first shot #314

myamo1 opened this issue Dec 1, 2023 · 8 comments
Assignees
Labels
humble question Further information is requested troubleshooting System not working as expected, may be user error.

Comments

@myamo1
Copy link

myamo1 commented Dec 1, 2023

Please provide the following information:

  • OS: Ubuntu 22.04
  • ROS Distro: Humble
  • Installed:

Expected behaviour
Turn on turtlebot4 and RPi connects to Wi-Fi (screen shows IP address).
Actual behaviour
The screen shows unknown instead of IP address. Generally, after the 5th trial, RPi connects to Wi-Fi.

To Reproduce

Other notes
-I reflashed the RPi, changed another Wi-Fi but always the same behaviour.
-If I connect RPi to amonitor via a (usb-HDMI)-cable, the RPi connects.
-Screen shows IP address on Access point mode.

@myamo1 myamo1 added the bug Something isn't working requiring changes to this package label Dec 1, 2023
@hilary-luo
Copy link
Contributor

@myamo1 Are you connecting to a 2.4GHz network or 5GHz?

@hilary-luo hilary-luo added question Further information is requested humble troubleshooting System not working as expected, may be user error. and removed bug Something isn't working requiring changes to this package labels Dec 17, 2023
@myamo1
Copy link
Author

myamo1 commented Dec 18, 2023

I am connecting to 2.4GHz network

@hilary-luo
Copy link
Contributor

@myamo1 apologies that I missed seeing your response earlier. Are you still experiencing this issue?

@hilary-luo
Copy link
Contributor

This issue is being closed due to inactivity. If you are still experiencing the issue, feel free to reopen this ticket when you are ready to continue the troubleshooting process.

@hilary-luo hilary-luo closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
@myamo1
Copy link
Author

myamo1 commented Mar 6, 2024

Hello again,
I am still having the same issue. Few days it was connecting from the first shot but yesterday night it did not work even after several trials. This morning, it worked from the second shot.

I am using a router connected to the university network.
When it does not connect to wifi, the wifi LED is off and the screen displays unknown.

@hilary-luo
Copy link
Contributor

Does that router support 5 GHz? if so I would suggest trying to put the Raspberry Pi on the 5GHz network.

Another thing that I would suggest is to reserve an IP address for the Raspberry Pi on the router. This seems like it is an issue with the network configuration so that could potentially help.

If the issue persists then connect to the pi when you are experiencing the issue and share the output of journalctl -b | grep wlan0

@hilary-luo hilary-luo reopened this Mar 14, 2024
@myamo1
Copy link
Author

myamo1 commented Mar 22, 2024

The router does not support 5 GHz.
I reserved an IP address for the RPi but I experienced the same issue.
Here is the output you are asking for:

Nov 21 20:59:33 ubuntu cloud-init[657]: ci-info: | wlan0 | False | . | . | . | d8:3a:dd:08:60:35 |
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.0408] device (wlan0): driver supports Access Point (AP) mode
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.0436] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/4)
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.0447] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Nov 21 20:59:36 ubuntu systemd-networkd[650]: wlan0: Link UP
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.5015] device (wlan0): supplicant interface state: internal-starting -> disconnected
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.5019] Wi-Fi P2P device controlled by interface wlan0 created
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.5026] manager: (p2p-dev-wlan0): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/5)
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.5033] device (p2p-dev-wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.5044] device (wlan0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Nov 21 20:59:36 ubuntu NetworkManager[663]: [1700600376.5062] device (p2p-dev-wlan0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Nov 21 20:59:38 ubuntu networkd-dispatcher[672]: ERROR:Unable to retrieve ESSID for wireless interface wlan0: no supported wireless tool installed
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2446] policy: auto-activating connection 'netplan-wlan0-Lab1012' (38462bcd-a2f5-3da7-a029-d760d96dcf66)
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2488] device (wlan0): Activation: starting connection 'netplan-wlan0-Lab1012' (38462bcd-a2f5-3da7-a029-d760d96dcf66)
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2500] device (wlan0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2538] device (wlan0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2566] device (wlan0): Activation: (wifi) access point 'netplan-wlan0-Lab1012' has security, but secrets are required.
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2569] device (wlan0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2575] sup-iface[c1c960adb145e673,0,wlan0]: wps: type pbc start...
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2599] device (wlan0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2609] device (wlan0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2623] device (wlan0): Activation: (wifi) connection 'netplan-wlan0-Lab1012' has security, and secrets exist. No new secrets needed.
Nov 21 20:59:39 ubuntu wpa_supplicant[682]: wlan0: WPS-CANCEL
Nov 21 20:59:39 ubuntu wpa_supplicant[682]: wlan0: Trying to associate with SSID 'Lab1012'
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2986] device (wlan0): supplicant interface state: disconnected -> associating
Nov 21 20:59:39 ubuntu NetworkManager[663]: [1700600379.2996] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> associating
Nov 21 20:59:42 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Nov 21 20:59:42 ubuntu NetworkManager[663]: [1700600382.3160] device (wlan0): supplicant interface state: associating -> disconnected
Nov 21 20:59:42 ubuntu NetworkManager[663]: [1700600382.3162] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Nov 21 20:59:42 ubuntu NetworkManager[663]: [1700600382.4142] device (wlan0): supplicant interface state: disconnected -> scanning
Nov 21 20:59:42 ubuntu NetworkManager[663]: [1700600382.4145] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Nov 21 20:59:45 ubuntu wpa_supplicant[682]: wlan0: Trying to associate with SSID 'Lab1012'
Nov 21 20:59:45 ubuntu NetworkManager[663]: [1700600385.0986] device (wlan0): supplicant interface state: scanning -> associating
Nov 21 20:59:45 ubuntu NetworkManager[663]: [1700600385.0989] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Nov 21 20:59:47 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Nov 21 20:59:47 ubuntu NetworkManager[663]: [1700600387.7670] device (wlan0): supplicant interface state: associating -> disconnected
Nov 21 20:59:47 ubuntu NetworkManager[663]: [1700600387.7671] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Nov 21 20:59:48 ubuntu NetworkManager[663]: [1700600388.2647] device (wlan0): supplicant interface state: disconnected -> scanning
Nov 21 20:59:48 ubuntu NetworkManager[663]: [1700600388.2649] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Nov 21 20:59:50 ubuntu wpa_supplicant[682]: wlan0: Trying to associate with SSID 'Lab1012'
Nov 21 20:59:50 ubuntu NetworkManager[663]: [1700600390.9535] device (wlan0): supplicant interface state: scanning -> associating
Nov 21 20:59:50 ubuntu NetworkManager[663]: [1700600390.9536] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Nov 21 20:59:53 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Nov 21 20:59:53 ubuntu NetworkManager[663]: [1700600393.9502] device (wlan0): supplicant interface state: associating -> disconnected
Nov 21 20:59:53 ubuntu NetworkManager[663]: [1700600393.9503] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Nov 21 20:59:54 ubuntu NetworkManager[663]: [1700600394.9494] device (wlan0): supplicant interface state: disconnected -> scanning
Nov 21 20:59:54 ubuntu NetworkManager[663]: [1700600394.9496] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Nov 21 20:59:57 ubuntu wpa_supplicant[682]: wlan0: Trying to associate with SSID 'Lab1012'
Nov 21 20:59:57 ubuntu NetworkManager[663]: [1700600397.6312] device (wlan0): supplicant interface state: scanning -> associating
Nov 21 20:59:57 ubuntu NetworkManager[663]: [1700600397.6325] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Nov 21 21:00:00 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Nov 21 21:00:00 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Lab1012" auth_failures=1 duration=10 reason=CONN_FAILED
Nov 21 21:00:00 ubuntu NetworkManager[663]: [1700600400.6342] device (wlan0): supplicant interface state: associating -> disconnected
Nov 21 21:00:00 ubuntu NetworkManager[663]: [1700600400.6343] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9232] device (wlan0): Activation: (wifi) association took too long
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9234] device (wlan0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9239] sup-iface[c1c960adb145e673,0,wlan0]: wps: type pbc start...
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9244] device (wlan0): Activation: (wifi) asking for new secrets
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9296] device (wlan0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Nov 21 21:00:04 ubuntu wpa_supplicant[682]: wlan0: WPS-CANCEL
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9313] device (wlan0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9333] device (wlan0): Activation: (wifi) connection 'netplan-wlan0-Lab1012' has security, and secrets exist. No new secrets needed.
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9789] device (wlan0): supplicant interface state: disconnected -> scanning
Nov 21 21:00:04 ubuntu NetworkManager[663]: [1700600404.9792] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Nov 21 21:00:07 ubuntu wpa_supplicant[682]: wlan0: Trying to associate with SSID 'Lab1012'
Nov 21 21:00:07 ubuntu NetworkManager[663]: [1700600407.6560] device (wlan0): supplicant interface state: scanning -> associating
Nov 21 21:00:07 ubuntu NetworkManager[663]: [1700600407.6562] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Nov 21 21:00:10 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Nov 21 21:00:10 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Lab1012" auth_failures=1 duration=10 reason=CONN_FAILED
Nov 21 21:00:10 ubuntu NetworkManager[663]: [1700600410.6601] device (wlan0): supplicant interface state: associating -> disconnected
Nov 21 21:00:10 ubuntu NetworkManager[663]: [1700600410.6603] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Nov 21 21:00:20 ubuntu NetworkManager[663]: [1700600420.6823] device (wlan0): supplicant interface state: disconnected -> scanning
Nov 21 21:00:20 ubuntu NetworkManager[663]: [1700600420.6824] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Nov 21 21:00:23 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="Lab1012"
Nov 21 21:00:23 ubuntu wpa_supplicant[682]: wlan0: Trying to associate with SSID 'Lab1012'
Nov 21 21:00:23 ubuntu NetworkManager[663]: [1700600423.4651] device (wlan0): supplicant interface state: scanning -> associating
Nov 21 21:00:23 ubuntu NetworkManager[663]: [1700600423.4654] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Nov 21 21:00:26 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Nov 21 21:00:26 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Lab1012" auth_failures=2 duration=20 reason=CONN_FAILED
Nov 21 21:00:26 ubuntu NetworkManager[663]: [1700600426.1394] device (wlan0): supplicant interface state: associating -> disconnected
Nov 21 21:00:26 ubuntu NetworkManager[663]: [1700600426.1396] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9238] device (wlan0): Activation: (wifi) association took too long
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9240] device (wlan0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9247] sup-iface[c1c960adb145e673,0,wlan0]: wps: type pbc start...
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9254] device (wlan0): Activation: (wifi) asking for new secrets
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9293] device (wlan0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9307] device (wlan0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9324] device (wlan0): Activation: (wifi) connection 'netplan-wlan0-Lab1012' has security, and secrets exist. No new secrets needed.
Nov 21 21:00:29 ubuntu wpa_supplicant[682]: wlan0: WPS-CANCEL
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9785] device (wlan0): supplicant interface state: disconnected -> scanning
Nov 21 21:00:29 ubuntu NetworkManager[663]: [1700600429.9787] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Nov 21 21:00:32 ubuntu wpa_supplicant[682]: wlan0: Trying to associate with SSID 'Lab1012'
Nov 21 21:00:32 ubuntu NetworkManager[663]: [1700600432.7052] device (wlan0): supplicant interface state: scanning -> associating
Nov 21 21:00:32 ubuntu NetworkManager[663]: [1700600432.7054] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Nov 21 21:00:35 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Nov 21 21:00:35 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Lab1012" auth_failures=1 duration=10 reason=CONN_FAILED
Nov 21 21:00:35 ubuntu NetworkManager[663]: [1700600435.7218] device (wlan0): supplicant interface state: associating -> disconnected
Nov 21 21:00:35 ubuntu NetworkManager[663]: [1700600435.7219] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Nov 21 21:00:45 ubuntu NetworkManager[663]: [1700600445.7353] device (wlan0): supplicant interface state: disconnected -> scanning
Nov 21 21:00:45 ubuntu NetworkManager[663]: [1700600445.7356] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Nov 21 21:00:48 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="Lab1012"
Nov 21 21:00:48 ubuntu wpa_supplicant[682]: wlan0: Trying to associate with SSID 'Lab1012'
Nov 21 21:00:48 ubuntu NetworkManager[663]: [1700600448.5220] device (wlan0): supplicant interface state: scanning -> associating
Nov 21 21:00:48 ubuntu NetworkManager[663]: [1700600448.5222] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Nov 21 21:00:51 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Nov 21 21:00:51 ubuntu wpa_supplicant[682]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Lab1012" auth_failures=2 duration=20 reason=CONN_FAILED
Nov 21 21:00:51 ubuntu NetworkManager[663]: [1700600451.2062] device (wlan0): supplicant interface state: associating -> disconnected
Nov 21 21:00:51 ubuntu NetworkManager[663]: [1700600451.2064] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Nov 21 21:00:54 ubuntu NetworkManager[663]: [1700600454.9254] device (wlan0): Activation: (wifi) association took too long
Nov 21 21:00:54 ubuntu NetworkManager[663]: [1700600454.9256] device (wlan0): state change: config -> failed (reason 'no-secrets', sys-iface-state: 'managed')
Nov 21 21:00:54 ubuntu NetworkManager[663]: [1700600454.9285] device (wlan0): Activation: failed for connection 'netplan-wlan0-Lab1012'
Nov 21 21:00:54 ubuntu NetworkManager[663]: [1700600454.9301] device (wlan0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Nov 21 21:01:01 ubuntu NetworkManager[663]: [1700600461.2041] device (wlan0): supplicant interface state: disconnected -> inactive
Nov 21 21:01:01 ubuntu NetworkManager[663]: [1700600461.2043] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> inactive

@hilary-luo
Copy link
Contributor

The repeated error seems to be this one:

CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Lab1012" auth_failures=1 duration=10 reason=CONN_FAILED

I have not directly had experience with this type of failure but through some searching people seem to run into this issue with raspberry pi's in several different types of scenarios including incorrect bands / channels and general interference from other physical connections.

First thing to check is when you run the turtlebot4-setup tool, in the Wi-Fi Settings do you have the band set to 2.4 GHz? (or Any).

If not that, some people have reported incompatibilities with the raspberry pi WIFi driver and specific access points. The solution people seem to have is to disable the fast-roam feature on the pi. See https://bugs.launchpad.net/raspbian/+bug/1929746 and https://raspberrypi.stackexchange.com/questions/77144/rpi3-wireless-issue-ctrl-event-assoc-reject-status-code-16

If that still doesn't work, try searching up that specific error, as people have reported different solutions for it. This is not a Turtlebot4 specific error but a general raspberry pi issue that seems to apply to certain routers. If you are still unable to get it connected, it may be worth posting this issue into a raspberry pi forum and see if the folks there can help further. Alternatively, you could also try a different type of router.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
humble question Further information is requested troubleshooting System not working as expected, may be user error.
Projects
None yet
Development

No branches or pull requests

2 participants