Blame view
gw_RPi3/python/test_gateway.py
598 Bytes
7e6be9319 gateway commit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Code de test pour envoyer des requetes au gateway. Created on Fri Jun 11 09:12:11 2021 @author: Georges de Massol """ import gateway as gw gw.server = '192.168.1.180:8080' EUI = "70b3d549966002e1" endpoint = gw.Endpoint(EUI) downlink = gw.Downlink(gw.server, gw.APIKey) #fCnt = downlink.Lorasend(endpoint.EUI, b'\x01' + int(10000).to_bytes(4, 'big')) downlink.FlushQueue(endpoint.EUI) print("queue flushed") fCnt = downlink.Lorasend(endpoint.EUI, b'\x55') print("premier paquet envoye, fCnT : %s" % fCnt) #downlink.ResetCounter(endpoint.EUI) |