I have two or more 4G dongles connected via USB. I have set up multiple configuration files (one for each provider), but short of a visual inspection (which for this project won't be possible in the field) I have no way of knowing which SIM in which dongle is connected to which mobile provider.

Is there a way of interrogating the dongle from the command line - perhaps using the chat command - to ask it which mobile provider it is connected to? Obviously smartphones can do this - they display it, after all. Would this be possible with a dongle?

By the way, this would be before telling the modem to connect to the provider's APN, so I can then call pppd with the provider-appropriate config file.

  • What operating system(s) are you using?
    – Jeff Schaller
    Nov 11, 2018 at 20:14
  • Linux, which is why I posted it here. :)
    – uvdevops
    Nov 11, 2018 at 20:37
  • We have a variety of Unices here, so it helps to narrow it down.
    – Jeff Schaller
    Nov 11, 2018 at 20:47
  • And what dongle do you have? Most support AT commands (extended with a lot of custom stuff). In which case, go get its (possibly "confidential") manual. But I once had a 4G dongle that was running itself some version of linux+busybox and working as an actual router -- if presented itself as CDC device no different from an android phone in tethering mode. I could get into it by "exploiting" the php(!) scripts from its web configuration interface ;-)
    – mosvy
    Nov 11, 2018 at 21:55

1 Answer 1


I found the answer here. The command to send to the modem is AT+COPS?. The response will be something like

+COPS: 0,0,”Verizon Wireless”,7

I just need to write some scripting now to automate this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.