problems with udhcpd

Matti Sillanpää maash.1.bridge at gmail.com
Wed Jan 31 12:08:48 UTC 2018


Hi.


I've got imx7d based picopi with technexion yocto linux. It has busybox
distribution of udhcp. I'm trying to use it as hotspot, however
occasionally it just wont give out IP address altough there's no clear
error messages anywhere. I've observed this phenomenon on two different
android phones.

In working case the udhcpd indicates that ip is being offered and accepted.
         Jan 22 11:09:32 imx7d-pico CROND[774]: (root) CMDOUT (wlan0: STA
cc:9f:7a:da:ed:4a RADIUS: starting accounting session ACB81D40-00000000)
         Jan 22 11:09:32 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a
WPA: pairwise key handshake completed (RSN)
         Jan 22 11:09:32 imx7d-pico CROND[774]: (root) CMDOUT (wlan0: STA
cc:9f:7a:da:ed:4a WPA: pairwise key handshake completed (RSN))
          Jan 22 11:09:34 imx7d-pico udhcpd[873]: Sending OFFER of
192.168.0.2
          Jan 22 11:09:34 imx7d-pico udhcpd[873]: Sending ACK to 192.168.0.2

However in non-working case the connection just drops after certain timeout:
          Jan 31 09:52:58 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: STA
cc:9f:7a:da:ed:4a RADIUS: starting accounting session AF1A9D2B-00000000)
          Jan 31 09:52:58 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a
WPA: pairwise key handshake completed (RSN)
          Jan 31 09:52:58 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: STA
cc:9f:7a:da:ed:4a WPA: pairwise key handshake completed (RSN))
          Jan 31 09:53:34 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: STA
cc:9f:7a:da:ed:4a IEEE 802.11: disassociated)
          Jan 31 09:53:34 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a
IEEE 802.11: disassociated
          Jan 31 09:53:34 imx7d-pico CROND[773]: (root) CMDOUT (wlan0:
AP-STA-DISCONNECTED cc:9f:7a:da:ed:4a)
          Jan 31 09:53:34 imx7d-pico kernel: CFG80211-ERROR)
wl_notify_connect_status_ap : event WLC_E_DEAUTH_IND(6) status 0 reason 3
          Jan 31 09:53:34 imx7d-pico kernel: CFG80211-ERROR)
wl_cfg80211_del_station : Disconnect STA : cc:9f:7a:da:ed:4a scb_val.val 3

I'm starting the hotspot along these lines:
    ifdown wlan0
    rfkill unblock wlan
    killall wpa_supplicant
    killall udhcpc
    echo 2 > /sys/module/bcmdhd/parameters/op_mode
    ifup wlan0
    udhcpd /etc/udhcpd.conf
    hostapd /etc/hostapd.conf &
    udhcpd start

I attached my udhcpd and hostapd configurations here.

Any help would be appreciated. I'm little baffled by this as there isn't
really any proper error messages to work from. the reason 3 from the
connect status seems to be just about client hanging up (due not getting
the IP address).

-Matti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20180131/dc3c3c50/attachment.html>
-------------- next part --------------
/*******************************************************
*                NON-working
*******************************************************/
Jan 31 09:52:39 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: interface state UNINITIALIZED->ENABLED)
Jan 31 09:52:39 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: AP-ENABLED )
Jan 31 09:52:40 imx7d-pico avahi-daemon[737]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::b2f1:ecff:feff:9a59.
Jan 31 09:52:40 imx7d-pico avahi-daemon[737]: New relevant interface wlan0.IPv6 for mDNS.
Jan 31 09:52:40 imx7d-pico avahi-daemon[737]: Registering new address record for fe80::b2f1:ecff:feff:9a59 on wlan0.*.
Jan 31 09:52:42 imx7d-pico ntpd[669]: Listen normally on 6 wlan0 192.168.0.1:123
Jan 31 09:52:42 imx7d-pico ntpd[669]: Listen normally on 7 wlan0 [fe80::b2f1:ecff:feff:9a59%6]:123
Jan 31 09:52:42 imx7d-pico ntpd[669]: new interface(s) found: waking up resolver
Jan 31 09:52:57 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a IEEE 802.11: associated
Jan 31 09:52:57 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: STA cc:9f:7a:da:ed:4a IEEE 802.11: associated)
Jan 31 09:52:58 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: AP-STA-CONNECTED cc:9f:7a:da:ed:4a)
Jan 31 09:52:58 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a RADIUS: starting accounting session AF1A9D2B-00000000
Jan 31 09:52:58 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: STA cc:9f:7a:da:ed:4a RADIUS: starting accounting session AF1A9D2B-00000000)
Jan 31 09:52:58 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a WPA: pairwise key handshake completed (RSN)
Jan 31 09:52:58 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: STA cc:9f:7a:da:ed:4a WPA: pairwise key handshake completed (RSN))
Jan 31 09:53:34 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: STA cc:9f:7a:da:ed:4a IEEE 802.11: disassociated)
Jan 31 09:53:34 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a IEEE 802.11: disassociated
Jan 31 09:53:34 imx7d-pico CROND[773]: (root) CMDOUT (wlan0: AP-STA-DISCONNECTED cc:9f:7a:da:ed:4a)
Jan 31 09:53:34 imx7d-pico kernel: CFG80211-ERROR) wl_notify_connect_status_ap : event WLC_E_DEAUTH_IND(6) status 0 reason 3
Jan 31 09:53:34 imx7d-pico kernel: CFG80211-ERROR) wl_cfg80211_del_station : Disconnect STA : cc:9f:7a:da:ed:4a scb_val.val 3

/******************************************************
*                Working:
******************************************************/
Jan 22 11:09:02 imx7d-pico CROND[774]: (root) CMDOUT (wlan0: AP-ENABLED )
Jan 22 11:09:03 imx7d-pico ntpd[668]: Listen normally on 6 wlan0 192.168.0.1:123
Jan 22 11:09:03 imx7d-pico ntpd[668]: bind(26) AF_INET6 fe80::b2f1:ecff:feff:9a59%6#123 flags 0x11 failed: Cannot assign requested address
Jan 22 11:09:03 imx7d-pico ntpd[668]: unable to create socket on wlan0 (7) for fe80::b2f1:ecff:feff:9a59%6#123
Jan 22 11:09:03 imx7d-pico ntpd[668]: failed to init interface for address fe80::b2f1:ecff:feff:9a59%6
Jan 22 11:09:03 imx7d-pico ntpd[668]: new interface(s) found: waking up resolver
Jan 22 11:09:03 imx7d-pico avahi-daemon[737]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::b2f1:ecff:feff:9a59.
Jan 22 11:09:03 imx7d-pico avahi-daemon[737]: New relevant interface wlan0.IPv6 for mDNS.
Jan 22 11:09:03 imx7d-pico avahi-daemon[737]: Registering new address record for fe80::b2f1:ecff:feff:9a59 on wlan0.*.
Jan 22 11:09:05 imx7d-pico ntpd[668]: Listen normally on 8 wlan0 [fe80::b2f1:ecff:feff:9a59%6]:123
Jan 22 11:09:05 imx7d-pico ntpd[668]: new interface(s) found: waking up resolver
Jan 22 11:09:31 imx7d-pico CROND[774]: (root) CMDOUT (wlan0: STA cc:9f:7a:da:ed:4a IEEE 802.11: associated)
Jan 22 11:09:31 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a IEEE 802.11: associated
Jan 22 11:09:32 imx7d-pico CROND[774]: (root) CMDOUT (wlan0: AP-STA-CONNECTED cc:9f:7a:da:ed:4a)
Jan 22 11:09:32 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a RADIUS: starting accounting session ACB81D40-00000000
Jan 22 11:09:32 imx7d-pico CROND[774]: (root) CMDOUT (wlan0: STA cc:9f:7a:da:ed:4a RADIUS: starting accounting session ACB81D40-00000000)
Jan 22 11:09:32 imx7d-pico hostapd: wlan0: STA cc:9f:7a:da:ed:4a WPA: pairwise key handshake completed (RSN)
Jan 22 11:09:32 imx7d-pico CROND[774]: (root) CMDOUT (wlan0: STA cc:9f:7a:da:ed:4a WPA: pairwise key handshake completed (RSN))
Jan 22 11:09:34 imx7d-pico udhcpd[873]: Sending OFFER of 192.168.0.2
Jan 22 11:09:34 imx7d-pico udhcpd[873]: Sending ACK to 192.168.0.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: udhcpd.conf
Type: application/octet-stream
Size: 230 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20180131/dc3c3c50/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hostapd.conf
Type: application/octet-stream
Size: 211 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20180131/dc3c3c50/attachment-0001.obj>


More information about the busybox mailing list