0

Currently facing an issue with setting the PIN code for a ZTE USB 4G modem on a Raspberry Pi 4 (running Rasbian Bookworm). The modem is recognized as a CDC Ethernet device (cdc_ether kernel module), and traditional methods like mmcli do not detect it as a modem.

Problem Description:

The ZTE USB modem appears as an Ethernet interface (eth1) in Linux. Attempts to use mmcli to set the PIN code were unsuccessful as it does not recognize the modem. Directly sending AT commands to the Ethernet interface using sudo echo or sudo printf didn't work:

sudo sh -c 'echo -e "AT+CPIN=\"1078\"\r\n" > /dev/eth1'

Tried to curl the modem as well, which didn't work:

curl -d "PIN_EN=1&PIN=$pin_code&NEXT_URL=%2Fhtml%2Fhome.html" http://192.168.0.1/goform/goform_set_cmd_process

Additional Information:

The modem does not show up with mmcli -L. There is no USB modem interface available; it is recognized solely as a CDC Ethernet device. The modem is functioning correctly in providing an internet connection after manual PIN input through the web interface (192.168.0.1). This,however, doesn't persist after reboot, so it has to be entered manually everytime.

Question:

How can I set the PIN code for a ZTE USB 4G modem recognized as a CDC Ethernet device in Linux? Is there a way to send AT commands to the Ethernet interface or an alternative method for PIN configuration? Are there specific tools or configurations for ZTE modems in this mode that might be overlooked?

5
  • 1
    Install modemmanager package then use mmcli (not nmcli it is MMCLI) to manage your USB modem. manpage manpages.ubuntu.com/manpages/xenial/man8/mmcli.8.html
    – GAD3R
    Feb 11 at 11:50
  • Thank you. mmcli -L results in no modems available. The usb modem is not recognized as a modem. Feb 11 at 12:12
  • ZTE has several models of USB 4G modems. What's the exact model number?
    – telcoM
    Feb 11 at 13:38
  • Model ZTE MF833U1 Feb 11 at 13:45
  • 1
    If the only thing that works is to enter the pin via the web page, then you should persist with trying to automate that, and investigate why the curl command doesn't work. Most browsers can provide an inspection/debug mechanism to investigate what is going on when you enter/send the pin. At worse there are tools like selenium and beautifulsoup to automate web interaction, or X11 tools to record and replay mouse/keyboard actions, using a second virtual Xserver (Xvfb) so it doesnt disturb your screen. Probably post a new question with details about the curl debug for more help.
    – meuh
    Feb 12 at 9:41

1 Answer 1

1

Apparently this device is more like a small router in USB stick form rather than a traditional USB modem.

The only available documentation on the internet for it seems to be a simplistic "quick user guide", which indeed suggests that the web interface is the only way to configure it.

If you don't find a way to store the PIN or disable the PIN query through the web interface, then I guess you could temporarily plug the SIM to a smartphone or some other device and use that to disable the PIN query function, then move the SIM back to the ZTE modem.

Disabling the PIN from the SIM card you use with the ZTE MF833U1 will obviously allow anyone and any device that is capable of using USB CDC Ethernet network adapters to use the device, which might be either good or bad thing depending on your requirements.

1
  • Could be, I investigated a bit more and ended up finding i curl command that worked. Not ideal as I guess the firmware on the usb modem could auto update and change the web query interface.. But thanks, appreciated your thoughts. Feb 12 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .