EMS-TU-Ilmenau / sllurp

LLRP interface implemented in Python
GNU General Public License v3.0
19 stars 7 forks source link

Fast Id (TID) #6

Closed H1B0B0 closed 7 months ago

H1B0B0 commented 1 year ago

Hello, I am trying to modify the llrp_proto.py file to enable the TID. Here is my code:


Message_struct['ImpinjTagReportContentSelector'] = {
    'type': EXT_TYPE,
    'vendorID': IPJ_VEND,
    'subtype': 50,
    'fields': [
        'ImpinjEnableSerializedTID',
        'ImpinjEnableRFPhaseAngle',
        'ImpinjEnablePeakRSSI'

    ],
    'encode': encode_ImpinjTagReportContentSelector
}

def encode_ImpinjEnableTagReportParameter(par, enable):
    # generic function to enable or disable impinj specific tag report parameters
    # encode enable
    active = 1 if enable else 0
    data = struct.pack('!H', active)

    return pack_data(par, data)

def encode_ImpinjEnableSerializedTIDMode(par):
    return encode_ImpinjEnableTagReportParameter('ImpinjEnableSerializedTID', par)

Message_struct['ImpinjEnableSerializedTID'] = {
    'type': EXT_TYPE,
    'vendorID': IPJ_VEND,
    'subtype': 51,
    'fields': [
        'SerializedTIDMode'
    ],
    'encode': encode_ImpinjEnableSerializedTIDMode
}

# Impinj_Octane_LLRP 6.2.32 ImpinjEnableRFPhaseAngle Parameter
def encode_ImpinjEnableRFPhaseAngle(par):
    return encode_ImpinjEnableTagReportParameter('ImpinjEnableRFPhaseAngle', par)

Message_struct['ImpinjEnableRFPhaseAngle'] = {
    'type': EXT_TYPE,
    'vendorID': IPJ_VEND,
    'subtype': 52,
    'fields': [
        'RFPhaseAngleMode'
    ],
    'encode': encode_ImpinjEnableRFPhaseAngle
}

# Impinj_Octane_LLRP 6.2.33 ImpinjEnablePeakRSSI Parameter
def encode_ImpinjEnablePeakRSSI(par):
    return encode_ImpinjEnableTagReportParameter('ImpinjEnablePeakRSSI', par)

Message_struct['ImpinjEnablePeakRSSI'] = {
    'type': EXT_TYPE,
    'vendorID': IPJ_VEND,
    'subtype': 53,
    'fields': [
        'PeakRSSIMode'
    ],
    'encode': encode_ImpinjEnablePeakRSSI
}

and here the XML of impinj :

<Impinj:ImpinjTagReportContentSelector>
      <Impinj:ImpinjEnableSerializedTID>
        <Impinj:SerializedTIDMode>Disabled</Impinj:SerializedTIDMode>
      </Impinj:ImpinjEnableSerializedTID>
      <Impinj:ImpinjEnableRFPhaseAngle>
        <Impinj:RFPhaseAngleMode>Disabled</Impinj:RFPhaseAngleMode>
      </Impinj:ImpinjEnableRFPhaseAngle>
      <Impinj:ImpinjEnablePeakRSSI>
        <Impinj:PeakRSSIMode>Disabled</Impinj:PeakRSSIMode>
      </Impinj:ImpinjEnablePeakRSSI>
      <Impinj:ImpinjEnableGPSCoordinates>
        <Impinj:GPSCoordinatesMode>Disabled</Impinj:GPSCoordinatesMode>
      </Impinj:ImpinjEnableGPSCoordinates>
      <Impinj:ImpinjEnableOptimizedRead>
        <Impinj:OptimizedReadMode>Disabled</Impinj:OptimizedReadMode>
      </Impinj:ImpinjEnableOptimizedRead>
      <Impinj:ImpinjEnableRFDopplerFrequency>
        <Impinj:RFDopplerFrequencyMode>Disabled</Impinj:RFDopplerFrequencyMode>
      </Impinj:ImpinjEnableRFDopplerFrequency>
      <Impinj:ImpinjEnableTxPower>
        <Impinj:TxPowerReportingMode>Disabled</Impinj:TxPowerReportingMode>
      </Impinj:ImpinjEnableTxPower>
    </Impinj:ImpinjTagReportContentSelector>

Help me please

beustens commented 1 year ago

What exactly is not working?

H1B0B0 commented 1 year ago

When i active the tid the phase angle and the peak rssi don't give response and i don't have tid. I have nothing