Skip to content

Instantly share code, notes, and snippets.

@SuperThunder
SuperThunder / fix_i225_v3_for_good_maybe.md
Last active June 27, 2023 05:34
Intel i225 v3 NIC low speed issues

Problem

Even with the B3 stepping, the Intel i225 is not a fully reliable NIC. It can get very slow speeds for gigabit (eg limited to 75mbps-150mbps) and sometimes negotiate to 100mb instead of gigabit. It can also stop working entirely when dual booting Windows and Linux, requiring a power off.

Things that seemed to improve i225 v3 performance

  • Disable checksum offload for TCP and UDP, IPv4 and v6. This can be found in Device Manager -> Intel i225-V -> right click -> properties -> advanced. This increased performance massively.
  • Setting Maximum number of RSS queues to 1 (probably set to 4) is also meant to help

Other things to try

@SuperThunder
SuperThunder / Vagrantfile
Last active March 26, 2023 23:22
CKA Pluralsight Vagrantfile
# Usage:
# vagrant up control1
# vagrant up worker1 worker2 worker3
# IMPORTANT: after running kubeadm init or join, you need to set the correct node ip
# sudo vim /var/lib/kubelet/kubeadm-flags.env
# --node-ip=10.28.28.<XX> at the end of the flags string
# sudo systemctl daemon-reload && sudo systemctl restart kubelet
# Assumes 10GB of RAM and 9 cores are available :)
@SuperThunder
SuperThunder / intel-ax210-wiimote-bluetooth.md
Last active December 19, 2021 09:01
Third Party (aliexpress) Wiimote with Dolphin over Intel AX210 Bluetooth

This was the only way I could find to get a third party aliexpress wiimote working with my laptop's AX210 bluetooth

  1. Use Zadig (remember to list all options) to replace the Intel driver with WinUSB (libusbK didn't work, black screen on boot)
  2. Set a keyboard shortcut in hotkeys to scan for wiimotes
  3. Launch a game
  4. Use your hotkey to scan for wiimotes
  5. Press the sync button in the battery compartment of the wiimote (several presses may be needed?)

edit: lost sync within minutes. might be better just to get the $10 CSR8510 USB dongle.

@SuperThunder
SuperThunder / compile-mbedos-rp2040-pipico.md
Last active December 19, 2021 09:55
Compiling mbed-os programs for RP2040 / Pi Pico in Mbed Studio

As of December 2021, support for RP2040 still doesn't seem to have been included in mbed mainline. Discussion from August suggests some form of test executable isn't building and this means it can't be merged. However, mbedos is used as the base for the Arduino Nano RP2040 Connect, which presumably does work, so there must be some basic level of functionality working. The PR indicates everything except RTC, LPTICKER, and PIO is supported.

However, if you want to try it anyway, I have been able to compile the mbed os 6 blinky program (not tested, though)

  1. Switch to using GCC in mbed studio by following these instructions. Restart mbed studio.
  2. Clone Arduino's mbed-os repo that includes RP2040 support to a convenient directory. You can use the branch they submitted for PR, or use a branch labelled extrapatches-\
@SuperThunder
SuperThunder / d1_mini_wontupload_fix.md
Last active January 4, 2021 23:25
D1 Mini won't upload or connect to esptool fix
@SuperThunder
SuperThunder / keweisi-mx18-pin-reverse.md
Last active August 28, 2020 21:47
Keweisi MX18 USB Tester / Meter Teardown and Pin Reverse Engineering

A while ago I got a nice USB current/voltage meter as described here

Curious to see how it worked, I opened it up - and then it never worked again. The OLED screen turns on but nothing is displayed. Looking at the TSSOP20 chip, I thought it might be an STM8 or STM32F0 which I could debug or reprogram. It turned out not to be, although the pinout is extremely close.

board_pins

pinout_vs_stm8

@SuperThunder
SuperThunder / mbed-stm32-calibrated-adc.md
Last active August 28, 2020 06:23
mbed STM32 calibrated ADC measurements

When using the ADC, the measurement is always relative to the analog reference voltage, which most of the time will be the same as Vdd. On many Nucleo, Discovery, and custom boards this will be a 3.3v LDO regulator. However, 3.3v is the target voltage, not the actual, and various factors could lead to significant voltage drops that lead to multi-% inaccuracy if you assume 3.3v.

Many (all?) STM32 MCUs come with an internal bandgap based reference and a calibration value that gives the value of that bandgap at some fixed reference (see your MCU datasheet for the exact value). For example, on the F303RE the bandgap reference is for 3.3V at 25C, and the calibration value is stored at an address that is stored as VREFINT_CAL_ADDR in the HAL libraries, which mbed uses.

The supply voltage Vdd can be calculated as such: