This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL1801MOD: WL1801 How do I get the WIFI Interface to acquire a IPV4 address from my modem/router?

Part Number: WL1801MOD
Other Parts Discussed in Thread: WL1801,

Tool/software:

I have tried to get my WL1801 interface to acquire an IPV4 address using HOSTAPD, WPA-SUPPLICANT, and NETWORK-MANAGER.  None of them work, I get no response at all from the router.  Here is the output of my ifconfig command:

# ifconfig wlan0
wlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
inet 169.254.63.90 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::2cfa:4d26:344:38c0 prefixlen 64 scopeid 0x20<link>
ether da:43:c8:e1:e4:4b txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 62 bytes 8896 (8.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Is there an app note or something that can tell me what I need to do in order to get this WIFI interface going on my local net?  Also, there is no ethernet in the custom hardware I'm working with.  Also, I am using Buildroot on an AM62X custom board.  I have other devices connected to the router, so the router is definitely not the problem.

Thanks!

  • Hi Patricia,

    Once you are connected to an AP, then you can execute 'udhcpc -i wlan0' to request an DHCP lease from the network. You can find example here in Section 5.1.1 and 5.1.2:

    https://www.ti.com/lit/ug/swru561a/swru561a.pdf

  • I read this pdf a while ago but a lot of the information in it is obsolete.  For instance, there is supposed to be a script called "sta_start.sh" and another one called "sta_connect-ex.sh".  I have both 18xx-ti-utils (V8.8) and wlconf (aso V8.8) in my buildroot environment.  These 2 scripts are nowhere to be found.  So I created my own script and systemd services.  Systemd services bring up hostapd in one and starts wpa_supplicant in the other.  There is a network script that first unblocks rfkill for wlan, then restarts hostapd & wpa_supplicant.  Finally, the network interface is brought online using "ifconfig wlan0 up".  I thought this should be sufficient, but all I get is "wlcore down" repeatedly displayed.  Can you point me to where I can find the 2 scripts mentioned in the swru561a.pdf please so I can start the process again and see if the interface will come up and stay up?  Also, I did run "configure-device" script to configure WL1801MOD and am using that conf.bin file.  So that's not my problem.

  • I finally got this going.  I did not need the 2 scripts called out in sru661a.pdf.  I did not need hostapd.  I enabled wpa_supplicant, added "/etc/wpa_supplicant/wpa_supplicant/wpa_supplicant-wlan0.conf, and added the following to systemd/network/:

    Create wpa_supplicant-wlan0.conf, which contains the following:

    ap_scan=1
    ctrl_interface=/var/run/wpa_supplicant
    update_config=1

    network={
    ssid=ENTER-YOUR-SSID-HERE
    psk=ENTER-YOUR-WPA-PSK-PASSPHRASE-HERE
    key_mgmt=WPA-PSK
    scan_ssid=1
    }

    Create file "25-wlan.network", which contains following:

    [Match]
    Name=wlan0

    [Network]
    DHCP=ipv4

    Then I created a systemd/system type oneshot service that calls a script which contains the following commands:

    #!/bin/sh

    # Unblock wifi device (somehow it's blocked when network first comes up)
    rfkill unblock wlan

    # Set wpa type to AP
    iw wlan0 set type ap

    # Add a little delay before starting WPA
    /bin/sleep 2

    # Start wireless service
    systemctl enable wpa_supplicant@wlan0.service
    systemctl restart systemd-servicewomen
    systemctl restart wpa_supplicant@wlan0.service

    Running "ifconfig -a":

    dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP> mtu 1500
    inet 169.254.217.132 netmask 255.255.0.0 broadcast 169.254.255.255
    inet6 fe80::f85e:aa56:c1f5:6774 prefixlen 64 scopeid 0x20<link>
    ether 72:05:66:58:bc:6f txqueuelen 1000 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 22 bytes 3136 (3.0 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 1000 (Local Loopback)
    RX packets 108 bytes 7800 (7.6 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 108 bytes 7800 (7.6 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    wlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
    inet 10.0.0.35 netmask 255.255.255.0 broadcast 10.0.0.255
    inet6 fe80::8c88:fcff:feec:e39a prefixlen 64 scopeid 0x20<link>
    inet6 2601:190:500:79d0:bd0c:871:7f40:ee65 prefixlen 64 scopeid 0x0<global>
    inet6 2601:190:500:79d0::c696 prefixlen 128 scopeid 0x0<global>
    ether 8e:88:fc:ec:e3:9a txqueuelen 1000 (Ethernet)
    RX packets 147 bytes 20371 (19.8 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 323 bytes 44885 (43.8 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    Running ping:

    # ping 10.0.0.249
    PING 10.0.0.249 (10.0.0.249) 56(84) bytes of data.
    64 bytes from 10.0.0.249: icmp_seq=1 ttl=64 time=119 ms
    64 bytes from 10.0.0.249: icmp_seq=2 ttl=64 time=2.94 ms
    64 bytes from 10.0.0.249: icmp_seq=3 ttl=64 time=2.51 ms
    64 bytes from 10.0.0.249: icmp_seq=4 ttl=64 time=6.01 ms
    64 bytes from 10.0.0.249: icmp_seq=5 ttl=64 time=2.30 ms
    64 bytes from 10.0.0.249: icmp_seq=6 ttl=64 time=4.07 ms

    --- 10.0.0.249 ping statistics ---
    6 packets transmitted, 6 received, 0% packet loss, time 5007ms
    rtt min/avg/max/mdev = 2.298/22.862/119.355/43.170 ms