Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    GPy IP Address

    Scheduled Pinned Locked Moved GPy
    4 Posts 3 Posters 105 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pauldeng
      last edited by

      Dear Pycom,

      I am new to GPy and LTE.

      Can I ask how to print out the IP address obtained from LTE network service provider?

      LTE example works fine for me.

      Thanks for your help.

      Cheers,
      Paul

      1 Reply Last reply Reply Quote 0
      • G Offline
        Gijs
        last edited by

        Good to hear you're able to connect to LTE without any issues,
        You should be able to get the IP address using an AT command like so:

        lte.send_at_cmd('AT+CIFSR')
        

        After you attached, but before connecting

        1 Reply Last reply Reply Quote 0
        • K Offline
          kjm
          last edited by

          @Gijs said in GPy IP Address:

          'AT+CIFSR'

          I'm not sure cifsr works on the sequans, maybe try 'AT+CGCONTRDP' to get the local IP

          P 1 Reply Last reply Reply Quote 1
          • P Offline
            pauldeng @kjm
            last edited by

            @kjm

            Thanks a lot.

            print(lte.send_at_cmd('AT+CGCONTRDP')) works!

            It gives

            +CGCONTRDP: 1,5,"telstra.internet.xxx.yyy.gprs","10.247.zz.gg.255.255.255.255","","10.4.hh.ii","10.5.jjj.kk","",""
            

            10.247.zz.gg is the local ip address. Sad it is not public ip.

            Cheers,
            Paul

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom