DLPNIRSCANEVM: DLPNIRNANOEVM

Part Number: DLPNIRSCANEVM
Other Parts Discussed in Thread: DLPNIRNANOEVM

Tool/software:

Hi, I am trying to integrate the DLPNIRNANOEVM board on to RPi4 through usb. My python program is running, blubs are activated but failing to run scan.

The logs state that "Export a config from GUI and pass --cfg-file."

However I did not see any GUI feature to export the config.

Can you please help?

python3 /home/admin/integration/NewScan.py --vid 0x0451 --pid 0x0 --cfg 0x01 --out ~/nir_scans/scan_raw.csv --u16 --log DEBUG
If you get permission errors, add and reload udev, then replug:
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="0000", MODE="0666", TAG+="uaccess"
2025-08-11 18:19:05,594 DEBUG Opening HID 0451:0000
2025-08-11 18:19:05,594 WARNING open(vid,pid) failed or wildcard (force-enumerate); trying open_path
2025-08-11 18:19:05,611 INFO Opened via path: b'1-1.1:1.0' (VID:PID=0451:4200)
2025-08-11 18:19:05,611 INFO >> GET_HIBERNATE (READ) grp=0x03 cmd=0x0F data=[]
2025-08-11 18:19:05,612 DEBUG READ try variant=gc_len_grp via feature
2025-08-11 18:19:05,615 DEBUG TX (feature): 00c0000200030f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2025-08-11 18:19:05,617 DEBUG RX (feature): 000000000000000000
2025-08-11 18:19:05,618 DEBUG GET_HIBERNATE len=0 mode=data-only data=[]
2025-08-11 18:19:05,620 INFO >> SET_HIBERNATE(0) (WRITE) grp=0x03 cmd=0x0E data=[0]
2025-08-11 18:19:05,623 DEBUG TX (output): 00400003000e0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2025-08-11 18:19:05,724 INFO >> DLPC+LAMP ENABLE (WRITE) grp=0x01 cmd=0x05 data=[1, 1]
2025-08-11 18:19:05,727 DEBUG TX (output): 0040000400050101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2025-08-11 18:19:05,828 INFO Connected & lamp command sent
2025-08-11 18:19:05,829 INFO >> GET_NUM_CFGS (READ) grp=0x02 cmd=0x22 data=[]
2025-08-11 18:19:05,830 DEBUG READ try variant=gc_len_grp via feature
2025-08-11 18:19:05,832 DEBUG TX (feature): 00c0000200022200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2025-08-11 18:19:05,835 DEBUG RX (feature): 004000000000000000
2025-08-11 18:19:05,835 INFO << NUM_CFGS -> 0 (mode=data-only raw=[0, 0, 0, 0, 0])
2025-08-11 18:19:05,838 ERROR Device reports 0 stored configs AND no --cfg-file provided. Export a config from GUI and pass --cfg-file.

  • Hello Shiva,

    You will need to connect on a PC with the GUI and create some configs and store them on the EVM, then you should be able to call them from your code.

    Fizix

  • Hi Fizix, 

    Thanks for your reply. I have followed your instructions but in vain. Despite having a stored config on the EVM  the code is not detecting. 

    Is there a way to export the config blob from the GUI? I did not find any in the gui but documentation say so. Appreciate your help

    Shiva Reddy

  • Hello again Shiva,

    Let me consult with the team on this.  

    Fizix

  • Hi Fizix, Greetings. Please let me know if you have an update Thank you

    I have seved the config on the NIR EPROM 

    But I can not find it programatically:

    $ python3 /home/admin/integration/nirscan_cfg_names2.py
    No configs found

    Also, RSP always has generic/empty frame

    admin@node-04-pi4:~/integration $ python3 /home/admin/integration/nirscan_ctrl.py --scan-and-wait 0 --timeout 90
    Opened HID interface #0
    [status] TX c00002001902 RSP 00010001000000
    [baseline idle] 00010001000000
    [scan slot 0] TX 40010300180200 RSP 00010001000000
    [status] TX c00202001902 RSP 00010001000000
    [status] TX c00202001902 RSP 00010001000000
    [status] TX c00202001902 RSP 00010001000000
    [status] TX c00202001902 RSP 00010001000000

  • Hello again Shiva,

    The dark frame is intentional for the measurement of background signal once per frame.  It is baked into the FW after 24 bit planes it shows an all dark frame.

    When you reconnect the TI GUI can you see the configuration that you built and saved to the unit?

    Fizix

  • Yes.. I have saved and set it as active. But when I connect to RPi4 and run the script, it is not detecting the saved config. The product documentation says export the config but I do not see it in the UI. Please help

  • Shiva,

    I am asking if you use the GUI on a PC can you see the configuration you made and stored.  I want to be sure that it actually saved the solution.

    Fizix

  • ok, yes I do see the configuration that I have saved  when I use GUI on a PC

  • Hello again Shiva,

    Do you have the Spectrum Library and associated source code and documentation downloaded.  The engineer who previously worked on this believes that what you are looking for is in that documentation/source.

    Fizix

  • HI Fizix, I have downloaded the associated documentation and reading from that. I am seeing any feature on GUI to export the config to a .bin file. I basically need to read the "saved config" on the EPROM. I am unable to read using python. Please help.

  • Shiva,

    I do not have sufficient Python experience to advise on this.  Did you find the TIVA source code?

    Fizix

  • Dear Fizix,

    Please do treat this request as important and urgent. I am a researcher at UoG working on the in-situ application of NIR spectrography. Can you please direct me to an expert who can help me move forward. The ask is simple. I need help to read the configuration that is stored on EPROM of DLPNIRNANOEVM board. Alternatively, it will be a great help to export the stored configuration to a file using GUI. It has been 14 days still struggling to move forward. Please help

    Shiva Reddy

  • Dear Shiva,

    The original programmer is no longer with TI.  I consulted with the engineer who previously owned this platform and he did not know either.  

    Also the source code for the GUI can be found by installing this file:  www.ti.com/.../TIDCC48.

    Fizix

  • Dear TI Team,

    I’m escalating an issue blocking my research integration with the DLPNIRNANOEVM. My use case requires running scans from a Raspberry Pi 4 (Ubuntu) via USB—without the Windows GUI. The purpose of buying this board was headless integration, not GUI use.

    Unfortunately, I have not been able to obtain a working, documented path to trigger a scan and save results to the EVM SD card or the Pi filesystem from Linux. In addition, the documentation link I was given is broken:

    • Broken link: 

    • Please provide a working link or updated doc set.

    Environment & facts

    • Hardware: DLPNIRNANOEVM, USB-connected to Raspberry Pi 4.

    • OS: Ubuntu on RPi4 (headless; Windows GUI is not an option for deployment).

    • Goal: Programmatically perform a scan and either

      1. save to the EVM’s SD card, or

      2. stream data over USB and save on the Pi (CSV/JSON).

    • Interface: USB HID via hidapi/Python.

    • What works: I can toggle hibernate (e.g., SET_HIBERNATE(1/0) shows expected TX/feature traffic).

    • What fails / unclear:

      • Attempting to list or use stored configs returns no configs found despite saving in the GUI previously:

        “No stored configs discovered via GET_STORED (0..7). Ensure you clicked 'Save to Device/Board' in the GUI”
        The GUI does not appear to expose a clear export/save-to-device flow I can verify from Linux.

      • Status/command attempts yield repeating responses like:
        TX c00202001902 RSP 00010001000000 (no actionable error code documented).

      • I need an officially supported sequence to invoke NNO_CMD_PERFORM_SCAN (or equivalent), select/configure a scan, and retrieve spectrum data on Linux.

    Exact requests

    1. Linux/RPi4 procedure: A minimal, supported command sequence (HID or CDC) to:

      • Select or define a scan configuration without the Windows GUI.

      • Perform a single-shot scan.

      • Either save to SD on the EVM or stream the spectrum back to the host for saving.

    2. Protocol documentation: Up-to-date, complete documentation for the NNO command set (message formats, opcodes, expected responses, error codes), including the meaning of responses like RSP 00010001000000.

    3. Reference code for Linux: A minimal CLI example (C or Python) that:

      • Opens the device on Linux.

      • Issues the scan command(s) with correct payloads.

      • Reads back the spectrum and writes a CSV.

    4. Config handling guidance (no GUI):

      • How to create and persist a scan configuration to the device purely over USB from Linux, or how to upload a config blob if that’s the intended path.

      • Confirmation whether SD-card writes can be triggered via host commands (and the directory/filename scheme if so).

    5. Escalation/contact: Please route this to the DLPNIRNANOEVM product/application engineering team and provide a direct engineering contact or case number. If there are firmware/SDK prerequisites, please share those download links.

    Optional (but helpful) deliverable from TI

    • A short “headless scan” app (Linux) that takes --exposure, --averages, --wavelength-range, etc., and outputs a CSV. Even a stripped-down sample would unblock me.

    Attachments I can provide on request

    • Short Python/HID snippet I’m using

    • Full HID logs (include lines like SET_HIBERNATE writes and RSP 00010001000000)

    • lsusb and dmesg excerpts

    • Board label photos and any version strings I can query

    This is time-sensitive for my research integration. I appreciate your help providing a supported, Linux-first path that does not rely on the Windows GUI.

    Best regards,
    Shiva Reddy
    Researcher, University of Guelph
    Guelph, ON

  • Shiva,

    It is strange that the file is not found since I downloaded it yesterday.  I am going to send you a message via email.

    Fizix

  • HI Fizix, 

    Thank you for providing the SOURCE files (tidcc48a.zip)

     

    However, to decode scan data on Linux, I need the DLP Spectrum Library available as a Linux-loadable library (.so) or the C sources so I can build it for ARM. TI has provided headers + a static archive only, which is insufficient.

    1. What I received (no sources):

    ~/NIRScan_Nano_Python/DLP Spectrum Library/src

    Directory contents:

    dlpspec_calib.h  dlpspec_helper.h  dlpspec_scan.h  dlpspec_scan_col.h

    dlpspec_scan_had.h  dlpspec_setup.h  dlpspec_types.h  dlpspec_util.h

    dlpspec_version.h  libdlpspec.a

     

    There are no *.c files (e.g., dlpspec.c, dlpspec_scan.c, tpl.c, etc.), so I cannot compile a shared object on the Pi

     

    1. Why this blocks Linux/RPi4 integration
    • The Python tooling (and TI docs) expect a Linux shared library (libdlpspec.so) or the C sources to build one.
    • A static archive (libdlpspec.a) alone is not sufficient on the Pi:
      • It may be the wrong architecture (x86 vs ARM).
      • Even if ARM, the objects may not be PIC, so linking into a .so will fail (relocation … recompile with -fPIC).
    • Without a Linux-loadable libdlpspec.so, I cannot decode the .dat blob into spectra in my headless pipeline.

     

    Exact request (please advise the Apps/Library team)

     

    1. Provide the DLP Spectrum Library C sources (the src/ folder with dlpspec*.c, tpl.c, etc.),

    or

    1. Provide prebuilt ARM Linux binaries:
      1. libdlpspec.so for ARMv7 (armhf) and/or ARMv8 (aarch64) built with -fPIC, plus matching headers.
      2. Include soname/version and a simple loader test.
    2. Confirm the license/redistribution terms for building and bundling the .so in an academic project.
    3. (Nice to have) A minimal Linux sample (C or Python) showing:
      1. open device (USB HID),
      2. perform scan,
      3. decode with libdlpspec into wavelengths/intensities,
      4. write CSV.

    Impact / urgency

    This is a time-sensitive research integration at the University of Guelph. The board was selected for embedded Linux operation. Without the sources or an ARM .so, the system cannot decode scans on the Pi. Please escalate to the DLPNIRNANOEVM DLP Spectrum Library owners and share a case number and contact. I’m ready to validate any provided package on my RPi4 immediately.

  • Hello Shiva,

    Please note that TI celebrates a United States Federal Holiday on 9/1 and we will return 9/2.

    Fizix will return then.

    Best,

    Aaron

  • Shiva,

    i was under the impression that you had already installed the Spectrum Library.  Please go to this link:  https://www.ti.com/tool/download/TIDCAK0 

    When I install this I find the files you listed there:

    Under C:\ti\DLPSpectrumLibrary_1.1.5\src 

    Beyond this we do not have resources to go build what you are asking for.  Support is for Windows.  

    I know there are files in GitHub that are not officially supported but might be helpful.

    Fizix

  • Dear  Fizix, 

    I need TI's support more than ever to make progress Disappointed 

    What I have attempted (chronological & specific)

    1. Device enumeration (works):
    2. import hid; print([(hex(d['vendor_id']),hex(d['product_id']),d.get('product_string')) for d in hid.enumerate(0x0451,0x4200)])
    3. # -> [('0x451','0x4200','Nirscan Nano')]
    4. Low-level HID scripts (Python):
      Implemented commands from the public docs/tables:
      • Groups: G_SYS=0x01, G_SCAN=0x02, G_MISC=0x04
      • Commands: DLPC_ENABLE(0x05), READ_DEVICE_STATUS(0x03), SCAN_CFG_NUM(0x22), GET_ACT_CFG(0x23), SET_ACT_CFG(0x24), PERFORM_SCAN(0x18), SCAN_GET_STATUS(0x19), SCAN_CFG_APPLY(0x1E), SCAN_CFG_SAVE(0x1F)
      • Flags & framing variants tried (exhaustive):
        • TI semantics: WRITE=0x21, READ=0x61; length = payload only; report ID 0x00 and 0x01
        • Legacy semantics: WRITE=0x40, READ=0xC0; length = payload + 2 (group+cmd); report ID 0x00 and 0x01
        • Chunking for multi-packet writes (≤57 B payload per report).
    5. HID path selection:
      • Enumerated with hid.enumerate(0x0451,0x4200): one path reported: b'1-1.4:1.0' (interface 0).
      • Also tried opening each /dev/hidrawX shown in dmesg after replug; same behavior.
    6. DLP Spectrum Library config generation (works):
      • Confirmed function signature:
      • DLPSPEC_ERR_CODE dlpspec_scan_write_configuration(
      •     const scanConfig *pCfg, void *pBuf, const size_t bufSize);
      • Provided our own buffer (8 KB) → success, output blob 87 bytes (cfg_col.bin).
      • Fields used in our flat scanConfig flavor: scan_type=COLUMN, width_px=1, wavelength_start_nm=900, wavelength_end_nm=1700 (others optional/variant).
    7. Applying/saving the config over HID (fails):
      • We built a robust apply_cfg.py that:
        • Tries all four dialects (TI/LEG × RID 0/1)
        • Tries both VID/PID open and explicit path open (string→bytes)
        • Uses chunked writes for the 87-byte blob
        • Verifies with READ_DEVICE_STATUS, SCAN_CFG_NUM, GET_ACT_CFG, etc.
      • Observed behavior across all combinations: replies are empty or grp=0x00/cmd=0x00, len=0 for every command, including DLPC_ENABLE and READ_DEVICE_STATUS.
      • Example log:
      • [dbg:TI-rid0] READ 04/03 -> g=None c=None len=0
      • [dbg:TI-rid0] WRITE 01/05 len=2 -> g=None c=None rlen=0
      • ...
      • [dbg:LEG-rid1] READ 04/03 -> g=None c=None len=0
      • Even when forcing the sole enumerated path (1-1.4:1.0) and each dialect explicitly, no command elicits a non-empty response.
    8. Attempted scan without config (for completeness):
      • PERFORM_SCAN + polling SCAN_GET_STATUS: responses empty/zero; scan never starts.
      • Earlier, a separate script reported “stored configs: 0”, but we have never been able to change that state due to the lack of any valid reply on the command interface.
    9. Housekeeping checked:
      • Replugs, different cables/ports, no hubs.
      • Killed any process holding /dev/hidraw*.
      • Tried both open(vid,pid) and open_path(...).
      • Confirmed permissions by running as root (with sudo -E).
      • Tried with and without microSD inserted at boot.

    What’s blocking me

    • The device never acknowledges any of the standard command reads/writes on Linux HID (all combinations tried).
    • We can build a valid scan-config blob with TI’s library on the Pi, but cannot deliver it to the device: no response to APPLY, SAVE, or any status queries.
    • The Windows GUI is not an option for our deployment; we need a documented, supported Linux path.

    What we need from TI (specific asks)

    • The config export from Windows interface.

     I have tried all options that I can perceive. I just need the config file to make progress with this device. Triggering a scan from a Raspberry Pi is a  crucial component of my research effort. Please help

    Shiva Reddy

    PhD Scholer,

    UoG

  • Hello again Shiva,

    From this forum in 2018 this thread  [https://e2e.ti.com/support/dlp-products-group/dlp/f/dlp-products-forum/738328/linux-dlpnirnanoevm-do-you-have-any-libraries-for-linux]  indicates that there is no direct support for Linux, but that USB commands can se sent.

    That thread references this thread [https://e2e.ti.com/support/dlp/f/94/p/538053/1960163_]

    Fizix