Example #1
0
except Exception as e:
	print "ERROR: %s" % str(e)
	sys.exit(1)

# Get info
print "\nChip information:"
print "      Chip ID : 0x%04x" % dbg.chipID
print "   Flash size : %i Kb" % dbg.chipInfo['flash']
print "    SRAM size : %i Kb" % dbg.chipInfo['sram']
if dbg.chipInfo['usb']:
	print "          USB : Yes"
else:
	print "          USB : No"

# Get bluegiga-specific info
binfo = dbg.getBLEInfo()
serial = dbg.getSerial()

# Check if we have missing license
btaMessage=""
hwvMessage=""
licMessage=""
hasLicense = False
for x in binfo['license']:
	if x != "f":
		hasLicense = True
		break

if not hasLicense or (len(sys.argv)>=3):
	if len(sys.argv) < 3:
		print "ERROR: Your device has no license key"