You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Octane SDK配置失败:Speedway R420阅读器现场测试异常排查

问题描述

使用Speedway R420 RFID阅读器进行标签读取测试,模拟器或真实Android设备连接测试机阅读器时可正常工作,但现场测试失败。日志显示问题出在调用reader.applySettings(settings)环节,抛出OctaneSdkException。

相关代码

val reader = ImpinjReader()
reader.name = "ATZ Reader"
reader.connectTimeout = 60000
reader.connect(readerHostname) //10.1.30.172
reader.setKeepaliveListener { impinjReader, keepaliveEvent ->
            Timber.d("Keepalive received from %s, %s, %s",
             impinjReader.name, impinjReader.address, keepaliveEvent)
            _connectStatus.tryEmit(RfIdStatus.Success)
}
reader.setConnectionLostListener {
            if(!it.isConnected) {
                logger.logRFID("Los connection ${it.name}, ${it.address}")
                _connectStatus.tryEmit(RfIdStatus.Disconnected)
            }
            else
                _connectStatus.tryEmit(RfIdStatus.Success)
        }
reader.tagReportListener = tagReportListener
val settings = reader.queryDefaultSettings()
reader.applySettings(settings) //Exception thrown at this line
reader.saveSettings()
reader.start()
CoroutineScope(newSingleThreadContext("rfid reader")).launch {
            while (true) {
                delay(10000)
                try {
                    reader.queryTags()
                    _connectStatus.emit(RfIdStatus.Success)
                    logger.logRFID("Tags queried")
                } catch (e: OctaneSdkException) {
                    logger.logRFID("Tags query error ${e.message}")
                    reader.disconnect()
                    break
                }
            }
}

错误栈信息

OctaneSdk exception: <?xml version="1.0" encoding="UTF-8"?>
<llrp:ADD_ROSPEC_RESPONSE xmlns:llrp="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" xmlns:Impinj="http://developer.impinj.com/ltk/schema/encoding/xml/1.46" Version="1" MessageID="5">
  <llrp:LLRPStatus>
    <llrp:StatusCode>M_FieldError</llrp:StatusCode>
    <llrp:ErrorDescription>LLRP [420] : //C1G2RFControl/ModeIndex : out-of-range</llrp:ErrorDescription>
    <llrp:ParameterError>
      <llrp:ParameterType>177</llrp:ParameterType>
      <llrp:ErrorCode>P_ParameterError</llrp:ErrorCode>
      <llrp:ParameterError>
        <llrp:ParameterType>183</llrp:ParameterType>
        <llrp:ErrorCode>P_ParameterError</llrp:ErrorCode>
        <llrp:ParameterError>
          <llrp:ParameterType>186</llrp:ParameterType>
          <llrp:ErrorCode>P_ParameterError</llrp:ErrorCode>
          <llrp:ParameterError>
            <llrp:ParameterType>222</llrp:ParameterType>
            <llrp:ErrorCode>P_ParameterError</llrp:ErrorCode>
            <llrp:ParameterError>
              <llrp:ParameterType>330</llrp:ParameterType>
              <llrp:ErrorCode>P_ParameterError</llrp:ErrorCode>
              <llrp:ParameterError>
                <llrp:ParameterType>335</llrp:ParameterType>
                <llrp:ErrorCode>P_FieldError</llrp:ErrorCode>
                <llrp:FieldError>
                  <llrp:FieldNum>1</llrp:FieldNum>
                  <llrp:ErrorCode>A_OutOfRange</llrp:ErrorCode>
                </llrp:FieldError>
              </llrp:ParameterError>
            </llrp:ParameterError>
          </llrp:ParameterError>
        </llrp:ParameterError>
      </llrp:ParameterError>
    </llrp:ParameterError>
  </llrp:LLRPStatus>
</llrp:ADD_ROSPEC_RESPONSE>


    at com.impinj.octane.ImpinjReader.addRoSpec(ImpinjReader.java:1220)
    at com.impinj.octane.ImpinjReader.applySettingsWithOptionalFactoryReset(ImpinjReader.java:1050)
    at com.impinj.octane.ImpinjReader.applySettings(ImpinjReader.java:1008)
    at com.impinj.octane.ImpinjReader.applySettings(ImpinjReader.java:1068)
    at ru.avangard.refueler.features.datacollector.service.RfidReaderClient.setVariantA(RfidReaderClient.kt:70)
    at ru.avangard.refueler.features.datacollector.service.RfidReaderClient.start(RfidReaderClient.kt:48)
    at ru.avangard.refueler.features.datacollector.service.DataCollectorService$startRfidReaderClient$1.invokeSuspend(DataCollectorService.kt:131)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

设备配置信息

{
  "antennas": {
    "antennaCollectionCreatedBySerializer": false,
    "antennaConfigs": [
      {
        "enabled": true,
        "isMaxRxSensitivity": true,
        "isMaxTxPower": true,
        "portName": "Antenna Port 1",
        "portNumber": 1,
        "rxSensitivityinDbm": 0.0,
        "txPowerinDbm": 0.0
      },
      {
        "enabled": true,
        "isMaxRxSensitivity": true,
        "isMaxTxPower": true,
        "portName": "Antenna Port 2",
        "portNumber": 2,
        "rxSensitivityinDbm": 0.0,
        "txPowerinDbm": 0.0
      },
      {
        "enabled": true,
        "isMaxRxSensitivity": true,
        "isMaxTxPower": true,
        "portName": "Antenna Port 3",
        "portNumber": 3,
        "rxSensitivityinDbm": 0.0,
        "txPowerinDbm": 0.0
      },
      {
        "enabled": true,
        "isMaxRxSensitivity": true,
        "isMaxTxPower": true,
        "portName": "Antenna Port 4",
        "portNumber": 4,
        "rxSensitivityinDbm": 0.0,
        "txPowerinDbm": 0.0
      }
    ],
    "isMaxRxSensitivity": true,
    "isMaxTxPower": true,
    "polarizationEnabled": false,
    "rxSensitivityinDbm": 0.0,
    "txPowerinDbm": 0.0
  },
  "autoStart": {
    "firstDelayInMs": 0,
    "gpiPortNumber": 0,
    "mode": "Immediate",
    "periodInMs": 0,
    "utcTimestamp": 0
  },
  "autoStop": {
    "durationInMs": 0,
    "gpiPortNumber": 0,
    "mode": "None",
    "timeout": 0
  },
  "filters": {
    "Mode": "None",
    "TagFilter1": {
      "BitCount": 0,
      "BitPointer": 0
    },
    "TagFilter2": {
      "BitCount": 0,
      "BitPointer": 0
    },
    "tagSelectFilterList": []
  },
  "gpis": {
    "gpiCollectionCreatedBySerializer": false,
    "gpiConfigs": [
      {
        "debounceInMs": 0,
        "isEnabled": false,
        "portNumber": 1
      },
      {
        "debounceInMs": 0,
        "isEnabled": false,
        "portNumber": 2
      },
      {
        "debounceInMs": 0,
        "isEnabled": false,
        "portNumber": 3
      },
      {
        "debounceInMs": 0,
        "isEnabled": false,
        "portNumber": 4
      }
    ]
  },
  "gpos": {
    "gpoCollectionCreatedBySerializer": false,
    "gpoConfigs": [
      {
        "gpoPulseDurationMsec": 0,
        "mode": "Normal",
        "portNumber": 1
      },
      {
        "gpoPulseDurationMsec": 0,
        "mode": "Normal",
        "portNumber": 2
      },
      {
        "gpoPulseDurationMsec": 0,
        "mode": "Normal",
        "portNumber": 3
      },
      {
        "gpoPulseDurationMsec": 0,
        "mode": "Normal",
        "portNumber": 4
      }
    ]
  },
  "holdReportsOnDisconnect": true,
  "keepalives": {
    "enableLinkMonitorMode": false,
    "enabled": false,
    "linkDownThreshold": 0,
    "periodInMs": 0
  },
  "lowDutyCycle": {
    "EmptyFieldTimeoutInMs": 0,
    "FieldPingIntervalInMs": 0,
    "IsEnabled": false
  },
  "readerMode": "AutoSetDenseReaderDeepScan",
  "reducedPowerFrequenciesInMhz": [],
  "report": {
    "includeAntennaPortNumber": false,
    "includeChannel": false,
    "includeCrc": false,
    "includeDopplerFrequency": false,
    "includeFastId": false,
    "includeFirstSeenTime": true,
    "includeGpsCoordinates": false,
    "includeLastSeenTime": true,
    "includePcBits": false,
    "includePeakRssi": false,
    "includePhaseAngle": false,
    "includeSeenCount": true,
    "mode": "Individual",
    "optimizedReadOps": []
  },
  "searchMode": "DualTarget",
  "session": 2,
  "tagPopulationEstimate": 32,
  "truncatedReply": {
    "bitPointer": 32,
    "epcLengthInWords": 0,
    "gen2v2TagsOnly": false,
    "isEnabled": false,
    "tagMask": ""
  },
  "txFrequenciesInMhz": [],
  "xArray": {
    "spatialConfig": {
      "direction": {
        "diagnosticReportEnabled": false,
        "enabledSectors": [],
        "entryReportEnabled": true,
        "exitReportEnabled": true,
        "fieldOfView": "READER_SELECTED",
        "isMaxTxPower": true,
        "mode": "HighPerformance",
        "tagAgeIntervalSeconds": 2,
        "txPowerinDbm": 0.0,
        "updateIntervalSeconds": 2,
        "updateReportEnabled": true,
        "userTagPopulationLimit": 0
      },
      "location": {
        "computeWindowSeconds": 10,
        "diagnosticReportEnabled": false,
        "disabledAntennaList": [],
        "entryReportEnabled": true,
        "exitReportEnabled": true,
        "isMaxTxPower": true,
        "locationAlgorithmControl": [],
        "tagAgeIntervalSeconds": 20,
        "txPowerinDbm": 0.0,
        "updateIntervalSeconds": 5,
        "updateReportEnabled": true
      },
      "mode": "Inventory",
      "placement": {
        "facilityXLocationCm": 0,
        "facilityYLocationCm": 0,
        "heightCm": 400,
        "orientationDegrees": 0
      }
    }
  }
}
排查思路

1. 定位核心错误点

错误栈明确指出//C1G2RFControl/ModeIndex : out-of-range,说明读取器的C1G2射频控制模式索引超出了设备支持范围,该参数与readerMode设置直接相关。

2. 分析环境差异原因

测试环境正常、现场失败,大概率是以下两种情况:

  • 现场读取器固件版本与测试环境不一致:不同固件版本对AutoSetDenseReaderDeepScan这类自动模式的支持范围不同
  • 现场地区射频法规限制:不同国家/地区的频段、功率限制不同,自动模式可能无法适配,导致ModeIndex超出范围

3. 具体排查步骤

  • 检查读取器固件版本:用Impinj Speedway Connect工具对比测试机和现场机的固件版本,现场机可能是旧版本,不支持当前设置的readerMode
  • 替换为兼容的ReaderMode:放弃自动模式,手动设置为现场设备支持的固定模式,比如ReaderMode.MaxThroughput或ReaderMode.DenseReader,代码修改示例:
    val settings = reader.queryDefaultSettings()
    settings.readerMode = ReaderMode.MaxThroughput // 替换为兼容模式
    reader.applySettings(settings)
    
  • 验证射频合规性:查询现场地区允许的RFID频段,手动设置合规的频段和功率,避免自动模式触发违规参数
  • 重置读取器配置:现场读取器可能存在残留配置冲突,调用reader.factoryReset()后再应用默认设置,排除旧配置干扰
  • 检查XArray配置:从设备配置看XArray处于启用状态,部分旧固件在XArray开启时对ReaderMode的支持有限,尝试关闭XArray后测试:
    settings.xArray.isEnabled = false
    

4. 额外验证

在现场用Impinj官方工具直接连接读取器,手动设置相同的readerMode,判断是代码问题还是设备/环境问题。

内容的提问来源于stack exchange,提问作者Barmaley

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 18:36:59