Hello,
I am trying to make a simple tkinter gui in Raspberry (linux) for the DLP NIRscan Nano EVM connected through USB.
So far, reading the DLP NIRscan Nano EVM (Rev. G) User Guide, and following the directions in there, it was going pretty reasonable. Successfully tested several commands listed in Table H.2 like NNO_CMD_GET_DATE_TIME, NNO_CMD_SCAN_SET_ACT_CFG, NNO_CMD_READ_SCAN_TIME, NNO_CMD_PERFORM_SCAN, NNO_CMD_READ_DEVICE_STATUS and NNO_CMD_FILE_GET_READSIZE. The latter returns 3822 bytes for default configuration. However I have trouble with NNO_CMD_FILE_GET_DATA. I send this command 8 times and read 7 x 512 + 3 x 64 bytes. However the last 46 bytes cannot be read. (7 x 512 + 3 x 64 + 46 = 3822).
The headers for the returned chunks are pretty correct (C0 00 00 02, meaning 512 bytes of payload). The last size in the header of last chunk is also correct (238 bytes).. Summing up the returned sizes I get 3822, which is the number returned by NNO_CMD_FILE_GET_DATA. However, the last sub-chunk of 46 bytes are not returned, HID times out. I tried reading 64, 40, 10 and 4 bytes to no avail.The header of the last returned data for the last NNO_CMD_FILE_GET_DATA is "C0 00 EE 00" which says that there are 238 bytes to read if I interpreted it correctly. But I could only read 192 bytes of it.
What am I missing here?
For the particular application I am working on, I do not actually need those bytes, as I noticed that the scan data is actually within the first couple of chunks, the others are zero (hope I am not missing something here either)
For information, the device is working fine with the Windows GUI. I've also updated its firmware to the latest.
Thank you for your possible help and directions.