EC25 DHCP Problem with Embedded Busyboxy board

Hi
We have a BananaPi board connected to an EC25 module, running Linux kernel v3.4.85 with Busybox v1.20.2.
We have used the qmi_wwan.c driver
Our module works fine with Ubuntu 12.4 on the laptop, but it fails on the embedded board. Both kernels and Busybox versions are the same (Laptop vs. Embedded Board).
udhcpc (DHCP Client) cannot set the IP address. More specifically it hangs up when it gets to “send discover”.
It does not proceed to take the IP address, so we cannot connect to the internet.
We have done as below:
1- Add VID and PID
2- Add Support for Raw IP Mode
3- Modify Kernel Configuration
4- Connecting to Modem: For connecting to the internet we use the quectel-CM
Then it loads the modem driver as follows:

usb 1-1: new high-speed USB device number 2 using usb-host

usb 1-1: New USB device found, idVendor=2c7c, idProduct=0125

usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

usb 1-1: Product: Android

usb 1-1: Manufacturer: Android

qmi_wwan 1-1:1.0: not on our whitelist - ignored

qmi_wwan 1-1:1.4: cdc-wdm0: USB WDM device

qmi_wwan 1-1:1.4: Quectel EC25&EC21&EC20R2.0&EG91&EG95&EG06&EP06&EM06&BG96 work on RawIP mode

qmi_wwan 1-1:1.4: wwan0: register ‘qmi_wwan’ at usb-Anyka usb host controller-1, Qualcomm WWAN/QMI device, 3a:cf:cf:6c:02:64

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

But it fails to get IP:

==================================================================
[root@Lamobo-D1 /mnt]$ ./quectel-CM

[01-01_08:01:19:469] Quectel_Linux_ConnectManager_SR01A01V23

[01-01_08:01:19:475] ./quectel-CM profile[1] = (null)/(null)/(null)/0, pincode = (null)

[01-01_08:01:19:478] Find qmichannel = /dev/cdc-wdm0

[01-01_08:01:19:479] Find usbnet_adapter = wwan0

[01-01_08:01:19:519] cdc_wdm_fd = 7

[01-01_08:01:20:531] QmiThreadSendQMITimeout pthread_cond_timeout_np=110, errno: 22 (Invalid argument)

[01-01_08:01:21:633] Get clientWDS = 19

[01-01_08:01:21:665] Get clientDMS = 1

[01-01_08:01:21:698] Get clientNAS = 3

[01-01_08:01:21:728] Get clientUIM = 1

[01-01_08:01:21:761] Get clientWDA = 1

[01-01_08:01:21:793] requestBaseBandVersion EC25EFAR02A03M4G 1 [Aug 05 2016 04:00:00]

[01-01_08:01:21:858] requestGetSIMStatus SIMStatus: SIM_READY

[01-01_08:01:21:889] requestGetProfile[1] mcinet///0

[01-01_08:01:21:923] requestRegistrationState2 MCC: 432, MNC: 11, PS: Attached, DataCap: LTE

[01-01_08:01:21:952] requestQueryDataCall ConnectionStatus: DISCONNECTED

[01-01_08:01:22:017] requestRegistrationState2 MCC: 432, MNC: 11, PS: Attached, DataCap: LTE

[01-01_08:01:22:049] requestSetupDataCall WdsConnectionIPv4Handle: 0x87990170

[01-01_08:01:22:144] requestQueryDataCall ConnectionStatus: CONNECTED

[01-01_08:01:22:309] udhcpc (v1.20.2) started

[01-01_08:01:22:414] Sending discover…

[01-01_08:01:25:423] Sending discover…

[01-01_08:01:28:435] Sending discover…

[01-01_08:01:31:443] Sending discover…

[01-01_08:01:34:453] Sending discover…

[01-01_08:01:37:474] requestQueryDataCall ConnectionStatus: DISCONNECTED

[01-01_08:01:37:505] requestRegistrationState2 MCC: 432, MNC: 11, PS: Attached, DataCap: LTE

[01-01_08:01:37:536] requestSetupDataCall WdsConnectionIPv4Handle: 0x87990170

[01-01_08:01:37:541] /usr/share/udhcpc/default.script: Lease failed:

[01-01_08:01:37:549] No lease, failing

[01-01_08:01:37:611] requestQueryDataCall ConnectionStatus: CONNECTED

[01-01_08:01:37:730] udhcpc (v1.20.2) started

[01-01_08:01:37:827] Sending discover…

[01-01_08:01:40:833] Sending discover…

[01-01_08:01:43:851] Sending discover…

========================================================
What could we do?

Dear Mohammad Saeed Jahan,
Please use the following latest CM tool to have a try again. If still failed, please save the log and send to us, we will help you confirm the reason. Thanks!
By the way, you can can add the APN information when you make a dial with CM tool. Thanks!
image
https://cnquectel-my.sharepoint.com/:u:/g/personal/asean-fae_quectel_com/ESH3BAW-MFZNjr4wQ2364Q4Btmo7ZGyyRGSQ2bkWbmEbJQ?e=pQp0qG

Dear Kyson,
Thanks for your reply.
We used the new version as you guided, unfortunately it still fails.
The log file is renamed to log_0749 and is attached.
Please keep in mind that we are using busybox. There may be some package that should be integrated in the busybox and we do not know what it is.
Thanks
log_0749.pdf (50.5 KB)

Dear @Kyson
Could you find any idea?
We have followed the bug and we reached some clues that I share here:

We understood that function “udhcpc_main” does not work correctly in our system.
The “udhcpc_main” function goes into an “INIT_SELECTING” state, in which it calls “send_discover” function.
The “send_discover” function calls two others: “raw_bcast_from_client_config_ifindex” and
“udcp_send_raw_packet”.
After “send_discover” the “udhcpc_main” enters its for loop and waits for a “poll” function (or “select” depending on the busybox version) for events to be occurred on socket number 3; i.e. “AX.25 Radio” socket on the x86 or the same “SO Type” on the ARM platform.
Based on this polling a “retval” variable could be 1 or 0. Unfortunately this “retval” value never becomes 1, thereby send discover timeout and the process repeats for ever. This means that we cannot get IP.

We have a very tight timing budget, so any help from anyone (@mortezaaliahmadi and others) is highly appreciated.
Thanks

Dear @Kyson
We moved one step forward! We cannot acquire IP but we are getting a new log. Actually, our IP is set 0.0.0.0 which means that still we have no IP. Please have a look at the new log (log_1810), partially here for ease of reference:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[01-01_08:01:22:188] Quectel_Linux_ConnectManager_SR01A01V23
[01-01_08:01:22:194] ./quectel-CM profile[1] = (null)/(null)/(null)/0, pincode = (null)
[01-01_08:01:22:196] Find qmichannel = /dev/qcqmi1
[01-01_08:01:22:198] Find usbnet_adapter = eth1
[01-01_08:01:22:283] Get clientWDS = 8
[01-01_08:01:22:315] Get clientDMS = 9
[01-01_08:01:22:346] Get clientNAS = 10
[01-01_08:01:22:381] Get clientUIM = 11
[01-01_08:01:22:412] Get clientWDA = 12
[01-01_08:01:22:444] requestBaseBandVersion EC25EFAR02A03M4G 1 [Aug 05 2016 04:00:00]
[01-01_08:01:22:508] requestGetSIMStatus SIMStatus: SIM_READY
[01-01_08:01:22:539] requestGetProfile[1] mcinet///0
[01-01_08:01:22:573] requestRegistrationState2 MCC: 432, MNC: 11, PS: Attached, DataCap: LTE
[01-01_08:01:22:604] requestQueryDataCall ConnectionStatus: DISCONNECTED
[01-01_08:01:22:668] requestRegistrationState2 MCC: 432, MNC: 11, PS: Attached, DataCap: LTE
[01-01_08:01:22:699] requestSetupDataCall WdsConnectionIPv4Handle: 0x87990220
[01-01_08:01:22:795] requestQueryDataCall ConnectionStatus: CONNECTED
[01-01_08:01:22:833] interface is (eth1)
udhcpc: started, v1.31.1
[01-01_08:01:23:544] Setting IP address 0.0.0.0 on eth1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

We moved one step forward because some of the networking options were not enabled in our custom OS image, so I have attached those additional configurations which lead to the new log (log_1810).

I have also attached all my Linux configuration file, so that you may help us with finding what our system lacks which prevents us from acquiring IP.
Any help is highly appreciated (@WillieYao-Q, @mortezaaliahmadi, and others ). Thanks.
aimer39_ak3918_D1_defconfig.pdf (133.1 KB) diff_conf.pdf (43.3 KB) log_1810.pdf (59.2 KB)

1 Like

We used the newer version of the Quectel-CM, based on the advices in this post, nevertheless no change! Still we cannot get IP.
Unfortunately this is not only our problem. Others like this and this post have had similar problems, yet no solution!

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
quectel-CM
[06-19_15:48:23:856] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
[06-19_15:48:23:869] /mnt/quectel-CM profile[1] = (null)/(null)/(null)/0, pincode = (null)
[06-19_15:48:23:906] Find /sys/bus/usb/devices/1-1 idVendor=2c7c idProduct=0125
[06-19_15:48:23:907] Find /sys/bus/usb/devices/1-1:1.4/net/wwan0
[06-19_15:48:23:908] Find usbnet_adapter = wwan0
[06-19_15:48:23:931] Find /sys/bus/usb/devices/1-1:1.4/usb/cdc-wdm0
[06-19_15:48:23:931] Find qmichannel = /dev/cdc-wdm0
[06-19_15:48:24:008] cdc_wdm_fd = 7
[06-19_15:48:25:031] QmiThreadSendQMITimeout pthread_cond_timeout_np=110, errno: 2 (No such file or directory)
[06-19_15:48:26:111] Get clientWDS = 19
[06-19_15:48:26:144] Get clientDMS = 1
[06-19_15:48:26:176] Get clientNAS = 3
[06-19_15:48:26:207] Get clientUIM = 1
[06-19_15:48:26:239] Get clientWDA = 1
[06-19_15:48:26:272] requestBaseBandVersion EC25EFAR02A03M4G 1 [Aug 05 2016 04:00:00]
[06-19_15:48:26:402] requestGetSIMStatus SIMStatus: SIM_READY
[06-19_15:48:26:432] requestGetProfile[1] mcinet///0
[06-19_15:48:26:464] requestRegistrationState2 MCC: 432, MNC: 11, PS: Attached, DataCap: LTE
[06-19_15:48:26:496] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[06-19_15:48:26:559] requestRegistrationState2 MCC: 432, MNC: 11, PS: Attached, DataCap: LTE
[06-19_15:48:26:624] requestSetupDataCall WdsConnectionIPv4Handle: 0x8799a580
[06-19_15:48:26:687] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
[06-19_15:48:26:720] ifconfig wwan0 up
[06-19_15:48:26:815] busybox udhcpc -f -n -q -t 5 -i wwan0
udhcpc: started, v1.31.1
[06-19_15:48:28:709] Setting IP address 0.0.0.0 on wwan0
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, failing
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

We are still waiting for any help from anyone; including but limited to @Kyson, @WillieYao-Q, @mortezaaliahmadi, @Sukru_Bahadir_Arslan, @jerry, @jitenshap, and @tigerxy who have had similar experiences.
Thanks

Dear Mohammad Saeed Jahan,
Please make sure you have change the kernel code according to the guide document, and compile success.
Quectel_WCDMA&LTE_Linux_USB_Driver_User_Guide_V1.8.pdf (1.1 MB)
Please try to use the latest CM tool to have a try.The following is the latest CM tool, please update it to have a try.
https://cnquectel-my.sharepoint.com/:u:/g/personal/asean-fae_quectel_com/ESBiQhVQnWFDssTJuG8_MxoB371IVo0D1JJsUBSx6Qts1A?e=hJw0FR

By the way, you can use the default.script file inside the CM package to replace the same file in your system and try it again. Thanks!