Update run.py
Fix gateway MAC to EUI conversion.
This commit is contained in:
parent
df54b41563
commit
ec0fdf6a92
6
run.py
6
run.py
@ -60,7 +60,9 @@ if os.environ.get("GW_KEY")==None:
|
||||
print ("See https://www.thethingsnetwork.org/docs/gateways/registration.html#via-gateway-connector")
|
||||
sys.exit(0)
|
||||
|
||||
my_eui = GWID_PREFIX + format(uuid.getnode(), '012x')
|
||||
# The FFFE should be inserted in the middle (so xxxxxxFFFExxxxxx)
|
||||
my_eui = format(uuid.getnode(), '012x')
|
||||
my_eui = my_eui[:6]+GWID_PREFIX+my_eui[6:]
|
||||
my_eui = my_eui.upper()
|
||||
|
||||
print ("Gateway Type:\t"+os.environ.get("GW_TYPE"))
|
||||
@ -269,4 +271,4 @@ while True:
|
||||
|
||||
# Start forwarder
|
||||
subprocess.call(["./mp_pkt_fwd"])
|
||||
time.sleep(15)
|
||||
time.sleep(15)
|
||||
|
Loading…
Reference in New Issue
Block a user