From b3551659e766f2de54a1c7d6b443dd33a38a3072 Mon Sep 17 00:00:00 2001 From: Nicholas Giori <11759504+najorin@users.noreply.github.com> Date: Thu, 21 Apr 2022 07:36:49 -0400 Subject: [PATCH] Add Linux FTDI Flashing Instructions to xh_hk4401.md (#716) Co-authored-by: Nicholas Giori --- docs/v3.md | 1 + docs/xh_hk4401.md | 140 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) diff --git a/docs/v3.md b/docs/v3.md index d5e08262..ec9011b0 100644 --- a/docs/v3.md +++ b/docs/v3.md @@ -30,6 +30,7 @@ If you have a kit without a metal case, you can use our free 3D printing case dr 1. **[Flash the memory card.](flashing_os.md){target=_blank}** 2. **Build PiKVM** according to the video instruction or review the [illustrated instructions](v3_illustrated_install_instructions.md): + ??? tip "Video Guide: Metal case step by step" NOTE: OLED will not light up till step 3 is performed, video was performed after it was already configured, heat sinks NOT included. ![type:video](https://www.youtube.com/embed/jdqiwHKQcD4) diff --git a/docs/xh_hk4401.md b/docs/xh_hk4401.md index 8b51fcd1..fd443928 100644 --- a/docs/xh_hk4401.md +++ b/docs/xh_hk4401.md @@ -42,6 +42,144 @@ need is to connect it to a micro-USB connector. ensure you always purchase from a reputable store and brand (Adafruit, Sparkfun, etc.), Amazon **is not** a reputable store. +### Linux Instructions + +??? note "References I used to get my FTDIs working:" + * https://waterpigs.co.uk/articles/ftdi-configure-mac-linux/ + * https://manpages.debian.org/testing/ftdi-eeprom/ftdi_eeprom.1.en.html + * https://manpages.ubuntu.com/manpages/bionic/man1/ftdi_eeprom.1.html + * http://developer.intra2net.com/git/?p=libftdi;a=blob;f=src/ftdi.h + * http://developer.intra2net.com/git/?p=libftdi;a=blob;f=src/ftdi.c + * http://developer.intra2net.com/git/?p=libftdi;a=tree;f=ftdi_eeprom + * http://developer.intra2net.com/git/?p=libftdi;a=blob;f=ftdi_eeprom/example.conf + * http://developer.intra2net.com/git/?p=libftdi;a=blob;f=ftdi_eeprom/main.c + +!!! warning + Steps were performed on Debian-like installation (Pop!_OS 21.10) + +This workflow has worked for a self-described NON-genuine FTDI FT232RL chip. The other MAY be genuine, but it is also working. + +Neither of the following FTDI UART adapters are recommended. Purchasing both chips was an error (only 1 intended). However, having two (potentially non-genuine) FTDI UART adapters helped to create these instructions. + +- [Possibly genuine, but working regardless, (DSD TECH) FTDI](https://amazon.com/dp/B07BBPX8B8) + +- [Not genuine (HiLetGo) FTDI](https://amazon.com/dp/B00IJXZQ7C) + +!!! warning + The HiLetGo UART adapter comes with a USB MINI female connector and necessitates another adapter/cable for interfacing with the Pi. + +1. ??? note "Get info from FTDI" + * Plug the FTDI into a USB port on your Linux device and run `lsusb` to verify that the device is found + ``` + lsusb + ``` + * Ensure the device is recognized as FTDI + ``` + sudo lshw | grep -B 10 ftdi + ``` + * Record hardware information (not sure if needed, but was saved to prevent overwriting critical data in the EEPROM) + +2. ??? note "Blacklist ftdi_sio kernel module" + * The kernel module ==ftdi_sio== is currently enabled (and how you saw the device in the previous step). We need to disable this module to read/write to the EEPROM. + * The following command creates a file to blacklist the ==ftdi_sio== module. + ``` + echo "blacklist ftdi_sio" | sudo tee /etc/modprobe.d/bl-ftdi.conf > /dev/null + ``` + +3. ??? note "Reboot machine" + * We need to reboot into an environment without ftdi_sio active. + ``` + shutdown -r 0 + ``` + +4. ??? note "Install ftdi_eeprom if not already installed" + * Install ==ftdi_eeprom== with the following command. + ``` + sudo apt install ftdi_eeprom + ``` + +5. ??? note "Make a folder to work from and change it to our working directory" + ``` + mkdir ./ftdi_config + cd ./ftdi_config + ``` + +6. ??? note "Create a valid FTDI configuration file for ftdi_eeprom consumption" + * The below command (copy/paste all lines) will create a valid configuration file. Change parameters as required. + ``` + tee ./ftdi.conf > /dev/null <