2017-04-20 21:33:42 +02:00
|
|
|
CADENCE_DEVICE_TYPE = 0x7A
|
2017-04-25 15:31:37 +02:00
|
|
|
SPEED2_DEVICE_TYPE = 0x0F
|
2017-04-20 21:33:42 +02:00
|
|
|
SPEED_DEVICE_TYPE = 0x7B
|
|
|
|
SPEED_CADENCE_DEVICE_TYPE = 0x79
|
|
|
|
POWER_DEVICE_TYPE = 0x0B
|
|
|
|
|
|
|
|
# Get the serial number of Raspberry Pi
|
|
|
|
def getserial():
|
2017-04-25 15:31:37 +02:00
|
|
|
machineid = "0000000000000000"
|
2017-04-20 21:33:42 +02:00
|
|
|
try:
|
2017-04-25 15:31:37 +02:00
|
|
|
f = open('/etc/machine-id', 'r')
|
|
|
|
machineid = f.readline()
|
2017-04-20 21:33:42 +02:00
|
|
|
f.close()
|
|
|
|
except:
|
2017-04-25 15:31:37 +02:00
|
|
|
machineid = "ERROR000000000"
|
2017-04-20 21:33:42 +02:00
|
|
|
|
2017-04-25 15:31:37 +02:00
|
|
|
return machineid
|