Waveshare SIM7600G-H 4G DONGLE - anyone got this to work?

If I put this dongle into a Windows PC - it works fine - no need to setup the APN (it's EE in the UK) details. Whatever default config is in Windows it just works.

I have tried replicating this in the Hex router - which detects the hardware no problem but the interface never comes up - I watch it in the log and it just sends lots of AT commands - get useful responses back but the interface never establishes.

Have tried with all sorts of manual APN settings and stripping out as many settings as possible and "Use Network APN" and also set IP Type to IPv4

There is message that comes up in the logs "modem hung up" but I tried USB tethering from a phone where the interface does come up and that "modem hung up" message also comes up so maybe that isn't as terminal as it sounds.

https://www.waveshare.com/wiki/SIM7600G-H_4G_DONGLE

Hi,

You forgot to mention that for Windows a special driver is needed. It means that it is not a generic commonly recognizable device. Remember that ROS is a tailored quite minimal Linux distribution with many chipset drivers removed.

Thank you for your reply.

I'm aware of that but the hex router recognises the device and starts the initiation process and sends a lots of successful AT commands so it looks like a generic handshake. I was under the impression that these devices just appear as a generic LTE modem. When viewing the log it looks like so much of the handshake process is successful asking for available protocols etc. but it can't seem to get an IP.

I'm basing this on the fact that when I plug in my Android generic phone which is in USB tethering mode it has no problem setting up the interface and getting an IP address so I thought the dongle would be the same

IDK about this device specifically. You can check /port/print and /system/resource/usb/print to see if the modem is showing up. If you don't see the modem there, then you have no hope. If it appears, perhaps one of the option allow it work.

One thing to try is using PPP, which use an older interface to modem. You need to set LTE interface mode=serial, and then a ppp-out1 will appear and you can configure the APN using that.

Also there may be AT commands to enable "MBIM" (or "CDC" Ethernet), which search google or LLM might turn up something. If it appears as port on RouterOS and you can run AT commands to switch modes, IF POSSIBLE.

[admin@HexRouter] > /port print
Columns: DEVICE, NAME, CHANNELS, BAUD-RATE
# DEVICE  NAME  CHANNELS  BAUD-RATE
0 1-1     usb1         1  auto    
[admin@HexRouter] > /system resource usb print
bad command name usb (line 1 column 18)
[admin@HexRouter] > /system resource usb1 print 
bad command name usb1 (line 1 column 18)

It's definitely getting somewhere because there are lots of rcvd's coming back from the device!

/system/resource/hardware/print
1 Like
[admin@HexRouter] > /system/resource/hardware/print
Columns: LOCATION, TYPE, VENDOR, NAME, SPEED, DEVICE-PATH, OWNER
# LOCATION  TYPE  VENDOR                 NAME                   SPEED  DEVICE-PATH      OWNER 
0 1-0       usb   Linux 5.6.3 xhci-hcd   xHCI Host Controller     480  bus/usb/001/001        
1 1-1       usb   SimTech, Incorporated  SimTech, Incorporated    480                   system
2 2-0       usb   Linux 5.6.3 xhci-hcd   xHCI Host Controller    5000  bus/usb/002/001      

I'd make sure /system/routerboard/update is current and matches the current RouterOS version. If it's old, perhaps upgrading to stable (and also routerboot fireware too). Sometimes upgrading fixes these random issues.

Also, although, while APN may not be required on Windows... I would not discount that APN should be set manually. Your logs seem to indicate it found EE, but they drops it... typically that be authorization is why I suggest explicitly setting an APN.

I think I'm up to date

[admin@HexRouter] > /system/routerboard/print  
       routerboard: yes        
        board-name: hEX        
             model: RB750Gr3   
          revision: r4         
     serial-number: HE908***redacted
     firmware-type: mt7621L    
  factory-firmware: 6.48.6     
  current-firmware: 7.20.4     
  upgrade-firmware: 7.20.4 

It feels annoyingly close to working but something seems to be tripping it up - everything seems to be set correctly:

 1   name="EE Internet" apn="everywhere" use-peer-dns=yes use-network-apn=no add-default-route=yes 
     default-route-distance=2 ip-type=ipv4 authentication=pap user="eesecure" password="secure"

I guess I will have to set the device to serial and then have a go at manually adding a PPP gateway to see if that will work

See here for AT commant to switch USB mode for modem. Here is also full AT commands manual.

2 Likes

Optio :waving_hand: :star:

Mode switch in the Modem Init field has done it!

AT+CUSBPIDSWITCH=9018,1,1

Thank you for your help ( Waveshare support were useless :grinning_face: )

DHCP Client gets address and ping works.

Simple failover working nicely when ether1 disabled and LTE is made a member of the WAN list

1 Like

Good find @optio. Finding these AT commands is not always easy.

You may only need to run the USB switch AT command once. Since sometimes changing modes on modem, will reboot the modem internally, thus adding delay to startup.

Now, totally possible it's need every time on this modem, but normally it's "saved".

I will test this and report back.

EDIT:

@Amm0 - bang on

Disabled LTE1

Remove AT command from config

Unplugged to force power loss in dongle

Re-inserted and re-enabled

All good :+1:

Good little dongle for backup on Hex Router - which is what I was hoping for.

I was looking at 5G but I see the 5G dongles are :money_bag: - even if you use one I see that the providers (EE in the UK in my case) limit your SIM card to 25Mbps unless you specifically pay for full 5G speed on the plan.

I have been experimenting with this and Wireguard into the router doesn’t work. I think I may be coming up against CGNAT?

The assigned IP address that the Hex is getting is from the dongle

192.168.225.22/24

but outbound requests appear to come from:

31.94.34.49

The built in Cloud Dynamic DNS is propagating the 31.94.34.49 when the main ether1 “goes down” which is good.

After checking the notes here: https://www.waveshare.com/wiki/SIM7600G-H_4G_DONGLE

What is the difference between RNDIS, NDIS, PPP, and ECM?

Answer:

The IP obtained by different dialing methods is different and has different characteristics. Please refer to the following table for details:
Dial-PPP-ECM-RNDIS.png
Below is a detailed description of the various dials:

  • NDIS driver for Internet access (9001 mode)

This method must depend on the Linux system and is suitable for application scenarios that need to be developed using Linux network socket programming. After loading the driver into the kernel, connect the SIM7600 to the motherboard with a USB cable. After the SIM7600 is turned on, the wwan0 network can be recognized. port, you can access the Internet through this network port. The bottom layer of this method depends on the USB virtual serial port of SIM7600. This dial-up method can obtain the IP provided by the public operator, and the network speed is faster.

  • RNDIS (9011 mode)

RNDIS refers to Remote NDIS. The implementation of RNDIS based on USB is TCP/IP over USB, which is to run TCP/IP on the USB device, making the USB device look like a network card. This method only needs simple configuration, the motherboard will recognize the USB0 network card, and quickly obtain the USB0 network card and module or the operator's IP network access; RNDIS network speed is relatively fast, which is one of the most commonly used dial-up methods.

  • ECM (9018 mode)

These two are the "NDIS" standard under Linux. ECM is the abbreviation of the Ethernet Networking Control Model. ECM meets the requirements of the CDC on USB. The data call established through standard CDC-ECM is routed through the router, and the obtained IP address is a private IP such as 192.168; if the kernel supports this way, no additional driver is required. All data interacting with the module through the USB bus is constrained by relevant protocols and standards, and the module reaches the module through the USB hardware to complete the interaction with the Linux motherboard.

  • PPP dial-up

This method must depend on the Linux system and is suitable for application scenarios that need to be developed using Linux network socket programming. After configuring and running the relevant scripts, connect the SIM7600 with a USB cable. After the SIM7600 is powered on, dial up the pppd script to identify it. To the ppp0 network port, you can access the Internet through this network port and obtain the operator's IP. The bottom layer of this method depends on the USB virtual serial port of SIM7600.

I thought maybe the dongle was in the wrong mode (9018) which clearly specifies getting a private IP address - I changed modes to 9001 and 9011 (not with the Modem Init command but explicitly via Putty on a separate machine) but still get a private address in those modes.

Does it seem more likely that the 192.168 address is in fact coming from the carrier network dynamically as part of CGNAT and not the dongle and this means it is only effective for outbound traffic not remote admin when the main internet connection goes down?

You want MBIM as that will provide the IP directly to RouterOS, if the modem support it. So 9003/901E may be want you need. Now sometimes models don't support all modes listed in docs since there are often variants (and I don't read Chinese so those footnotes may specify) and/or MBIM may only be newer modem firmware.

MBIM is what Windows uses and it more an API, and what MikroTik modems typically use. ECM is different, it essentially exposes the modem as an Ethernet interface & often what hotspot use since the modem acts as a NAT router - which is why you get the private address. Sometime in ECM mode there is some web interface and/or AT commands to customize.

I'd try setting the USB switch the MBIM.

@Amm0 - on target! :bullseye:

Changed the mode in Putty and then re-attached to the Hex - it gets a 10. address and a log entry showing carrier DNS IPs

External IP now appears as 31.94.64.169

So I guess that's CGNAT without extra NAT inside the dongle?

Yup. And logging is better, as you see, in MBIM since RouterOS (via MBIM) directly negotiates the LTE data channel. In ECM, it really is more like adding an ethernet card pre-connected, so you get what you get.

Now, I wish MikroTik updated their page with 3rd party modems help page more often and clarified the ECM vs MBIM situation better...

@kilburnflyer if you are behind CGNAT you can still use Wireguard with Back to Home ROS feature.

It looks like a good feature but it's a non-ARM Hex I'm working with

Plus I have a Home Assistant that's accessible by a reverse proxy for some tenants so currently using the free DDNS cloud feature to map to that.

At least this dongle works - thanks to the help in this thread and hope it's useful for anyone else who wants this dongle.

Need to see if an provider offers a reasonably priced static IP SIM card at a low monthly cost when it's just used as a backup connection!