fix mac address id
[remote-debug.git] / suanzi-support
index 8809b05..d016b06 100755 (executable)
@@ -67,7 +67,7 @@ class MyClient(mqtt.Client):
 
 if __name__ == '__main__':
     mac = hex(get_mac())
-    id = os.getenv('USER') + '-' + '{:0>12}'.format(mac[2:13])
+    id = os.getenv('USER') + '-' + '{:0>12}'.format(mac[2:-1])
     print 'id is: ' , id
     client = MyClient(id)
     client.connect(MQTT_SERVER, MQTT_PORT, 60)