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

    Weird issue when pinging an external server

    Scheduled Pinned Locked Moved GPy
    gpypingnb-iot
    5 Posts 3 Posters 763 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.
    • S Offline
      shedaim
      last edited by

      Hi,

      Using the GPy in attached mode. Modem is registered and connected to the network on NB-IoT mode.
      My issue:
      I can't ping an external server when I try to ping once using the AT-command: AT!="IP::ping XXX.XXX.XXX.XXX",
      but if I ping multiple times in a row it succeeds (same AT-command, but inside a while(True)).

      Some help would be great,
      Thanks,

      Shedaim

      E D 2 Replies Last reply Reply Quote 0
      • E Offline
        Elizar @shedaim
        last edited by

        @shedaim Ping'ing takes time. Maybe the successful reply to the second ping is in fact the answer to the first ping?

        1 Reply Last reply Reply Quote 0
        • D Offline
          danielm @shedaim
          last edited by

          @shedaim
          Try to send the command with "delay" parameter introduced in v1.18.1.r3.

          send_at_cmd() has an optional parameter lte.send_at_cmd('AT', delay=1000). The delay in milliseconds is the time the esp32 waits between sending the request to the modem and reading the response.

          https://forum.pycom.io/topic/3968/new-lte-firmware-release-v1-18-1-r3-cat-m1-firmware-modem-updater

          1 Reply Last reply Reply Quote 0
          • S Offline
            shedaim
            last edited by shedaim

            Tried with the new firmware using several different delays but no luck.
            I sniffered the data going through the MME and I can see the first Ping request going over the initial request for a bearer.
            I can see a Downlink NAS message (ciphered), so I believe the ping answer is actually returning to the modem but is not read correctly.
            Tried with a Telit modem and it all works well.

            Btw, if it helps, I also cannot connect with a simple socket to an http server (the same one that I can ping, so no problems with routing). I always get OSError: -1 for s = socket.socket(), s.connect(('XXX.XXX.XXX.XXX', 80))

            1 Reply Last reply Reply Quote 0
            • S Offline
              shedaim
              last edited by shedaim

              @elizar said in Weird issue when pinging an external server:

              @shedaim Ping'ing takes time. Maybe the successful reply to the second ping is in fact the answer to the first ping?

              Using the newly added "delay" option should have fixed that, so I don't believe that's what's happening.

              This is what I managed to find out untill now:

              Trying a single ping message:
              Ping request UE --> Server Success
              Ping reply Server --> EPG Success
              Ping reply EPG --> MME Success
              Ping reply MME --> eNodeB Success
              Ping reply eNodeB --> UE Unknown (Doesn't show in Atom, but MME states that message has been sent)

              Trying two pings in rapid succession:
              Ping request UE --> Server Success
              Ping reply Server --> EPG Success
              Ping reply EPG --> MME Success
              Ping reply MME --> eNodeB Success
              ping reply eNodeB --> UE Unknown (Doesn't show in Atom, but MME states that message has been sent)
              Ping request UE --> Server Success
              ping reply Server --> UE Success (Arrives after 150 - 500 ms)

              Pinging from server to UE is successful continuously.
              eDRX is in state "NOT_CONFIGURED" - same as network.
              Tried to disable sleep of the modem using AT!="EE::disable"

              Additional information for the Pros:
              First Ping message is sent over S1AP/NAS-EPS in the initial message to the MME, which contains a Control Plane Service Request. Second ping message is sent over the same interface as an UplinkNasTransport message.
              Wireshark of MME messages - Download

              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