Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- UDP_IP = "fe80::6c17:742f:315:9202"
- UDP_PORT = 32323
- MESSAGE = "TEST"
- print "UDP target IP:", UDP_IP
- print "UDP target port:", UDP_PORT
- print "message:", MESSAGE
- sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
- sock.setsockopt(socket.SOL_SOCKET, 25, "lowpan0"+'\0')
- sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement