[Solved] Huawei E3372s-153 in NCM mode not working

Hi,

I am trying to get my modems Huawei E3372s-153 and E3372h-153 to work on Omnia with latest stable TurrisOS 3.9.6, but with no luck. For now I just want to start a discussion. I am going to post some steps I made and logs in some free time cuz it’s friday and I am an alcoholic :smiley:

Do you want official support for usb modems in NCM mode in the future releases (package: luci-proto-ncm)?

  • Yes
  • No

0 voters

EDIT:
So what I am trying to do is to have my modem getting public ip directly on the interface not via double-NAT like it is done in HiLink firmware versions of this modem, so like that I could finally host an apache server and serve it to the world.

Here is what I have tried until now:

CONFIGURATION 1 (working, but not what I want)

  1. I have omnia’s wan interface set to dhcp client connected with eth3 (one of my modems E3372h-153 in HighLink mode) and getting this local ip 192.168.8.100.
  2. I have internet connection. Great. All seems to work fine but I am ‘behind double NAT’ to access the Internets. And that is not fine, cuz like I said I want to have my apache server (in Omnia’s LXC container) shared with the world.

CONFIGURATION 2 (still testing, not working)

  1. I flashed one of my modems with firmware letting it work in NCM mode. It’s so called ‘Stick mode’ with firmware versions beginign with 21.xx.xx.xx… not 22.xx.xx.xx.xx. One I am using to acces the internet the other one to try to make it work in NCM mode.
  2. I’ve tested if it’s working on my debian desktop. It is working. Here are some commands:
    areyouloco@frank:~$ ls /dev/ | grep ttyUSB
    ttyUSB0
    ttyUSB1
    areyouloco@frank:~$ sudo minicom -D /dev/ttyUSB0
    //TEST
    AT
    OK
    //GET LIST OF MODES
    AT^SETPORT=?
    ^SETPORT:3: 3G DIAG
    ^SETPORT:10: 4G MODEM
    ^SETPORT:1: 3G MODEM
    ^SETPORT:12: 4G PCUI
    ^SETPORT:13: 4G DIAG
    ^SETPORT:5: 3G GPS
    ^SETPORT:14: 4G GPS
    ^SETPORT:A: BLUE TOOTH
    ^SETPORT:16: NCM
    ^SETPORT:A1: CDROM
    ^SETPORT:A2: SD
    OK
    //CURRENT MODE (default)
    AT^SETPORT?
    ^SETPORT:“A2;12,10,16”
    OK
    //SET TO 4G Modem and PCUI only (ALWAYS LEAVE 12 PCUI or you will brick the modem!)
    AT^SETPORT="FF;12,10" //4g only (working under Debian)
    //Set TO NCM and PCUI only (ALWAYS LEAVE 12 PCUI or you will brick the modem!)
    AT^SETPORT="FF;12,16" //4g only (working under Debian)
  3. It was working in NCM mode on Debian so i tried it on Omnia. Installed nessesary drivers and tools:
    opkg install usb-modeswitch wwan comgt-ncm kmod-usb-net-huawei-cdc-ncm kmod-usb-net-cdc-ncm
  4. Then I also installed luci-proto extension from openwrt snapshot to be able to set everything in LUCI…
    root@turris:~# localrepo list | grep ncm
    luci-proto-ncm: git-17.340.61105-78ebfba-1
    //from here: https://archive.openwrt.org/snapshots/trunk/mvebu/generic/packages/luci/
  5. First I have set everything in LUCI and then I corrected it by nano so my important part of /etc/config/network look like this:

config interface 'wan' //working with modem number one via dhcp that I mentioned in configuration 1
option proto 'dhcp'
option _orig_ifname 'eth1'
option _orig_bridge 'false'
option ifname 'eth3'
option peerdns '0'
option dns '208.67.222.222 208.67.220.220'
option delegate '0'

config interface 'wwan' //what I am trying to achieve, still not working on second modem
option proto 'ncm'
option device '/dev/ttyUSB0'
option apn 'MY_APN'
option ipv6 'auto'
option peerdns '0'
option dns '208.67.222.222 208.67.220.220'
option demand '0'
option username ''
option password ''

Here are some useful link related to the subject:
Use NCM USB Dongle for WAN connection (OpenWRT Wiki)
Modems in NCM mode (OpenWRT Forum - in Polish) but have some useful commands tho

What I suspect and why it is not working that it’s some kernel related driver issue in kmod-usb-net-huawei-cdc-ncm. People managed to make it work on CC in 2015 with legacy kmod-huawei-hw-cdc. On my Debian box after connecting the modem switched to NCM mode only I do get wwan0 interface that I can put up and voila; connected. On TurrisOS such an interface is not created. Or did I just miss something.

EDIT2:
I also contacted my ISP to make sure they do not block ports. They did. But not anymore:D Still the main problem is to get an IP address directly on the wwan0 interface not via DHCP. And the job is even harder because my lovely sis is screaming when the ‘internet-is-not-working’

Many thanks to those who understand a bit of that. And even more thanks to those who want to help out.
Peace!

OK. I managed to make it work with fresh firmware version 21.300.05.00.00 on E3372s-153 (AT^SETPORT=“FF;12,16”) and following minimal config:

config interface 'wwan'
option proto 'ncm'
option apn 'MY_APN'
option peerdns '0'
option dns '208.67.222.222 208.67.220.220'
option device '/dev/ttyUSB0'

then uci commit network && reboot. And after reboot I can see wwan0 interface and internet connection is working. It doesn’t show my IPv4 on the interfaces page in LUCI.

It does not use specified DNS servers tho. I think it might be my ISP limitation.

Setting more options, ex. to force lte or persistent connection breaks config and wwan0 is not showing up.

Hi,
I managed to make my E3372h-153 (stick mode, NCM) work with Turris Omnia, but yeah, I found several obstacles along the way.

Setting more options, ex. to force lte or persistent connection breaks config and wwan0 is not showing up.

Yeah same experience here. Another obstacle I hit - I chose a bad firmware to reflash my stick with, and it did not report the correct manufacturer in the ATI reply. Thus the connection scripts failed. Firmware version 21.315.01.00.143 did work for me.

In short

opkg install comgt-ncm kmod-usb-net-huawei-cdc-ncm usb-modeswitch kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan

Using minicom -D /dev/ttyUSB0 (or minicom -D /dev/ttyUSB1, can’t remember now) change the config of the USB stick:

AT^SETPORT="FF;12,10,16"

(FF to disable SD reader & CD-ROM emulation, 16 to enable the NCM mode. You can leave 10 (PPP interface) enabled e.g. for testing or some legacy systems.)
Reboot the router or unplug/plug the USB stick so it reloads with the new interfaces.

Edit /etc/config/network

config interface 'wwan'
        option proto 'ncm'
        option ifname 'wwan0'
        option device '/dev/cdc-wdm0'
        option apn 'internet'
        option pincode '1234'
        option delay '10'

(That delay was important for my setup, otherwise the scripts started sending the AT commands too soon and the communication would time out.)

ifup wwan should now work.

I wrote down my experience in more detail in Czech but you may find some interesting links in my posts.

1 Like

They mention some scripts to automate reconnecting after connection loss. Will someone try them?

I can pass the AT^NDISDUP=1,1,"YOUR_APN" command to the router the diode is constantly on (indicates connection) but I get no Internet access after such a measure. I have to manually reboot Omnia. I would like to be able to reset only the modem itself or even just restore the connection…

EDIT: YES! After i followed the script on the page @spike411 mentioned /etc/init.d/ncm-network start brings back my connection now. Now I just need to automate that and I have (almost) constant internet access. Kinda super happy now!

EDIT1: I forgot to mention that I have that script running to reset my connection in case there is no link. And it works I have near-to-constant connection.
Place this script in /root/bin/check_lte.sh and place that in /etc/rc.local just before the line exit 0:

#Check LTE connection script
/root/bin/check_lte.sh &