Skip to content

Instantly share code, notes, and snippets.

@sheeley
Last active August 29, 2015 13:59
Show Gist options
  • Save sheeley/10555470 to your computer and use it in GitHub Desktop.
Save sheeley/10555470 to your computer and use it in GitHub Desktop.
Sllurp
# Without duration, immediately ends.
INFO:sllurp:connecting...
INFO:tornado.access:starting tornado
INFO:sllurp:got READER_EVENT_NOTIFICATION
WARNING:sllurp:ADD_ROSPEC failed with status FieldError: LLRP [148] : //ROSpec/ROSpecID : ID already configured
INFO:sllurp:stopping politely
INFO:sllurp:reader finished inventory
# Without tx_power
INFO:sllurp:got READER_EVENT_NOTIFICATION
INFO:sllurp:Capabilities: {'Ver': 1, 'LLRPStatus': {'ErrorDescription': '', 'StatusCode': 'Success'}, 'LLRPCapabilities': {'SupportsClientRequestOpSpec': False, 'MaxNumROSpec': 1, 'MaxNumInventoryParametersSpecsPerAISpec': 1, 'CanReportBufferFillWarning': True, 'CanDoTagInventoryStateAwareSingulation': False, 'MaxNumSpecsPerROSpec': 16, 'ClientRequestOpSpecTimeout': 0, 'CanDoRFSurvey': False, 'MaxNumOpSpecsPerAccessSpec': 16, 'MaxNumAccessSpec': 1508, 'MaxPriorityLevelSupported': 1, 'SupportsEventAndReportHolding': True}, 'RegulatoryCapabilities': {'CommunicationsStandard': 1, 'CountryCode': 840, 'UHFBandCapabilities': {'TransmitPowerLevelTableEntry55': {'TransmitPowerValue': 2375, 'Index': 56}, 'TransmitPowerLevelTableEntry58': {'TransmitPowerValue': 2450, 'Index': 59}, 'TransmitPowerLevelTableEntry66': {'TransmitPowerValue': 2650, 'Index': 67}, 'TransmitPowerLevelTableEntry59': {'TransmitPowerValue': 2475, 'Index': 60}, 'TransmitPowerLevelTableEntry64': {'TransmitPowerValue': 2600, 'Index': 65}, 'TransmitPowerLevelTableEntry49': {'TransmitPowerValue': 2225, 'Index': 50}, 'TransmitPowerLevelTableEntry48': {'TransmitPowerValue': 2200, 'Index': 49}, 'TransmitPowerLevelTableEntry61': {'TransmitPowerValue': 2525, 'Index': 62}, 'TransmitPowerLevelTableEntry60': {'TransmitPowerValue': 2500, 'Index': 61}, 'TransmitPowerLevelTableEntry45': {'TransmitPowerValue': 2125, 'Index': 46}, 'TransmitPowerLevelTableEntry44': {'TransmitPowerValue': 2100, 'Index': 45}, 'TransmitPowerLevelTableEntry47': {'TransmitPowerValue': 2175, 'Index': 48}, 'TransmitPowerLevelTableEntry46': {'TransmitPowerValue': 2150, 'Index': 47}, 'TransmitPowerLevelTableEntry41': {'TransmitPowerValue': 2025, 'Index': 42}, 'TransmitPowerLevelTableEntry40': {'TransmitPowerValue': 2000, 'Index': 41}, 'TransmitPowerLevelTableEntry43': {'TransmitPowerValue': 2075, 'Index': 44}, 'TransmitPowerLevelTableEntry42': {'TransmitPowerValue': 2050, 'Index': 43}, 'TransmitPowerLevelTableEntry29': {'TransmitPowerValue': 1725, 'Index': 30}, 'TransmitPowerLevelTableEntry28': {'TransmitPowerValue': 1700, 'Index': 29}, 'TransmitPowerLevelTableEntry23': {'TransmitPowerValue': 1575, 'Index': 24}, 'TransmitPowerLevelTableEntry22': {'TransmitPowerValue': 1550, 'Index': 23}, 'TransmitPowerLevelTableEntry21': {'TransmitPowerValue': 1525, 'Index': 22}, 'TransmitPowerLevelTableEntry20': {'TransmitPowerValue': 1500, 'Index': 21}, 'TransmitPowerLevelTableEntry27': {'TransmitPowerValue': 1675, 'Index': 28}, 'TransmitPowerLevelTableEntry26': {'TransmitPowerValue': 1650, 'Index': 27}, 'TransmitPowerLevelTableEntry25': {'TransmitPowerValue': 1625, 'Index': 26}, 'TransmitPowerLevelTableEntry24': {'TransmitPowerValue': 1600, 'Index': 25}, 'TransmitPowerLevelTableEntry54': {'TransmitPowerValue': 2350, 'Index': 55}, 'TransmitPowerLevelTableEntry63': {'TransmitPowerValue': 2575, 'Index': 64}, 'TransmitPowerLevelTableEntry65': {'TransmitPowerValue': 2625, 'Index': 66}, 'TransmitPowerLevelTableEntry8': {'TransmitPowerValue': 1200, 'Index': 9}, 'TransmitPowerLevelTableEntry9': {'TransmitPowerValue': 1225, 'Index': 10}, 'TransmitPowerLevelTableEntry0': {'TransmitPowerValue': 1000, 'Index': 1}, 'TransmitPowerLevelTableEntry1': {'TransmitPowerValue': 1025, 'Index': 2}, 'TransmitPowerLevelTableEntry2': {'TransmitPowerValue': 1050, 'Index': 3}, 'TransmitPowerLevelTableEntry3': {'TransmitPowerValue': 1075, 'Index': 4}, 'TransmitPowerLevelTableEntry4': {'TransmitPowerValue': 1100, 'Index': 5}, 'TransmitPowerLevelTableEntry5': {'TransmitPowerValue': 1125, 'Index': 6}, 'TransmitPowerLevelTableEntry6': {'TransmitPowerValue': 1150, 'Index': 7}, 'TransmitPowerLevelTableEntry7': {'TransmitPowerValue': 1175, 'Index': 8}, 'TransmitPowerLevelTableEntry12': {'TransmitPowerValue': 1300, 'Index': 13}, 'TransmitPowerLevelTableEntry13': {'TransmitPowerValue': 1325, 'Index': 14}, 'TransmitPowerLevelTableEntry10': {'TransmitPowerValue': 1250, 'Index': 11}, 'TransmitPowerLevelTableEntry11': {'TransmitPowerValue': 1275, 'Index': 12}, 'TransmitPowerLevelTableEntry16': {'TransmitPowerValue': 1400, 'Index': 17}, 'TransmitPowerLevelTableEntry17': {'TransmitPowerValue': 1425, 'Index': 18}, 'TransmitPowerLevelTableEntry14': {'TransmitPowerValue': 1350, 'Index': 15}, 'TransmitPowerLevelTableEntry15': {'TransmitPowerValue': 1375, 'Index': 16}, 'TransmitPowerLevelTableEntry56': {'TransmitPowerValue': 2400, 'Index': 57}, 'TransmitPowerLevelTableEntry57': {'TransmitPowerValue': 2425, 'Index': 58}, 'TransmitPowerLevelTableEntry18': {'TransmitPowerValue': 1450, 'Index': 19}, 'TransmitPowerLevelTableEntry19': {'TransmitPowerValue': 1475, 'Index': 20}, 'TransmitPowerLevelTableEntry52': {'TransmitPowerValue': 2300, 'Index': 53}, 'TransmitPowerLevelTableEntry53': {'TransmitPowerValue': 2325, 'Index': 54}, 'TransmitPowerLevelTableEntry50': {'TransmitPowerValue': 2250, 'Index': 51}, 'TransmitPowerLevelTableEntry51': {'TransmitPowerValue': 2275, 'Index': 52}, 'TransmitPowerLevelTableEntry38': {'TransmitPowerValue': 1950, 'Index': 39}, 'TransmitPowerLevelTableEntry39': {'TransmitPowerValue': 1975, 'Index': 40}, 'TransmitPowerLevelTableEntry62': {'TransmitPowerValue': 2550, 'Index': 63}, 'TransmitPowerLevelTableEntry34': {'TransmitPowerValue': 1850, 'Index': 35}, 'TransmitPowerLevelTableEntry35': {'TransmitPowerValue': 1875, 'Index': 36}, 'TransmitPowerLevelTableEntry36': {'TransmitPowerValue': 1900, 'Index': 37}, 'TransmitPowerLevelTableEntry37': {'TransmitPowerValue': 1925, 'Index': 38}, 'TransmitPowerLevelTableEntry30': {'TransmitPowerValue': 1750, 'Index': 31}, 'TransmitPowerLevelTableEntry31': {'TransmitPowerValue': 1775, 'Index': 32}, 'TransmitPowerLevelTableEntry32': {'TransmitPowerValue': 1800, 'Index': 33}, 'TransmitPowerLevelTableEntry33': {'TransmitPowerValue': 1825, 'Index': 34}}}, 'ID': 0, 'Type': 11, 'GeneralDeviceCapabilities': {'ModelName': 2001003, 'ReceiveSensitivityTableEntry': {'ReceiveSensitivityValue': 0, 'Index': 1}, 'DeviceManufacturerName': 25882, 'HasUTCClockCapability': True, 'FirmwareVersionByteCount': 9, 'MaxNumberOfAntennaSupported': 4, 'CanSetAntennaProperties': False, 'ReaderFirmwareVersion': '4.8.3.240'}}
WARNING:sllurp:Failed to decode LLRPMessage: Cannot find decoder for message type 768. Will not decode 1219 remaining bytes
WARNING:sllurp:ADD_ROSPEC failed with status FieldError: LLRP [420] : //RFTransmitter/TransmitPower : out-of-range
INFO:sllurp:stopping politely
INFO:sllurp:reader finished inventory
# With tx_power=75
INFO:sllurp:connecting...
INFO:sllurp:got READER_EVENT_NOTIFICATION
WARNING:sllurp:Problem with GET_READER_CAPABILITIES_RESPONSE message format: junk at end of message: 01 47 00 07 40 00 02 .G..@..
ERROR:sllurp:unexpected response None when getting capabilities
# With tx_power=0
INFO:sllurp:connecting...
INFO:sllurp:got READER_EVENT_NOTIFICATION
Unhandled Error
Traceback (most recent call last):
File "/Users/jsheeley/.virtualenvs/InStore/lib/python2.7/site-packages/twisted/python/log.py", line 88, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/Users/jsheeley/.virtualenvs/InStore/lib/python2.7/site-packages/twisted/python/log.py", line 73, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/Users/jsheeley/.virtualenvs/InStore/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/Users/jsheeley/.virtualenvs/InStore/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/Users/jsheeley/.virtualenvs/InStore/lib/python2.7/site-packages/twisted/internet/selectreactor.py", line 151, in _doReadOrWrite
why = getattr(selectable, method)()
File "/Users/jsheeley/.virtualenvs/InStore/lib/python2.7/site-packages/twisted/internet/tcp.py", line 215, in doRead
return self._dataReceived(data)
File "/Users/jsheeley/.virtualenvs/InStore/lib/python2.7/site-packages/twisted/internet/tcp.py", line 221, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/Users/jsheeley/git/InStore/lib/sllurp/sllurp/llrp.py", line 342, in dataReceived
lmsg = LLRPMessage(msgbytes=data)
File "/Users/jsheeley/git/InStore/lib/sllurp/sllurp/llrp.py", line 42, in __init__
self.remainder = self.deserialize()
File "/Users/jsheeley/git/InStore/lib/sllurp/sllurp/llrp.py", line 87, in deserialize
name: dict(decoder(body))
File "/Users/jsheeley/git/InStore/lib/sllurp/sllurp/llrp_proto.py", line 342, in decode_GetReaderCapabilitiesResponse
ret, body = decode('RegulatoryCapabilities')(body)
File "/Users/jsheeley/git/InStore/lib/sllurp/sllurp/llrp_proto.py", line 779, in decode_RegulatoryCapabilities
ret, body = decode('UHFBandCapabilities')(body)
File "/Users/jsheeley/git/InStore/lib/sllurp/sllurp/llrp_proto.py", line 822, in decode_UHFBandCapabilities
ret, body = decode('UHFRFModeTable')(body)
File "/Users/jsheeley/git/InStore/lib/sllurp/sllurp/llrp_proto.py", line 1017, in decode_UHFRFModeTable
ret, body = decode('UHFC1G2RFModeTableEntry')(body)
File "/Users/jsheeley/git/InStore/lib/sllurp/sllurp/llrp_proto.py", line 1056, in decode_UHFC1G2RFModeTableEntry
par['StepTari']) = struct.unpack('!IBBBBIIIII', body)
struct.error: unpack requires a string argument of length 28
INFO:sllurp:lost connection: [Failure instance: Traceback (failure with no frames): <class 'struct.error'>: unpack requires a string argument of length 28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment