How to get the ip of gateway v4, mac


#1

Reference user manual : https://wiki.aprbrother.com/en/User_Guide_For_AB_BLE_Gateway_V4.html

keys contains image

code:
import paho.mqtt.client as mqtt
import msgpack

def on_subscribe(mosq, obj, mid, granted_qos):
print("Subscribed: " + str(mid))

def on_message(mosq, obj, msg):
for d in msgpack.unpackb(msg.payload)[b’mac’]:
print(’===============================’)
print(d)
def on_connect(mosq, obj, flags, rc):
print("Connected with result code " + str(rc))
mqttc.subscribe(“123221”, 0)
print(“Connected”)

mqttc = mqtt.Client()
mqttc.on_connect = on_connect
mqttc.on_subscribe = on_subscribe
mqttc.on_message = on_message
mqttc.connect(“mqtt.bconimg.com”, 1883, 60)
mqttc.loop_forever()


#2

Please also paste the output of the python code. Here’s an another python example