Author Message

<  Setup Discussion  ~  Huawei 1f1c Need serial mode, not cdc-ether

PostPosted: Sat May 06, 2017 12:01 pm Reply with quote
Posts: 7Joined: Mon Nov 02, 2015 9:46 am
I need to read the sim ICCID of the sim card from the modem. I can do it with one of these commands:


However, I cannot get the modem into serial mode (I never see any /dev/ttyUSBx devices, before or after switching). It seems the command I use to switch from CDROM mode:

usb_modeswitch -v 12d1 -p 1f1c -W -I -M 55534243123456780000000000000011062000000101000100000000000000

switches the modem directly into CDC mode and initialises the cdc-ether device on port eth1.
There is no need to run wvdial (which would have used AT commands ...)
This is a hi speed mode that emulates ethernet, but doesn't allow AT commands to be sent to the modem.

Is there any way I can switch the modem into PPP mode to use AT commands, or any other way known to read the ICCID from the sim card using this specific modem?

I have about 20 of these modems in the field, some is far away cities and I need to get the ICCID's...

Offline Profile
PostPosted: Sat May 06, 2017 1:09 pm Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
Take a look at: ... an-monitor

/api/device/information contains the Iccid

Offline Profile
PostPosted: Sun May 07, 2017 3:51 pm Reply with quote
Posts: 7Joined: Mon Nov 02, 2015 9:46 am
Wow that was helpful thanks! In the end I found My modem's local IP is and I can wget this call without logging in to the modem:, which replies with:

<?xml version="1.0" encoding="UTF-8"?>

So the final command was just:

wget -q --timeout=1 -O - "" | grep Iccid

- wget does a normal http call to the url specified
- by default it saves the return html page in a file
- we override that with the -O - to send the return to stdout
- we pipe the returned XML to grep and search for the string iccid
final return looks like this:


Thanks again :)

Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
3 posts
Users browsing this forum: No registered users and 2 guests
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum