EC25 + FC20 Local Network IP Address of MCU

Hi,

I’m working with a EC25 + FC20 connected to a linux MCU via USB. Is there a way to set the local IP address of the MCU on the EC25 + FC20’s local area network so that other devices connected to the FC20’s WiFi network can communicate with the MCU over the LAN? The end goal is for devices on the WiFi network to be able to access a HTTP server running on the MCU.

Thank you!

Dear Han Yang,
Thanks for your inquiry in Quectel forum.
About your question, please help to confirm the following information:
1.how you Linux MCU can access the internet? Via module USB network card ?
2. if the above is true, please note that the IP address can not fixed by yourself, it assigned by network.
3.About your function, the Linux MCU and other devices can access the internet via module USB and WIFI, but the IP address cannot set like you said that. Thanks!

  1. Yes, through the SIM card on the EC25

So just to confirm devices connected to the FC20’s wifi and the MCU itself are not part of the same subnet? There’s no local IP address like 192.168.X.X that devices connected to the FC20’s wifi can use to address the MCU?

Dear Han Yang,
Just double check your question.If your MCU connect with module via USB cable and access the network through ECM or RNDIS mode, the FC20’s WIFI and the MCU are in the same LAN, if your MCU use NDIS, they may not in the same LAN. Thanks!

Hi Kyson,

Thank you for your prompt reply and sorry about the delay. I’m not sure which of the above modes it’s in, how do I check? It’s using the GobiNet driver. dmesg output:

GobiNet 3-1.2:1.4 usb0: register 'GobiNet' at usb-fe380000.usb-1.2, GobiNet Ethernet Device, 56:b8:f0:1d:35:f1

Dear Han Yang,
You can use AT+QCFG=“USBNET” to check the USB network card mode, if it returns 0 which is NDIS/RMNET, 1 means ECM mode, 2 means that MBIM mode, and 3 means that RNDIS mode. Thanks!

I see. It returned 0

AT+QCFG="USBNET"

+QCFG: "usbnet",0

so they might not be on the same LAN then. Is there any workaround for this?

Ah ok I found this post Is it possible to use EC25-E as an ethernet device on android device?. I’ll try enabling CONFIG_USB_NET_RNDIS_HOST and setting AT+QCFG="usbnet",3 and see what happens. I’ll continue posting if I run into more problems. Thanks!

I managed to get the WiFi and the MCU onto the same local area network by changing usbnet config to 3 and restarting the device as per this post and enabling CONFIG_USB_NET_RNDIS_HOST in the kernel. I think I also had to make this change to the kernel for /dev/ttyUSB2 to continue to respond to AT commands.

However, I now have a new problem. quectelCM seems to have stopped working so MCU is now unable to access the internet. This is the execution log:

[root@rk3399:~]# quectelCM 
[12-21_08:55:34:273] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
[12-21_08:55:34:273] quectelCM profile[1] = (null)/(null)/(null)/0, pincode = (null)
[12-21_08:55:34:274] Find /sys/bus/usb/devices/3-1.2 idVendor=2c7c idProduct=0125
[12-21_08:55:34:274] Find /sys/bus/usb/devices/3-1.2:1.4/net/usb1
[12-21_08:55:34:274] Find usbnet_adapter = usb1
[12-21_08:55:34:274] Find /sys/bus/usb/devices/3-1.2:1.4/GobiQMI/qcqmi1
[12-21_08:55:34:274] Find qmichannel = /dev/qcqmi1
[12-21_08:55:34:282] failed to get ClientID for 0x01 errno: 32 (Broken pipe)
[12-21_08:55:34:282] Get clientWDS = 0
[12-21_08:55:34:283] failed to get ClientID for 0x02 errno: 32 (Broken pipe)
[12-21_08:55:34:283] Get clientDMS = 0
[12-21_08:55:34:284] failed to get ClientID for 0x03 errno: 32 (Broken pipe)
[12-21_08:55:34:284] Get clientNAS = 0
[12-21_08:55:34:285] failed to get ClientID for 0x0b errno: 32 (Broken pipe)
[12-21_08:55:34:285] Get clientUIM = 0
[12-21_08:55:34:288] failed to get ClientID for 0x1a errno: 32 (Broken pipe)
[12-21_08:55:34:288] Get clientWDA = 0
[12-21_08:55:34:288] GobiNetThread Failed to open /dev/qcqmi1, errno: 32 (Broken pipe)
[12-21_08:55:34:288] main Failed to init QMIThread: 22 (Invalid argument)

Verify that qcqmi1 is being created:

[root@rk3399:~]# dmesg | grep qcqmi
[    2.430925] creating qcqmi1

[root@rk3399:~]# ls -lah /dev/qcqmi1 
crw------- 1 root root 240, 0 Dec 21 08:40 /dev/qcqmi1

dmesg output on usb connection:

[ 1034.970040] usb 3-1.2: new high-speed USB device number 4 using ehci-platform
[ 1035.066371] usb 3-1.2: New USB device found, idVendor=2c7c, idProduct=0125
[ 1035.067055] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1035.067720] usb 3-1.2: Product: Android
[ 1035.068201] usb 3-1.2: Manufacturer: Android
[ 1035.085717] rndis_host 3-1.2:1.0 usb0: register 'rndis_host' at usb-fe380000.usb-1.2, RNDIS device, 42:27:c0:da:29:ba
[ 1035.090016] option 3-1.2:1.2: GSM modem (1-port) converter detected
[ 1035.091574] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 1035.093470] option 3-1.2:1.3: GSM modem (1-port) converter detected
[ 1035.095637] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 1035.100367] GobiNet 3-1.2:1.4 usb1: register 'GobiNet' at usb-fe380000.usb-1.2, GobiNet Ethernet Device, 1a:91:c6:64:e1:03
[ 1035.103193] creating qcqmi1
[ 1035.105650] option 3-1.2:1.5: GSM modem (1-port) converter detected
[ 1035.107626] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 1035.257702] GobiNet 3-1.2:1.4 usb1: kevent 12 may have been dropped

Edit: From the GobiNet driver code it seems like it only supports NDIS/RMNET

I just tried switching to the qmi_wwan driver and tried all the possible USB network card modes. The kernel was modified according to the Quectel_WCDMA_LTE_Linux_USB_Driver_User_Guide.pdf version 1.3 for a v4.4.189 kernel. It seems like quectel-CM only works in NDIS/RMNET mode. I’m basically trying to do the same thing as this post. I’d imagine this is quite a common use-case, it shouldn’t be this difficult to set it up, right?

Also I realized I forgot to provide this info earlier but my EC25’s revision is EC25EFAR06A09M4G

I think ECM mode is the simplest and best fit for this right now. The version 1.9 documentation says that the module should automatically set up the data call. In ECM mode, ifconfig shows that I’ve successfully received a local IP address from the EC25:

usb0      Link encap:Ethernet  HWaddr 76:8F:25:0C:3B:4B  
          inet addr:192.168.225.48  Bcast:192.168.225.255  Mask:255.255.255.0
          inet6 addr: fe80::2a9f:b93:9177:caa9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:117 errors:0 dropped:0 overruns:0 frame:0
          TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5957 (5.8 KiB)  TX bytes:6475 (6.3 KiB)

However, when I try to ping any website, I get Destination Net Unreachable:

[root@rk3399:~]# ping -I usb0 1.1.1.1
PING 1.1.1.1 (1.1.1.1) from 192.168.225.48 usb0: 56(84) bytes of data.
From 192.168.225.1 icmp_seq=1 Destination Net Unreachable
From 192.168.225.1 icmp_seq=2 Destination Net Unreachable
From 192.168.225.1 icmp_seq=3 Destination Net Unreachable

Although im able to manually ping using an activated PDP context. This is the traceroute output:

[root@rk3399:~]# traceroute -i usb0 google.com
traceroute to google.com (74.125.200.138), 30 hops max, 46 byte packets
 1  192.168.225.1 (192.168.225.1)  1.089 ms !N  1.179 ms !N

Sorry about the information spam and for going slightly off-topic. I’m just trying to resolve this issue asap.

Please check the default route and bridge. Thanks!

Another team in the US was able to get ECM running with WiFi and MCU on the same LAN and being able to access the internet without any issues. On the other hand, I was able to get connection for only about a minute by setting dhcpcpd.conf to use clientid instead of duid before all my DNS lookup requests were refused by the gateway. We’re not sure if it’s a firmware, SIM card or maybe even a USB cable issue. Below are the differences in set-up:

Working
Firmware: EC25AFAR05A06M4G
SIM: T-mobile

Not Working
Firmware: EC25EFAR06A09M4G
SIM: Starhub

I won’t be investigating this issue further but I hope this information helps. Thank you for your help.

Thanks for your updating.
The issue may related to network setting, as you know that no matter USB network card or WIFI are all use the cellular network to access the internet. Thanks!

Hi
im working on project of wifi hotspot and i want to ask why we need to add an MCU with the lte module , means whats the exact function of the MCU when u have an lte module with wifi module .
thnk you !!

Please note that the MCU is used to control the module which can send AT command to module to control the module enable or disable the WIFI function. Thanks!

THNX a looot for ur reply