How Do I Find The Mobile Provider From 4G Dongle?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












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.










share|improve this question









New contributor




uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • What operating system(s) are you using?
    – Jeff Schaller
    3 hours ago










  • Linux, which is why I posted it here. :)
    – uvdevops
    2 hours ago











  • We have a variety of Unices here, so it helps to narrow it down.
    – Jeff Schaller
    2 hours ago










  • 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
    1 hour ago














up vote
0
down vote

favorite












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.










share|improve this question









New contributor




uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • What operating system(s) are you using?
    – Jeff Schaller
    3 hours ago










  • Linux, which is why I posted it here. :)
    – uvdevops
    2 hours ago











  • We have a variety of Unices here, so it helps to narrow it down.
    – Jeff Schaller
    2 hours ago










  • 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
    1 hour ago












up vote
0
down vote

favorite









up vote
0
down vote

favorite











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.










share|improve this question









New contributor




uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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.







linux command-line usb modem pppd






share|improve this question









New contributor




uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 hours ago









Jeff Schaller

35.6k952118




35.6k952118






New contributor




uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 4 hours ago









uvdevops

1




1




New contributor




uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • What operating system(s) are you using?
    – Jeff Schaller
    3 hours ago










  • Linux, which is why I posted it here. :)
    – uvdevops
    2 hours ago











  • We have a variety of Unices here, so it helps to narrow it down.
    – Jeff Schaller
    2 hours ago










  • 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
    1 hour ago
















  • What operating system(s) are you using?
    – Jeff Schaller
    3 hours ago










  • Linux, which is why I posted it here. :)
    – uvdevops
    2 hours ago











  • We have a variety of Unices here, so it helps to narrow it down.
    – Jeff Schaller
    2 hours ago










  • 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
    1 hour ago















What operating system(s) are you using?
– Jeff Schaller
3 hours ago




What operating system(s) are you using?
– Jeff Schaller
3 hours ago












Linux, which is why I posted it here. :)
– uvdevops
2 hours ago





Linux, which is why I posted it here. :)
– uvdevops
2 hours ago













We have a variety of Unices here, so it helps to narrow it down.
– Jeff Schaller
2 hours ago




We have a variety of Unices here, so it helps to narrow it down.
– Jeff Schaller
2 hours ago












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
1 hour ago




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
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
0
down vote













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
OK


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






share|improve this answer








New contributor




uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    uvdevops is a new contributor. Be nice, and check out our Code of Conduct.









     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481127%2fhow-do-i-find-the-mobile-provider-from-4g-dongle%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    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
    OK


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






    share|improve this answer








    New contributor




    uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote













      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
      OK


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






      share|improve this answer








      New contributor




      uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



















        up vote
        0
        down vote










        up vote
        0
        down vote









        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
        OK


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






        share|improve this answer








        New contributor




        uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        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
        OK


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







        share|improve this answer








        New contributor




        uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 2 hours ago









        uvdevops

        1




        1




        New contributor




        uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        uvdevops is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.




















            uvdevops is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            uvdevops is a new contributor. Be nice, and check out our Code of Conduct.












            uvdevops is a new contributor. Be nice, and check out our Code of Conduct.











            uvdevops is a new contributor. Be nice, and check out our Code of Conduct.













             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481127%2fhow-do-i-find-the-mobile-provider-from-4g-dongle%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)