Issue-USB8997 WiFi Driver Fails After Reboot Unless ReInitialized

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue-USB8997 WiFi Driver Fails After Reboot Unless ReInitialized

Jump to solution
1,512 Views
rikins
Contributor III

 

I'm using a Murata LBEE5XV1YM (USB8997-based) Wi-Fi module in AP mode on a Linux system. The driver (mlan.ko, usb8997.ko) is loaded via an automated script during boot, and everything works fine initially.

Problem:

  • On first boot, the driver loads successfully, and AP mode starts correctly.

  • After a reboot, the driver fails to initialize properly. Wi-Fi doesn't work.

  • However, if I disable the auto-load, reboot once, and then re-enable it, the driver loads successfully again.

Logs After Reboot (Failure Case):

 
usb 1-1: new high-speed USB device number 3 using dwc2
USB probe: idVendor=1286 idProduct=204e bInterfaceNumber=0
VID/PID = 1286/204E, Boot2 version = 3201
woal_usb_probe: invalid endpoint assignment
Attach moal handle ops, card interface type: 0x404
USB8997: init module param from usr cfg
WLAN FW is active
fw_cap_info=0x185cbfa3, dev_cap_mask=0xffffffff
Register NXP 802.11 Adapter mlan0
Timeout cmd id (17.200047) APCMD_SYS_CONFIGURE [0xb0], act = 0x1
------------Dump info-----------
Commmand Timeout
mlan_processing =0
main_process_cnt =75
num_cmd_timeout = 1
last_cmd_id = 0x5b
last_cmd_act = 0x1
last_event = 0x0

 

Questions:

  • Is this a hardware timing issue, where the USB device isn’t fully ready when the driver is loading?

  • Or is it a software/initialization issue due to the way the drivers are loaded during boot?

  • When exactly should the driver be loaded for USB8997 to initialize reliably?

  • Is there any required delay or USB re-enumeration/reset that should be handled in the script?

Any help or guidance is appreciated. Let me know if you need more logs or config info.

Regards,
Rikin

Tags (4)
0 Kudos
Reply
1 Solution
1,310 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi @rikins ,

 

In the thread, we should just discuss the issue on unstable uAP connections after loading driver and starting hostapd.

>>Occasionally, it takes a long time to establish a connection.

(1) if you loading driver & starting hostapd manully, Does the issue still exist?

(2) About multiple service on linux platform.

You know, on linux platform, the following service can also manager network

--Networkmanager service

--connmand service

--iwd service

--wpa_supplicant service

--hostapd service

If you are using wpa_supplicant & hostapd, other service should be stopped, otherwise there exist interfere with each other.

>>In some cases, the board must be rebooted to restore functionality.

No need to do this. if you can write a script to do this. share an example I am using, you can change it according to you platform:

file name is : enable-ap.sh

---------------------

#! /bin/bash
insmod /home/root/bin_mxm/mlan.ko
insmod /home/root/bin_mxm/moal.ko mod_para=nxp/wifi_mod_para.conf

for (( i = 1; i <= 10; i++ ))
do
    ifconfig -a 2>&1 | grep -E "(mlan0|uap0|wfd0|mmlan0|muap0|mwfd0)" > /dev/null
    if [ $? -eq 0 ]; then
        break
    fi
    sleep 1
done
echo "enable uap0 and add gateway"
   ifconfig uap0 192.168.6.2 netmask 255.255.255.0 up
   route add default gw 192.168.6.1
echo "starting hostapd service for uap0"
   hostapd /etc/hostapd-uap0-5g.conf -B
echo "starting udhcpd service for uap0"
   udhcpd -S /etc/udhcpd-uap0.conf -f &
   sleep 1
echo "enable muap0 and add gatewy"
   ifconfig muap0 192.168.5.2 netmask 255.255.255.0 up
   route add default gw 192.168.5.1
echo "startig hosapd service for muap0"
   hostapd  /etc/hostapd-muap0-2g.conf -B
echo "starting udhcpd service for muap0"
   udhcpd -S /etc/udhcpd-muap0.conf -f &
---------------------
You can disable or enable some services in the script .
 
[Additional] 
To enable uAP and connect client to the uAP, these steps are needed:
-- Loading wifi driver
-- starting hosapd based on hostapd.conf
-- starting udhcpd based on udhcpd.conf
-- Client device connects the uAP
Here is the content of udhcpd.conf , as an example ,share it with you.
==================
start 192.168.6.10
end 192.168.6.20
interface uap0                    #default: eth0
max_leases 11                     #default: 254
remaining yes                    #default: yes
auto_time 7200                 #default: 7200 (2 hours)
decline_time 3600           #default: 3600 (1 hour)
conflict_time 3600           #default: 3600 (1 hour)
offer_time 60                     #default: 60 (1 minute)
min_lease 60                    #defult: 60
lease_file /etc/udhcpd.leases
opt dns 192.168.0.1 165.114.52.147 165.114.89.4         #DNS server IP address
option subnet 255.255.255.0
opt router 192.168.6.1             # uap ip address
option domain local
option lease 864000
==================
Then create udhcpd.leases file
# touch /etc/udhcpd.leases
After starting hostapd and give uap0 an IP address, start udhcpd sevice like below:
# udhcpd -S /etc/udhcpd.conf -f &

 

The client can get IP from the uAP.

 

Thanks!
Regards,

weidong

 

View solution in original post

0 Kudos
Reply
7 Replies
1,330 Views
rikins
Contributor III

Hi @weidong_sun ,

Any updates?

Rikin

0 Kudos
Reply
1,470 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @rikins ,

 

See below, please!

=========================

1. Loading driver manaully
Loading driver manually happens after system booting is done, at the moment, everything has been ready, so loading driver is no problem.
 
2. Auto-loading driver when system booting
The time loading driver automatically happens should be at least after usb drvier & cfg80211.ko are ready.
 
3. Trying to solve the issue
(1) Attempting to adjust the timing of loading the driver
 I feel the time of auto-loading driver is so early that dependent drivers has not been loaded before loading wifi driver.  
 
 
(2) Attempting to add ps_mode=2 & auto_ds=2 to wifi_mod_para.conf
 
[Note]
--Test
Try (1) first, to see if the issue is solved.
if not, Try (2), please!
--checking hardware
Before loading driver, you can run "lsusb" to see if usb driver of platform can find 88W8997.
 
=========================
 
Thanks!
Regards,
weidong
 
 
0 Kudos
Reply
1,419 Views
rikins
Contributor III

Hi @weidong_sun ,

Thanks for the reply.

I’ve made some progress on the USB8997 driver initialization. Specifically, I added a delay of approximately 10–15 seconds after boot. This ensures that the driver loads properly and the Access Point (AP) is enabled.

However, I'm still encountering several issues:

  1. Connection Instability
    1. Occasionally, it takes a long time to establish a connection. (sometimes it even doesn't connect and we need to reboot)
    2. In some cases, the board must be rebooted to restore functionality. (Same issue as described in this thread before)
  2. Performance Discrepancies
    1. While testing using iperf3, I observed significantly lower throughput in UDP compared to TCP.
    2. I tested with iperf3 -b 60M, but the maximum UDP speed I achieved was only around 10 Mbps.

 

Could this be related to driver stability, firmware behavior, or hardware limitations? Any insights or suggestions for further debugging would be appreciated.

FYR, below are my configs and iperf3 logs attached.
1. hostapd_2ghz.conf:

ctrl_interface=/var/run/hostapd
interface=uap0
driver=nl80211
ssid=nveyetech54
hw_mode=g
channel=6
max_num_sta=10
auth_algs=1
beacon_int=100
dtim_period=1
wmm_enabled=1
ignore_broadcast_ssid=0

# Enable HT (802.11n)
ieee80211n=1
ieee80211d=1
country_code=IN
ieee80211h=1
ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][RX-STBC1][TX-STBC][DSSS_CCK-40]

ap_max_inactivity=0

wpa_key_mgmt=WPA-PSK
wpa=2
rsn_pairwise=CCMP
wpa_passphrase=1234567890
own_ip_addr=192.168.2.1


2. iperf3 logs:

$ iperf3 -c 192.168.2.1 -R -u -b 60M -t 10

$ iperf3 -c 192.168.2.1 -R -u -b 60M -t 10
Connecting to host 192.168.2.1, port 5201
Reverse mode, remote host 192.168.2.1 is sending
[ 5] local 192.168.2.56 port 54302 connected to 192.168.2.1 port 5201
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-1.00 sec 1.34 MBytes 11.3 Mbits/sec 0.507 ms 0/972 (0%)
[ 5] 1.00-2.00 sec 1.06 MBytes 8.92 Mbits/sec 2.132 ms 0/770 (0%)
[ 5] 2.00-3.00 sec 1.00 MBytes 8.42 Mbits/sec 1.385 ms 0/727 (0%)
[ 5] 3.00-4.00 sec 1.30 MBytes 10.9 Mbits/sec 0.874 ms 0/943 (0%)
[ 5] 4.00-5.00 sec 1004 KBytes 8.22 Mbits/sec 0.908 ms 0/710 (0%)
[ 5] 5.00-6.00 sec 1.22 MBytes 10.3 Mbits/sec 0.743 ms 0/886 (0%)
[ 5] 6.00-7.00 sec 1.32 MBytes 11.1 Mbits/sec 0.826 ms 0/958 (0%)
[ 5] 7.00-8.00 sec 858 KBytes 7.03 Mbits/sec 0.969 ms 0/607 (0%)
[ 5] 8.00-9.00 sec 1.28 MBytes 10.7 Mbits/sec 0.441 ms 0/925 (0%)
[ 5] 9.00-10.00 sec 1.29 MBytes 10.9 Mbits/sec 0.798 ms 0/937 (0%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-10.00 sec 11.6 MBytes 9.77 Mbits/sec 0.000 ms 0/8435 (0%) sender
[ 5] 0.00-10.00 sec 11.6 MBytes 9.77 Mbits/sec 0.798 ms 0/8435 (0%) receiver

iperf Done.

 

$ iperf3 -c 192.168.2.1 -R -t 50

Connecting to host 192.168.2.1, port 5201
Reverse mode, remote host 192.168.2.1 is sending
[ 5] local 192.168.2.56 port 50920 connected to 192.168.2.1 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 2.41 MBytes 20.2 Mbits/sec
[ 5] 1.00-2.00 sec 3.24 MBytes 27.1 Mbits/sec
[ 5] 2.00-3.00 sec 3.92 MBytes 32.9 Mbits/sec
[ 5] 3.00-4.00 sec 3.47 MBytes 29.1 Mbits/sec
[ 5] 4.00-5.00 sec 3.35 MBytes 28.1 Mbits/sec
[ 5] 5.00-6.00 sec 3.93 MBytes 33.0 Mbits/sec
[ 5] 6.00-7.00 sec 3.13 MBytes 26.2 Mbits/sec
[ 5] 7.00-8.00 sec 3.29 MBytes 27.6 Mbits/sec
[ 5] 8.00-9.00 sec 3.96 MBytes 33.3 Mbits/sec
[ 5] 9.00-10.00 sec 3.65 MBytes 30.6 Mbits/sec
[ 5] 10.00-11.00 sec 3.16 MBytes 26.5 Mbits/sec
[ 5] 11.00-12.00 sec 3.99 MBytes 33.5 Mbits/sec
[ 5] 12.00-13.00 sec 3.32 MBytes 27.8 Mbits/sec
[ 5] 13.00-14.00 sec 3.36 MBytes 28.2 Mbits/sec
[ 5] 14.00-15.00 sec 3.93 MBytes 33.0 Mbits/sec
[ 5] 15.00-16.00 sec 3.17 MBytes 26.6 Mbits/sec
[ 5] 16.00-17.00 sec 3.36 MBytes 28.2 Mbits/sec
[ 5] 17.00-18.00 sec 3.64 MBytes 30.6 Mbits/sec
[ 5] 18.00-19.00 sec 2.95 MBytes 24.8 Mbits/sec
[ 5] 19.00-20.00 sec 3.24 MBytes 27.2 Mbits/sec
[ 5] 20.00-21.00 sec 4.09 MBytes 34.3 Mbits/sec
[ 5] 21.00-22.00 sec 2.71 MBytes 22.7 Mbits/sec
[ 5] 22.00-23.00 sec 3.57 MBytes 30.0 Mbits/sec
[ 5] 23.00-24.00 sec 3.63 MBytes 30.4 Mbits/sec
[ 5] 24.00-25.00 sec 2.61 MBytes 21.9 Mbits/sec
[ 5] 25.00-26.00 sec 3.53 MBytes 29.6 Mbits/sec
[ 5] 26.00-27.00 sec 3.73 MBytes 31.3 Mbits/sec
[ 5] 27.00-28.00 sec 2.82 MBytes 23.7 Mbits/sec
[ 5] 28.00-29.00 sec 3.92 MBytes 32.9 Mbits/sec
[ 5] 29.00-30.00 sec 3.53 MBytes 29.6 Mbits/sec
[ 5] 30.00-31.00 sec 3.38 MBytes 28.3 Mbits/sec
[ 5] 31.00-32.00 sec 3.98 MBytes 33.4 Mbits/sec
[ 5] 32.00-33.00 sec 3.26 MBytes 27.3 Mbits/sec
[ 5] 33.00-34.00 sec 3.20 MBytes 26.9 Mbits/sec
[ 5] 34.00-35.00 sec 3.98 MBytes 33.4 Mbits/sec
[ 5] 35.00-36.00 sec 3.30 MBytes 27.7 Mbits/sec
[ 5] 36.00-37.00 sec 3.33 MBytes 27.9 Mbits/sec
[ 5] 37.00-38.00 sec 3.77 MBytes 31.6 Mbits/sec
[ 5] 38.00-39.00 sec 3.19 MBytes 26.8 Mbits/sec
[ 5] 39.00-40.00 sec 3.23 MBytes 27.1 Mbits/sec
[ 5] 40.00-41.00 sec 3.83 MBytes 32.1 Mbits/sec
[ 5] 41.00-42.00 sec 3.02 MBytes 25.3 Mbits/sec
[ 5] 42.00-43.00 sec 3.56 MBytes 29.9 Mbits/sec
[ 5] 43.00-44.00 sec 3.79 MBytes 31.8 Mbits/sec
[ 5] 44.00-45.00 sec 3.00 MBytes 25.2 Mbits/sec
[ 5] 45.00-46.00 sec 3.70 MBytes 31.0 Mbits/sec
[ 5] 46.00-47.00 sec 3.91 MBytes 32.8 Mbits/sec
[ 5] 47.00-48.00 sec 2.84 MBytes 23.8 Mbits/sec
[ 5] 48.00-49.00 sec 3.79 MBytes 31.8 Mbits/sec
[ 5] 49.00-50.00 sec 3.37 MBytes 28.3 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-50.00 sec 173 MBytes 29.1 Mbits/sec 6 sender
[ 5] 0.00-50.00 sec 172 MBytes 28.9 Mbits/sec receiver

iperf Done.

 

$iperf3 -c 192.168.2.1 -t 50

Connecting to host 192.168.2.1, port 5201
[ 5] local 192.168.2.56 port 51372 connected to 192.168.2.1 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 3.86 MBytes 32.3 Mbits/sec 11 219 KBytes
[ 5] 1.00-2.00 sec 3.83 MBytes 32.1 Mbits/sec 0 219 KBytes
[ 5] 2.00-3.00 sec 3.32 MBytes 27.9 Mbits/sec 4 219 KBytes
[ 5] 3.00-4.00 sec 3.42 MBytes 28.7 Mbits/sec 6 219 KBytes
[ 5] 4.00-5.00 sec 3.47 MBytes 29.1 Mbits/sec 1 219 KBytes
[ 5] 5.00-6.00 sec 3.88 MBytes 32.6 Mbits/sec 14 219 KBytes
[ 5] 6.00-7.00 sec 3.47 MBytes 29.1 Mbits/sec 4 219 KBytes
[ 5] 7.00-8.00 sec 3.88 MBytes 32.6 Mbits/sec 4 219 KBytes
[ 5] 8.00-9.00 sec 3.37 MBytes 28.3 Mbits/sec 8 219 KBytes
[ 5] 9.00-10.00 sec 3.78 MBytes 31.7 Mbits/sec 0 219 KBytes
[ 5] 10.00-11.00 sec 3.99 MBytes 33.4 Mbits/sec 0 219 KBytes
[ 5] 11.00-12.00 sec 3.27 MBytes 27.4 Mbits/sec 1 219 KBytes
[ 5] 12.00-13.00 sec 3.88 MBytes 32.6 Mbits/sec 11 219 KBytes
[ 5] 13.00-14.00 sec 3.37 MBytes 28.3 Mbits/sec 0 219 KBytes
[ 5] 14.00-15.00 sec 3.73 MBytes 31.3 Mbits/sec 0 219 KBytes
[ 5] 15.00-16.00 sec 3.88 MBytes 32.6 Mbits/sec 0 219 KBytes
[ 5] 16.00-17.00 sec 3.27 MBytes 27.4 Mbits/sec 5 219 KBytes
[ 5] 17.00-18.00 sec 3.47 MBytes 29.1 Mbits/sec 0 219 KBytes
[ 5] 18.00-19.00 sec 3.37 MBytes 28.3 Mbits/sec 0 219 KBytes
[ 5] 19.00-20.00 sec 3.83 MBytes 32.1 Mbits/sec 15 219 KBytes
[ 5] 20.00-21.00 sec 3.37 MBytes 28.3 Mbits/sec 1 219 KBytes
[ 5] 21.00-22.00 sec 3.37 MBytes 28.3 Mbits/sec 7 219 KBytes
[ 5] 22.00-23.00 sec 3.93 MBytes 33.0 Mbits/sec 4 219 KBytes
[ 5] 23.00-24.00 sec 3.42 MBytes 28.7 Mbits/sec 1 219 KBytes
[ 5] 24.00-25.00 sec 3.73 MBytes 31.3 Mbits/sec 0 219 KBytes
[ 5] 25.00-26.00 sec 3.73 MBytes 31.3 Mbits/sec 4 219 KBytes
[ 5] 26.00-27.00 sec 3.37 MBytes 28.3 Mbits/sec 1 219 KBytes
[ 5] 27.00-28.00 sec 3.83 MBytes 32.1 Mbits/sec 0 219 KBytes
[ 5] 28.00-29.00 sec 3.42 MBytes 28.7 Mbits/sec 0 219 KBytes
[ 5] 29.00-30.00 sec 3.42 MBytes 28.7 Mbits/sec 0 219 KBytes
[ 5] 30.00-31.00 sec 3.78 MBytes 31.7 Mbits/sec 0 219 KBytes
[ 5] 31.00-32.00 sec 3.32 MBytes 27.9 Mbits/sec 0 219 KBytes
[ 5] 32.00-33.00 sec 3.78 MBytes 31.7 Mbits/sec 0 219 KBytes
[ 5] 33.00-34.00 sec 3.99 MBytes 33.4 Mbits/sec 0 219 KBytes
[ 5] 34.00-35.00 sec 3.37 MBytes 28.3 Mbits/sec 0 219 KBytes
[ 5] 35.00-36.00 sec 3.93 MBytes 33.0 Mbits/sec 0 219 KBytes
[ 5] 36.00-37.00 sec 3.53 MBytes 29.6 Mbits/sec 0 219 KBytes
[ 5] 37.00-38.00 sec 3.83 MBytes 32.1 Mbits/sec 0 219 KBytes
[ 5] 38.00-39.00 sec 3.93 MBytes 33.0 Mbits/sec 0 219 KBytes
[ 5] 39.00-40.00 sec 3.37 MBytes 28.3 Mbits/sec 0 219 KBytes
[ 5] 40.00-41.00 sec 3.83 MBytes 32.1 Mbits/sec 0 219 KBytes
[ 5] 41.00-42.00 sec 3.83 MBytes 32.1 Mbits/sec 0 219 KBytes
[ 5] 42.00-43.00 sec 3.42 MBytes 28.7 Mbits/sec 1 219 KBytes
[ 5] 43.00-44.00 sec 3.27 MBytes 27.4 Mbits/sec 0 219 KBytes
[ 5] 44.00-45.00 sec 4.34 MBytes 36.4 Mbits/sec 0 219 KBytes
[ 5] 45.00-46.00 sec 3.27 MBytes 27.4 Mbits/sec 1 219 KBytes
[ 5] 46.00-47.00 sec 3.32 MBytes 27.9 Mbits/sec 0 219 KBytes
[ 5] 47.00-48.00 sec 3.99 MBytes 33.4 Mbits/sec 0 219 KBytes
[ 5] 48.00-49.00 sec 3.27 MBytes 27.4 Mbits/sec 6 219 KBytes
[ 5] 49.00-50.00 sec 3.88 MBytes 32.6 Mbits/sec 0 219 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-50.00 sec 181 MBytes 30.4 Mbits/sec 110 sender
[ 5] 0.00-50.00 sec 180 MBytes 30.2 Mbits/sec receiver

iperf Done.

 

0 Kudos
Reply
1,311 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi @rikins ,

 

In the thread, we should just discuss the issue on unstable uAP connections after loading driver and starting hostapd.

>>Occasionally, it takes a long time to establish a connection.

(1) if you loading driver & starting hostapd manully, Does the issue still exist?

(2) About multiple service on linux platform.

You know, on linux platform, the following service can also manager network

--Networkmanager service

--connmand service

--iwd service

--wpa_supplicant service

--hostapd service

If you are using wpa_supplicant & hostapd, other service should be stopped, otherwise there exist interfere with each other.

>>In some cases, the board must be rebooted to restore functionality.

No need to do this. if you can write a script to do this. share an example I am using, you can change it according to you platform:

file name is : enable-ap.sh

---------------------

#! /bin/bash
insmod /home/root/bin_mxm/mlan.ko
insmod /home/root/bin_mxm/moal.ko mod_para=nxp/wifi_mod_para.conf

for (( i = 1; i <= 10; i++ ))
do
    ifconfig -a 2>&1 | grep -E "(mlan0|uap0|wfd0|mmlan0|muap0|mwfd0)" > /dev/null
    if [ $? -eq 0 ]; then
        break
    fi
    sleep 1
done
echo "enable uap0 and add gateway"
   ifconfig uap0 192.168.6.2 netmask 255.255.255.0 up
   route add default gw 192.168.6.1
echo "starting hostapd service for uap0"
   hostapd /etc/hostapd-uap0-5g.conf -B
echo "starting udhcpd service for uap0"
   udhcpd -S /etc/udhcpd-uap0.conf -f &
   sleep 1
echo "enable muap0 and add gatewy"
   ifconfig muap0 192.168.5.2 netmask 255.255.255.0 up
   route add default gw 192.168.5.1
echo "startig hosapd service for muap0"
   hostapd  /etc/hostapd-muap0-2g.conf -B
echo "starting udhcpd service for muap0"
   udhcpd -S /etc/udhcpd-muap0.conf -f &
---------------------
You can disable or enable some services in the script .
 
[Additional] 
To enable uAP and connect client to the uAP, these steps are needed:
-- Loading wifi driver
-- starting hosapd based on hostapd.conf
-- starting udhcpd based on udhcpd.conf
-- Client device connects the uAP
Here is the content of udhcpd.conf , as an example ,share it with you.
==================
start 192.168.6.10
end 192.168.6.20
interface uap0                    #default: eth0
max_leases 11                     #default: 254
remaining yes                    #default: yes
auto_time 7200                 #default: 7200 (2 hours)
decline_time 3600           #default: 3600 (1 hour)
conflict_time 3600           #default: 3600 (1 hour)
offer_time 60                     #default: 60 (1 minute)
min_lease 60                    #defult: 60
lease_file /etc/udhcpd.leases
opt dns 192.168.0.1 165.114.52.147 165.114.89.4         #DNS server IP address
option subnet 255.255.255.0
opt router 192.168.6.1             # uap ip address
option domain local
option lease 864000
==================
Then create udhcpd.leases file
# touch /etc/udhcpd.leases
After starting hostapd and give uap0 an IP address, start udhcpd sevice like below:
# udhcpd -S /etc/udhcpd.conf -f &

 

The client can get IP from the uAP.

 

Thanks!
Regards,

weidong

 

0 Kudos
Reply
1,284 Views
rikins
Contributor III

Hi @weidong_sun ,

Thank you for the response.

I see the change, now it's more stable. But still occasionally, it takes a long time to establish a connection.
[Note: Connection failure errors are now resolved. After these changes, I haven't observed any disconnection or connection breaks.]

The major change is that earlier my flow was "load drivers -> dnsmasq -> hostapd" and now I updated the flow with "load drivers -> hostapd -> dnsmasq". 

FYI, I am using the below script, and instead of udhcpd, I am using dnsmasq. It will be fine, right?

dnsmasq.conf:
```
interface=uap0
dhcp-range=192.168.2.3,192.168.2.230,12h
dhcp-leasefile=/var/run/dnsmasq.leases
dhcp-option=3,192.168.2.1
dhcp-option=6,8.8.8.8,8.8.4.4
```

Regards,
Rikin

0 Kudos
Reply
1,262 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi @rikins ,

 

For dnsmasq  & udhcpd, same function,  one of them is OK.

But don't start them at the same time, because they will take up the same port of network.

If the issue is resolved, please help to close the ticket!  that is to take a discussion to be a final solution.

 

Thanks!

Regards,

weidong

0 Kudos
Reply
1,250 Views
rikins
Contributor III

Hi @weidong_sun ,

Thanks for the help. 

The issue is 90% resolved, but still, the connection establishment takes time. Could you please guide me on that -- perhaps suggest how I can improve it?

0 Kudos
Reply