Full ftdi and libftdi dynamic runtime support#1155
Conversation
|
Hi @awawa-dev, |
|
Hi |
|
@awawa-dev Hello, In the Nurikk version, the menu item was called “Subtract minimum, custom”. Nurikk version with "subtraction minimum, custom" Reintroduce color calibration for sk6812spi Version with “Subtract minimum” I would like to know whether this is what you wanted or whether I have made a mistake. |
|
These changes have been missing in the latest #521 I'll recreate them but it's hard to me to provide ETA: a lot is happening in my professional life lately. |
Hello, |
|
I think a few weeks and everything will stabilize and get back on track :-) FTDI maybe I'll finish next weekend. Do you have the possibility to check on Windows if HyperSPI works via FTDI? Generally I plan at least 2 big changes/improvements for version 22. Currently HyperHDR has already reached high maturity so the changelog will be shorter from version to version. |
@awawa-dev Hello, I should check whether HyperSPI works via FTDI under Windows. |
|
You just need esp32/rp2040 with a HyperSPI firmware: RPi is not neccesery. Then connect FTDI to esp32/rp2040 and see if you have some output on the serial port (https://github.com/awawa-dev/HyperSPI?tab=readme-ov-file#performancedebug-output) when you start/stop the LED device (HyperSPI type) in HyperHDR. |
|
@awawa-dev |
|
Its aqtinstall bug. Merge with the master branch (already fixed) or add these lines f78f6f5 |
Yes, I saw that, thanks for pointing it out. I have added the lines. |
|
Hello @awawa-dev, On my LG webOS, however, it is recognized without any problems. It is the same “full_ftdi_and_libftdi_dynamic_support” branch. Unfortunately, I can no longer test whether it works via FTDI. |
Thank you for testing. Doesnt matter how USB device with HyperSPI is presented: serial port is used only for debugging purposes, not for any operational usage. It can be even connected to the USB power supply and it should still drive the LEDs (but we cannot read the debug output then, irrelevant for the production setup). |
|
Hello @awawa-dev , |
|
Thank you. BTW while reviewing and debugging the nurikk RGBW calibration code I noticed that it behaves differently than my implementation in HyperSerial and HyperSPI. That's why I've now moved the code almost 1:1 from HyperSerial/HyperSPI to HyperHDR and FTDI. To be 100% I now have to debug it directly at the output using a logic analyzer. And in the queue is still waiting to check FTDI and HyperSPI (and separately from esp8266/esp32/rp2040...each device works in diffent way). In addition to that verification whether I haven't broken anything else in the classic HyperSPI support in HyperHDR on Linux. Development is probably over but now a lot of testing :-) |
|
Hello @awawa-dev , If further tests are required, I am still at your disposal. |
|
Thank you for your help @satgit62 , I really appreciate it. As for the calibration algorithms, they were simply different than in my other HyperSerial/HyperSPI projects, I don't judge whether they are better or worse, just different. But they were correct for the both edge calibration settings (255,255,255) and (0,0,0). Now I'm testing HyperSPI. On the oscilloscope I have beautiful graphs from FTDI for SPI, unfortunately HyperSPI on rp2040 doesn't detect it. Maybe I need to activate another SPI mode. I have to experiment :) |
|
Hi @awawa-dev , |
|
Of course for the average user it is much easier to use HyperSerialPico via USB than HyperSPI with FTDI... but let's think for a moment about the technical aspect of using FTDI. Neopixel LEDs like ws2812 or sk6812 are basically just emulated via SPI (on 3.3V), LED strips like APA102 are already closer to the proper application thanks to SPI but still do not solve the problem of the 3.3V to 5V level shifter that must be added to the APA102-FTDI chip... and basically only this setup as above using HyperSPI for FTDI fully meets the specifications: SPI on 3.3V to 3.3V GPIO. |













Almost complete rewrite of libftdi support, which was originally implemented by #521
Changed libFtdi library loading to fully dynamic. Changed base SPI driver to collection of different low-level drivers providing such a feature. Thanks to that LED drivers almost did not require changes. Also added support for manufacturer's FTDI drivers on Windows.
Linux/macOS
We use the most popular library for FTDI devices: libFTDI. You must have it installed on your system beforehand because we do not distribute it. This library also depends on libUSB. HyperHDR loads "libftdi1.so" or "libftdi1.so.2" library dynamically during runtime (usually it requires root).
Windows
Since installing the libFTDI drivers on Windows is very difficult, I have rewritten the HyperHDR driver on this system to use the manufacturer's system driver instead of libFTDI. This usually means that you don't actually need to install any drivers because Windows should install them automatically. If this doesn't happen, download and install the driver from the FTDI website. For licensing reasons, we do not distribute these drivers. HyperHDR loads "ftd2xx.dll" library dynamically during runtime.
Testing using my oscilloscope
sk6812 FTDI SPI:


1 PWM "bit" timings
0 PWM "bit" timings
ws2812 FTDI SPI:


1 PWM "bit" timings
0 PWM "bit" timings