This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLPNIRSCANEVM: Bluetooth upload of scan configuration to device

Part Number: DLPNIRSCANEVM

I'm communicating with the NIRSCANNano device over Bluetooth. I'm able to download, deserialize and interpret a scan configuration just fine. However, what is not clear to me from the documentation is how I *upload* a scan configuration (after serializing it) to the device? Is this not supported?

When I look at the GATT Command Service (pg 99 in the manual), it seems that the maximum Command Data Packet size for Write (i.e. upload) is only 20 bytes where a serialized Scan Configuration payload is much more than that? (>90 bytes in my test case).

  • Hans,

    According to the NIRscan Nano documentation, scan configurations are sent to the system by uploading a series of 20-byte packets in succession. It mentions this in section J.2 of the User's guide.

    Let me know if you need further assistance.

    Best Regards,
    Philippe Dollo

  • Hi Philippe,

    Thanks much for your response. Indeed I have been referring to Section J.2 (and Table J-9) in the User's guide. It states: "Multiple packets are needed to transfer the following information to DLP NIRscan Nano" which suggests that there must be a way to not only download (which I have mostly working) multiple packets but also to upload.

    However, looking at Table J-8 (in Section J.1.1) it indicates that command data packets have a size of <20 bytes of which:
    - bytes-0&1 are the command id
    - byte-2 indicates read/write
    - byte-3 indicates the length of the command parameters (i.e. the number of bytes being written to the Nano)
    - bytes4-19 contain the command parameters (i.e. the actual bytes to be written)

    There's no mention here of the possibility of an "MP" transfer like there is for the subscribe notifications and the "Notes" state the characteristic write: "Sends a command in one BLE packet."

    So if there is a way to transmit more than 16 payload bytes to the Nano (I have tried to indicate this in byte-3 which would give a possibility for up-to 256 bytes) in an "MP" kind of way, then how do I program this?
    Should I then:
    - Y/N number the packets of 20-bytes each? (compare: this is what Nano does when downloading data)
    - Y/N use bytes# 4-19 in the command packets for the first 16 write bytes? (compare: Nano doesn't use bytes #5-19 when it responds to notifications with MP data)

    I guess the bottom line is that if there is indeed a way, it's not clear to me what protocol applies here? I've tried some different ways but have yet been unable to make it work.

    Thanks again for your help!

    Hans.

  • Hans,

    In this case your best approach may be simply to load the NIRscan Nano reference software so you can examine what the Bluetooth stack is doing with the data in the source. It is possible that you may even be able to modify the data format to best suit your needs. I may be able to take a look at the source code to point you in the right direction but it may take a few days before I get back to you. Thanks in advance for your patience.

    Don't forget that the reference software can be downloaded here if you don't have it already:
    www.ti.com/.../DLPNIRNANOEVM

    Best Regards,
    Philippe Dollo
  • Hans,

    Were you able to find any luck in modifying the bluetooth software source code? As it stands this is still my best suggestion to you at the moment.

    Let me know if you need further assistance.

    Best Regards,
    Philippe Dollo