Wlan issue with Iphone personal hotspot

Hi,
I’m having troubles connecting my Pi to a Iphone, running a personal hotspot via Wlan.

Environment: I have a Rasperry Pi 4 2 GB - installed with Diet Pi 8.1.2. Systems run’s fine, without obvious issues / errors.
I’m trying to connect my Pi to a personal hotspot, created on on a IPhone 8.
The WLAN connection was configured using dietpi-config / Network Options: Adapters. The wlan provided by the Iphone shows up and can be selected (ssid=“Hobi”).
wpa_suplicant.conf looks as simple as this:

ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="Hobi"
        psk="hobihobi"
}

Problem is that the connection is not established.
Error messages:

Feb 06 21:25:25 Syncinator wpa_supplicant[934]: wlan0: Trying to associate with SSID 'Hobi'
Feb 06 21:25:28 Syncinator wpa_supplicant[934]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Feb 06 21:25:28 Syncinator wpa_supplicant[934]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Hobi" auth_failures=5 duration=75 reason=CONN_FAILED
Feb 06 21:26:46 Syncinator wpa_supplicant[934]: wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="Hobi"
Feb 06 21:26:54 Syncinator wpa_supplicant[934]: wlan0: Failed to initiate sched scan
Feb 06 21:27:02 Syncinator wpa_supplicant[934]: wlan0: Failed to initiate sched scan
Feb 06 21:27:09 Syncinator wpa_supplicant[934]: wlan0: Failed to initiate sched scan

I’m pretty sure that the psk is correct.
I also tried to connect to my normal home-wlan, works (of course?) without issues! I just have no luck with the Iphone.
Needless to say that my android tablet connects to the Iphone hotspot without any problems.

In case it helps, here is the scan result for the Iphone:

iwlist wlan0 scan

 Cell 03 - Address: E6:CC:48:69:BF:30
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=59/70  Signal level=-51 dBm
                    Encryption key:on
                    ESSID:"Hobi"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=0000000000000000
                    Extra: Last beacon: 6270ms ago
                    IE: Unknown: 0004486F6269
                    IE: Unknown: 010882848B962430486C
                    IE: Unknown: 030106
                    IE: Unknown: 050400010000
                    IE: Unknown: 0706444520010D14
                    IE: Unknown: 200100
                    IE: Unknown: 23021100
                    IE: Unknown: 2A0100
                    IE: Unknown: 32040C121860
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (2) : PSK unknown (8)
                    IE: Unknown: 2D1A2D0017FFFF000000000000000000000000000000000000000000
                    IE: Unknown: 3D1606000000000000000000000000000000000000000000
                    IE: Unknown: 7F080400000000000040
                    IE: Unknown: DD0A0017F206010103030000
                    IE: Unknown: DD0A0010180200001C000000
                    IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00

The only, for me, significant difference to e.g. my normale wlan is “Authentication Suites (2) : PSK unknown (8)” (my normal wlan says “Authentication Suites (1) : PSK”).

Does anyone know what is that special with the Iphone provided hotspot?
Are there special settings needed (tried already a lot - but did not change anything).

Thanks
Hobi

I don’t have an answer on your question, but do you use any special character on the Iphone hotspot? Just out of curiosity.

do you use any special character on the Iphone hotspot?

Initially I had a “strong” password … but to reduce complexity I made things as simple as possible.
The Iphone advertises itself as “Hobi” … the password is “hobihobi” (without the quotes).
So there should be nothing “special”.

are you able to try lower channels on 2.4 GHz?

Hmmm. When enabling the personal hotspot on the IPhone I have no control about the used settings, its all controlled by the phone.
What I can say is that currently the hotspot is on channel 1 (before it was 6) in the 2.4 Ghz band.
It seems to respond to WPA2 (WPA2-PSK-CCMP) and WPA3 (RSN-SAE-CCMP).

What I also can share is this:

wlan0: No APs found - clear blacklist and try again
Removed BSSID 76:b5:f3:29:3a:df from blacklist (clear)
wlan0: Selecting BSS from priority group 0
wlan0: 0: cc:ce:1e:ab:aa:0a ssid='WLAN-AE5580' wpa_ie_len=0 rsn_ie_len=20 caps=0x1511 level=-67 freq=5260
wlan0:    skip - SSID mismatch
wlan0: 1: 76:b5:f3:29:3a:df ssid='hobi' wpa_ie_len=0 rsn_ie_len=24 caps=0x1111 level=-41 freq=2412
wlan0:    selected based on RSN IE
wlan0:    selected BSS 76:b5:f3:29:3a:df ssid='hobi'
wlan0: Considering connect request: reassociate: 0  selected: 76:b5:f3:29:3a:df  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x133ce70  current_ssid=(nil)
wlan0: Request association with 76:b5:f3:29:3a:df
wlan0: Re-association to the same ESS
TDLS: TDLS is allowed in the target BSS
TDLS: TDLS channel switch allowed in the target BSS
...
wlan0: Starting radio work 'connect'@0x1349c30 after 0.000984 second wait
wlan0: Trying to associate with SSID 'hobi'
wlan0: Cancelling scan request
wlan0: WPA: clearing own WPA/RSN IE
RSN: PMKSA cache search - network_ctx=0x133ce70 try_opportunistic=0 akmp=0x0
RSN: Search for BSSID 76:b5:f3:29:3a:df
RSN: No PMKSA cache entry found
wlan0: RSN: using IEEE 802.11i/D9.0
wlan0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 1026 proto 2
wlan0: WPA: Selected mgmt group cipher 32
wlan0: WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=26): 30 18 01 00 00 0f ac 04 01 00 00 0f ac 04 02 00 00 0f ac 02 00 0f ac 08 8c 00
wlan0: WPA: AP group 0x10 network profile group 0x18; available group 0x10
wlan0: WPA: using GTK CCMP
wlan0: WPA: AP pairwise 0x10 network profile pairwise 0x18; available pairwise 0x10
wlan0: WPA: using PTK CCMP
wlan0: WPA: AP key_mgmt 0x402 network profile key_mgmt 0x3; available key_mgmt 0x2
wlan0: WPA: using KEY_MGMT WPA-PSK
wlan0: WPA: AP mgmt_group_cipher 0x20 network profile mgmt_group_cipher 0x0; available mgmt_group_cipher 0x0
wlan0: WPA: not using MGMT group cipher
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: Set PMK based on external data - hexdump(len=32): [REMOVED]
wlan0: Automatic auth_alg selection: 0x1
Added supported operating classes IE - hexdump(len=18): 3b 10 51 51 53 54 73 74 75 76 77 78 79 7a 7b 80 81 82
wlan0: State: SCANNING -> ASSOCIATING
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
wlan0: Determining shared radio frequencies (max len 2)
wlan0: Shared frequencies (len=0): completed iteration
P2P: Add operating class 81
P2P: Channels - hexdump(len=13): 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d
P2P: Add operating class 115
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Add operating class 116
P2P: Channels - hexdump(len=2): 24 2c
P2P: Add operating class 117
P2P: Channels - hexdump(len=2): 28 30
P2P: Add operating class 128
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Add operating class 130
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Update channel list
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11,12,13 115:36,40,44,48 116:36,44 117:40,48 128:36,40,44,48 130:36,40,44,48
P2P: cli_channels:
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x89b9d609 (mode change)
nl80211: Subscribe to mgmt frames with non-AP handle 0x1315e80
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0104
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0409506f9a1a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=040e
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=12
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0a1a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0505
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1315e80 match=0500
nl80211: Key management set PSK
nl80211: Connect (ifindex=3)
  * bssid_hint=76:b5:f3:29:3a:df
  * freq_hint=2412
  * SSID=hobi
  * IEs - hexdump(len=40): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 3b 10 51 51 53 54 73 74 75 76 77 78 79 7a 7b 80 81 82
  * WPA Versions 0x2
  * pairwise=0xfac04
  * group=0xfac04
  * akm=0xfac02
  * PSK - hexdump(len=32): [REMOVED]
  * htcaps - hexdump(len=26): 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  * htcaps_mask - hexdump(len=26): 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  * vhtcaps - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
  * vhtcaps_mask - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
  * Auth Type 0
nl80211: Connect request send successfully
wlan0: Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
nl80211: Ignored event 46 (NL80211_CMD_CONNECT) for foreign interface (ifindex 3 wdev 0x0)
nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
nl80211: Connect event (status=16 ignore_next_local_disconnect=0)
wlan0: Event ASSOC_REJECT (12) received
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
wlan0: Radio work 'connect'@0x1349c30 done in 2.230636 seconds
wlan0: radio_work_free('connect'@0x1349c30): num_active_works --> 0
Added BSSID 76:b5:f3:29:3a:df into blacklist

So it seems wpa_supplicant finds my phone, tries to connect - but for any reason the connection gets not established. :roll_eyes:

are you able to disable WPA3 ? Some clients might have issues with it.

nope. As said, iOS does not offer any settings for the hotspot - it is supposed to just work :smiley:

to bad that Apple do not give any option to mange own configuration.

Loos like RPi firmware/wifi driver has issues with WPA3 https://github.com/raspberrypi/linux/issues/3619

I think I know now what the issue is. :roll_eyes:
My Pi cannot connect to 2.4Ghz Wifi! It connects fine to 5 Ghz - but not to 2.4 Ghz!?
The hotspot of the Iphone uses (of course) 2.4 GHz. Just tried a Android Hotspot, too. Also no luck!
Same for my home network - if I disable 5 Ghz, no wifi for the PI … if I enable only 5 Ghz, no problem. Settings for 2.4 and 5 are of course identically set.

Funny enough: a wifi scan on the PI shows both wlans - but connection is only possible to the 5Ghz part.

additional update:
I have a USB3 disk connected to my PI.
If the disk is connected 2.4 GHz Wifi does not connect. If the disk is connected to USB2 it works … wtf?! :thinking:

Check the PSU and if it provides enough power for the RPi. Does the disk come with its own power supply or does it draw power from RPi?

The Pi is powered with the original RPI-PSU (5.1V/3A) - I assume this is sufficient.
The disk actually draws from the RPI - but as Wifi works if the disk is connected to USB2, I assume the power still is enough.

USB ports on RPi are not designed to power HDD/SSD. Pls use a dedicated PSU to power them.

Might be, but as we know, it works … as in my case: USB2 + WIfi works - UBS3 + Wifi works only with 2.4 Ghz.

The issue I’m facing is in my opinion more related to this here:
https://indilib.org/forum/general/6576-pi4-usb3-and-wireless-2-4ghz-interference.html

It seems to be a known problem :frowning:

Well it is not recommended to power HDD via the RPI only. They simply don’t provide another power and could lead to data lost on peak usage. This could impact the whole system.

I’m aware of this - but I doubt that this is related to my Wifi issue.

This is easy to test by yourself and rule it out, than presume it is not connected to your problem.

For the behaviour of USB ports, you might continue discussion on RPI forum. There you will have more hardware specialist. https://forums.raspberrypi.com/

Another option is to test with plain RPI OS, to rule out DietPi.