ฉันสร้าง Linux ในตัวโดยใช้Buildrootและฉันมีปัญหาในการเชื่อมต่อกับ AP ของฉัน ไม่สามารถรับที่อยู่ IP ได้มากกว่าหนึ่งครั้ง
ฉันใช้ wpa_supplicant เพื่อเชื่อมต่อ AP ของฉันโดยใช้ WPA2-PSK มันทำงานร่วมกับ AP อื่น ๆ เช่นสมาร์ทโฟนของฉันในโหมด AP
เมื่อฉันใช้iwconfig wlan0ฉันเห็นว่าฉันเชื่อมโยงกับ AP ของฉัน
wlan0 IEEE 802.11bgn ESSID:"ZyXEL_B3B5"
Mode:Managed Frequency:2.462 GHz Access Point: 90:EF:68:D3:B3:B5
Bit Rate=58.5 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Link Quality=53/70 Signal level=-57 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:1 Missed beacon:0
แต่ฉันไม่สามารถรับที่อยู่ IP ได้ ifup wlan0
udhcpc (v1.22.1) started
Sending discover...
Sending discover...
Sending discover...
No lease, failing
ฉันควรจะบอกว่าฉันสามารถรับที่อยู่ IP ได้เพียงครั้งเดียว หากฉันรีบูทสิ่งนี้จะทำไม่ได้อีกต่อไป
ฉันจัดการเพื่อติดตั้งdhclientแทนที่จะใช้ไคลเอ็นต์ DHCP เริ่มต้นของ Busybox แต่ไม่มีอะไรเกิดขึ้น (ฉันยังคงถูกบล็อกไม่สิ้นสุด)
dhclient wlan0
ตามข้อความเคอร์เนลของฉันดูเหมือนว่าฉันไม่ได้เชื่อมโยงอย่างต่อเนื่อง
[ 355.459738] wlan0: authenticate with 90:ef:68:d3:b3:b5 (try 1)
[ 355.461366] wlan0: authenticated
[ 355.461416] wlan0: associate with 90:ef:68:d3:b3:b5 (try 1)
[ 355.469353] wlan0: RX AssocResp from 90:ef:68:d3:b3:b5 (capab=0x431 status=0 aid=1)
[ 355.469364] wlan0: associated
[ 365.547863] wlan0: deauthenticating from 90:ef:68:d3:b3:b5 by local choice (reason=3)
[ 365.672765] cfg80211: Calling CRDA to update world regulatory domain
[ 367.169736] wlan0: authenticate with 90:ef:68:d3:b3:b5 (try 1)
[ 367.171421] wlan0: authenticated
[ 367.194859] wlan0: associate with 90:ef:68:d3:b3:b5 (try 1)
[ 367.198561] wlan0: RX AssocResp from 90:ef:68:d3:b3:b5 (capab=0x431 status=0 aid=1)
[ 367.198584] wlan0: associated
[ 377.277864] wlan0: deauthenticating from 90:ef:68:d3:b3:b5 by local choice (reason=3)
[ 377.412822] cfg80211: Calling CRDA to update world regulatory domain
[ 378.899738] wlan0: authenticate with 90:ef:68:d3:b3:b5 (try 1)
[ 378.901668] wlan0: authenticated
[ 378.924732] wlan0: associate with 90:ef:68:d3:b3:b5 (try 1)
[ 378.928437] wlan0: RX AssocResp from 90:ef:68:d3:b3:b5 (capab=0x431 status=0 aid=1)
[ 378.928461] wlan0: associated
[ 389.008120] wlan0: deauthenticating from 90:ef:68:d3:b3:b5 by local choice (reason=3)
[ 389.182888] cfg80211: Calling CRDA to update world regulatory domain
[ 390.689735] wlan0: authenticate with 90:ef:68:d3:b3:b5 (try 1)
[ 390.691415] wlan0: authenticated
[ 390.714734] wlan0: associate with 90:ef:68:d3:b3:b5 (try 1)
[ 390.720847] wlan0: RX AssocResp from 90:ef:68:d3:b3:b5 (capab=0x431 status=0 aid=1)
[ 390.720870] wlan0: associated
[ 400.811246] wlan0: deauthenticating from 90:ef:68:d3:b3:b5 by local choice (reason=3)
...
บันทึกของ AP ของฉัน
338 Nov 16 15:50:53 udhcpd[2404]: Received DISCOVER
339 Nov 16 15:50:53 udhcpd[2404]: unicasting packet to client yiaddr
340 Nov 16 15:50:56 udhcpd[2404]: Received DISCOVER
341 Nov 16 15:50:56 udhcpd[2404]: unicasting packet to client yiaddr
342 Nov 16 15:50:59 udhcpd[2404]: Received DISCOVER
343 Nov 16 15:50:59 udhcpd[2404]: unicasting packet to client yiaddr
บันทึกเมื่อมันทำงาน (เพียงครั้งเดียว)
325 Nov 16 15:48:37 udhcpd[2404]: Received DISCOVER
326 Nov 16 15:48:37 udhcpd[2404]: unicasting packet to client yiaddr
327 Nov 16 15:48:37 udhcpd[2404]: Received REQUEST
328 Nov 16 15:48:37 udhcpd[2404]: lease = 11854360
329 Nov 16 15:48:37 udhcpd[2404]: requested = b2a8eb7f
330 Nov 16 15:48:37 udhcpd[2404]: server_id = c0a80101
331 Nov 16 15:48:37 udhcpd[2404]: unicasting packet to client yiaddr
วิธีแก้ปัญหา