Network problems with LTE modem in CDC NCM mode

Good day! I'm trying to run the Fibocom L860-GL LTE modem on FreeBSD 14.1. This modem can work in CDC NCM mode. There is a script on the Internet that one good person wrote for this modem using PowerShell under Win and shared it. The essence of the script is quite simple: first, the modem is configured with a bunch of AT commands, IP settings are requested from the operator, then, according to them, the network interface and route are configured. I reproduced the essence of the script, but the connection does not work under FreeBSD. I tried the following steps in my system:

1. We configure the modem through its console:
> picocom /dev/cuaU2
Code:
[a number of AT commands skipped here]
 AT+CGDATA=M-RAW_IP,1

OK

CONNECT
Here we got the modem connection on its CDC NCM interface. There we also requested $IP, $MASK, $GW

2. We configure the network interface:
> ifconfig ue0 inet $IP netmask $MASK
> ifconfig ue0
Code:
ue0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 00:00:11:12:13:14
        inet 10.22.114.24 netmask 0xff000000 broadcast 10.255.255.255
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

3. Set up the route:
> route add default $GW
> netstat -r4
Routing tables

Code:
Internet:
Destination        Gateway            Flags     Netif Expire
default            10.22.114.25       UGS         ue0
10.0.0.0/8         link#4             U           ue0
10.22.114.24       link#3             UHS         lo0
localhost link#3 UH lo0

4. Checking what happenning. Now pings goes only to the $IP of the interface itself, and with some random delays. Other hosts are not available.

5. What I'm doing wrong? Please help.

PS: To check the functionality of the hardware, I used the following options: 1) Win10 with the original PowerShell script for setting up the modem as CDC NCM device; 2) ppp in FreeBSD for setting up the modem on its cuaU interface. Both options work. But I would like to have CDC NCM connection in FreeBSD. But how?
 
Break out the manual and I bet you have other modes.
Phishfry, thank you for ideas!

Regarding AT+CGDATA= command options. I'm using option taken from the working PowerShell script. Also I read the thread from your message and found two more sources with the same option as mine. But I also check all available options for this command on practice and it was not successful with any of them.

Regarding ATG+USBMODE command. This command is not supported by the recent modem FW versions as mine...

So far as the modem working fine as a CDC NCM device in the same rig but under Win10 OS, my guess is something wrong with FreeBSD setup but not with modem configuration script. I have a "status: active" for ue0 interface after modem init commands and setting up the interface address and I put a default route in the table. This is all my knowledge how to set up a single interface network. Now I have "ping: sendto: no route to host" for any IP address except ue0 interface itself. May be I missing something around...
 
The problem is solved. It was necessary to add to the ARP table the gateway IP address with the same MAC as the interface IP has.
 
Back
Top