dhcpcd does not get an address from Android phone hotspot

Erich Titl <[email protected]> Thu, 15 Dec 2022 12:16:16 +0100
Newsgroups gmane.linux.leaf.user
Message-ID <[email protected]>
Hi Folks

I am trying to connect uplink to an Android based hotspot using dhcpcd.

My testbed consists of

- Alix board with 256MB memory and 2 radio cards.

- An off the shelf access point which serves as the uplink network node.

- An android phone with Wifi Hotspot enabled.

- An android tablet to log into webconf to be able to choose the uplink 
SSID easily and to test internet connectivity.

The LEAF router uses 7.1.2

Dec 15 10:53:36 SALT syslog[7160]: wlan0: carrier lost
Dec 15 10:54:04 SALT kernel: [ 2062.390076] wlan0: authenticate with 
f8:1a:67:56:42:96
Dec 15 10:54:04 SALT kernel: [ 2062.390076] wlan0: authenticate with 
f8:1a:67:56:42:96
Dec 15 10:54:04 SALT kernel: [ 2062.400051] wlan0: send auth to 
f8:1a:67:56:42:96 (try 1/3)
Dec 15 10:54:04 SALT kernel: [ 2062.403615] wlan0: authenticated
Dec 15 10:54:04 SALT kernel: [ 2062.400051] wlan0: send auth to 
f8:1a:67:56:42:96 (try 1/3)
Dec 15 10:54:04 SALT kernel: [ 2062.403615] wlan0: authenticated
Dec 15 10:54:04 SALT kernel: [ 2062.414075] wlan0: associate with 
f8:1a:67:56:42:96 (try 1/3)
Dec 15 10:54:04 SALT kernel: [ 2062.416690] wlan0: RX AssocResp from 
f8:1a:67:56:42:96 (capab=0x431 status=0 aid=1)
Dec 15 10:54:04 SALT kernel: [ 2062.416900] wlan0: associated
Dec 15 10:54:04 SALT kernel: [ 2062.414075] wlan0: associate with 
f8:1a:67:56:42:96 (try 1/3)
Dec 15 10:54:04 SALT kernel: [ 2062.416690] wlan0: RX AssocResp from 
f8:1a:67:56:42:96 (capab=0x431 status=0 aid=1)
Dec 15 10:54:04 SALT kernel: [ 2062.416900] wlan0: associated
Dec 15 10:54:04 SALT syslog[7160]: wlan0: carrier acquired
Dec 15 10:54:04 SALT syslog[7160]: wlan0: connected to Access Point 
`scoobly'
Dec 15 10:54:05 SALT syslog[7160]: wlan0: rebinding lease of 194.124.158.82
Dec 15 10:54:05 SALT syslog[7160]: wlan0: probing address 194.124.158.82/24
Dec 15 10:54:09 SALT syslog[7160]: wlan0: leased 194.124.158.82 for 
216000 seconds
Dec 15 10:54:09 SALT syslog[7160]: wlan0: adding route to 194.124.158.0/24
Dec 15 10:54:09 SALT syslog[7160]: wlan0: adding default route via 
194.124.158.1
Dec 15 10:55:14 SALT kernel: [ 2132.235721] wlan0: deauthenticating from 
f8:1a:67:56:42:96 by local choice (Reason: 3=DEAUTH_LEAVING)
Dec 15 10:55:14 SALT kernel: [ 2132.235721] wlan0: deauthenticating from 
f8:1a:67:56:42:96 by local choice (Reason: 3=DEAUTH_LEAVING)
Dec 15 10:55:14 SALT syslog[7160]: wlan0: carrier lost
Dec 15 10:55:14 SALT syslog[7160]: wlan0: deleting route to 194.124.158.0/24
Dec 15 10:55:14 SALT syslog[7160]: wlan0: deleting default route via 
194.124.158.1

Here everything looks fine (and is)

However, trying to connect to the WiFi Hotspot on the Android phone 
results in the following

Dec 15 10:56:00 SALT kernel: [ 2178.125545] wlan0: authenticate with 
5a:e9:b2:a6:20:7b
Dec 15 10:56:00 SALT kernel: [ 2178.125545] wlan0: authenticate with 
5a:e9:b2:a6:20:7b
Dec 15 10:56:00 SALT kernel: [ 2178.135677] wlan0: send auth to 
5a:e9:b2:a6:20:7b (try 1/3)
Dec 15 10:56:00 SALT kernel: [ 2178.135677] wlan0: send auth to 
5a:e9:b2:a6:20:7b (try 1/3)
Dec 15 10:56:00 SALT kernel: [ 2178.216124] wlan0: authenticated
Dec 15 10:56:00 SALT kernel: [ 2178.216124] wlan0: authenticated
Dec 15 10:56:00 SALT kernel: [ 2178.220230] wlan0: associate with 
5a:e9:b2:a6:20:7b (try 1/3)
Dec 15 10:56:00 SALT kernel: [ 2178.220230] wlan0: associate with 
5a:e9:b2:a6:20:7b (try 1/3)
Dec 15 10:56:00 SALT kernel: [ 2178.237796] wlan0: RX AssocResp from 
5a:e9:b2:a6:20:7b (capab=0x431 status=0 aid=3)
Dec 15 10:56:00 SALT kernel: [ 2178.238017] wlan0: associated
Dec 15 10:56:00 SALT kernel: [ 2178.237796] wlan0: RX AssocResp from 
5a:e9:b2:a6:20:7b (capab=0x431 status=0 aid=3)
Dec 15 10:56:00 SALT kernel: [ 2178.238017] wlan0: associated
Dec 15 10:56:00 SALT syslog[7160]: wlan0: carrier acquired
Dec 15 10:56:00 SALT syslog[7160]: wlan0: connected to Access Point `Mega'
Dec 15 10:56:01 SALT syslog[7160]: wlan0: soliciting a DHCP lease

So wpa_supplicant connects to the access point but dhcpcd fails to get 
an address as can be seen here

SALT# tcpdump -i wlan0
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), snapshot length 262144 
bytes
11:03:33.616568 EAPOL key (3) v2, len 95
11:03:33.617874 EAPOL key (3) v1, len 117
11:03:33.624471 EAPOL key (3) v2, len 151
11:03:33.625364 EAPOL key (3) v1, len 95
11:03:34.027803 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
Request from 00:1b:b1:b1:4d:25 (oui Unknown), length 326
11:03:39.021148 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
Request from 00:1b:b1:b1:4d:25 (oui Unknown), length 326
11:03:46.888539 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
Request from 00:1b:b1:b1:4d:25 (oui Unknown), length 326
11:04:03.848012 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
Request from 00:1b:b1:b1:4d:25 (oui Unknown), length 326
11:04:35.084820 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
Request from 00:1b:b1:b1:4d:25 (oui Unknown), length 326
11:05:39.156389 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
Request from 00:1b:b1:b1:4d:25 (oui Unknown), length 326
11:06:42.718712 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
Request from 00:1b:b1:b1:4d:25 (oui Unknown), length 326
^C
11 packets captured
11 packets received by filter
0 packets dropped by kernel

However, connecting to the Android based hotspot works fine using the 
Android tablet or a Winblows laptop.

Ideas?

ET

------------------------------------------------------------------------
leaf-user mailing list: [email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/
OpenPGP_signature (application/pgp-signature, 840 B) - not displayed