RFD8500 Error when executing DCSSDKDefs.DCSSDK_COMMAND_OPCODE.DCSSDK_RSM_ATTR_GETALL


Audience

My app uses the API3 and scannercontrol.
My app first connects to the device using API3 and then connects via scannercontrol. When executing the command DCSSDK_RSM_ATTR_GETALL the following exception is returned
2019-07-18 15:48:59.014 23311-23403/com.reader I/BluetoothScanner: executeCommand started. opcode = DCSSDK_RSM_ATTR_GETALL inXML = 1
2019-07-18 15:48:59.015 23311-23403/com.reader I/BluetoothScanner: getAllAttributes starting
2019-07-18 15:48:59.016 23311-23403/com.reader I/BluetoothScanner: getAllAttributes call processInterfaceCommand startAttributeNumber = 0
2019-07-18 15:48:59.016 23311-23403/com.reader I/BluetoothScanner: 12 SSI bytes sent: ** Use Debug Build ***
2019-07-18 15:48:59.017 23311-23403/com.reader W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.OutputStream.write(byte[])' on a null object reference
2019-07-18 15:48:59.017 23311-23403/com.reader W/System.err: at com.zebra.scannercontrol.BluetoothScanner.writeData(BluetoothScanner.java:537)
2019-07-18 15:48:59.018 23311-23403/com.reader W/System.err: at com.zebra.scannercontrol.BluetoothScanner.mgmtCommand(BluetoothScanner.java:970)
2019-07-18 15:48:59.018 23311-23403/com.reader W/System.err: at com.zebra.scannercontrol.BluetoothScanner.processInterfaceCommand(BluetoothScanner.java:703)
2019-07-18 15:48:59.018 23311-23403/com.reader W/System.err: at com.zebra.scannercontrol.Scanner.getAllAttributes(Scanner.java:1908)
2019-07-18 15:48:59.018 23311-23403/com.reader W/System.err: at com.zebra.scannercontrol.Scanner.executeCommand(Scanner.java:1054)
2019-07-18 15:48:59.019 23311-23403/com.reader W/System.err: at com.zebra.scannercontrol.SDKHandler.dcssdkExecuteCommandOpCodeInXMLForScanner(SDKHandler.java:1198)
2019-07-18 15:48:59.019 23311-23403/com.reader W/System.err: at com.reader.ui.activities.MainActivity$openHistory$1.invoke(MainActivity.kt:237)
2019-07-18 15:48:59.019 23311-23403/com.reader W/System.err: at com.reader.ui.activities.MainActivity$openHistory$1.invoke(MainActivity.kt:37)
2019-07-18 15:48:59.020 23311-23403/com.reader W/System.err: at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
2019-07-18 15:48:59.020 23311-23403/com.reader I/BluetoothScanner: mgmtCommand returning -1
2019-07-18 15:48:59.020 23311-23403/com.reader I/BluetoothScanner: executeCommand returningDCSSDK_RESULT_FAILURE
2019-07-18 15:48:59.020 23311-23403/com.reader D/TAG: Result: DCSSDK_RESULT_FAILURE
2019-07-18 15:48:59.020 23311-23403/com.reader D/TAG: Response:
My code is
val inXml = "1"
val outXml = StringBuilder()
val result = App.mSDKHandler!!.dcssdkExecuteCommandOpCodeInXMLForScanner(
DCSSDKDefs.DCSSDK_COMMAND_OPCODE.DCSSDK_RSM_ATTR_GETALL,
inXml,
outXml,
1
)
Log.d("TAG", "Result: " + result.toString())
Log.d("TAG", "Response: " + outXml)