The PLMN of Telekom Deutschland is 26201
Afzal C
@Afzal C
Latest posts made by Afzal C
-
RE: Receiving UDP Packets
You should firstly check your firewall rules. It’s possible that your server accepts incoming UDP packets but drops outgoing packets on that specific port. You should firstly check your firewall rules. If there is a problem on your servers side, I can try to explain to you how you can configure everything in python to get it to work. From this you can adapt it to your tools and infrastructure. First of all we open a socket and tell it to listen to a specific port:
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
sock.bind((‘’, 16666)) # bind the socket to address (port)
message, address = sock.recvfrom(1024)
Now our server is ready to receive messages on port 16666. From our modem we send some data to the server with IP:Port in our case ww.xx.yy.zz:16666:at+nsost=0,ww.xx.yy.zz,16666,3,414243
In python you will then get something like thismessage = ‘ABC’
address = (‘85.147.106.108’, 3618)
With the following command we can send a message back to the client (our NB-IoT module):sock.sendto(“Hello World”, address)
With these commands everything should work properly.Make sure that you send the answer from the same socket (i.e. same source port) otherwise it won’t work (network will drop the packets). So for example the following won’t work:
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
sock.bind((‘’, 16666)) # bind the socket to address (port)
message, address = sock.recvfrom(1024)
…
Receive some data here
…
sock.sendto(‘Hello World!’, address) # this will work fineNow we close the socket and open a new one with a different source port (on the same server so same IP)
sock.close()
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((‘’, 1883)) # different source port than before
sock.sendto(‘Hello World!’, address)
Even so we send the packet to the correct address (IP:Port) the module will never receive the packet because the source port ist different this time.Please let me know if this was of any help.
Best regards