Skip to content

Instantly share code, notes, and snippets.

View zerog2k's full-sized avatar

Jens J. zerog2k

  • DFW, TX, USA
View GitHub Profile
@zerog2k
zerog2k / firmware-qca9377.sh
Created July 15, 2023 02:57
Downloads QCA9377 sdio wifi & bluetooth uart firmware for Armbian. Run as root.
#!/bin/bash
echo "Downloading QCA9377 firmware..."
# qca9377-sdio-wifi firmware
mkdir -p /lib/firmware/ath10k/QCA9377/hw1.0/
cd /lib/firmware/ath10k/QCA9377/hw1.0/
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA9377/hw1.0/board.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA9377/hw1.0/board-2.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA9377/hw1.0/firmware-sdio-5.bin
jens@mars:/tmp/explor$ fdtdump -s boot.img
**** fdtdump is a low-level debugging tool, not meant for general use.
**** If you want to decompile a dtb, you probably want
**** dtc -I dtb -O dts <filename>
boot.img: found fdt at offset 0x776800
/dts-v1/;
// magic: 0xd00dfeed
// totalsize: 0x59ba (22970)
@zerog2k
zerog2k / crmpoint2cloudkey.txt
Last active August 18, 2023 01:02
notes for repurposing Ubiquiti CRM Point to "Cloud Key", by installing unifi controller, new method
### new procedure for CRMPoint -> Unifi Network Controller conversion
## install latest crmpoint fw per:
## https://community.ui.com/questions/Installing-airControl-on-CRM-Point/a4f1fdcd-114a-4c06-a842-e56eff486570
# login via ssh
# change root/ubnt password
passwd
# stop and disable old services
for SERVICE in aircontrol postgresql infctld; do
@zerog2k
zerog2k / dreamer_fwupdate.py
Last active April 7, 2021 08:43
script to upload firmware to FlashForge Dreamer (or PowerSpec Ultra3D) printers
#!/usr/bin/env python3
'''
script to upload firmware to FlashForge Dreamer (or PowerSpec Ultra3D) printers
'''
import usb
import hashlib
printer = usb.core.find(idVendor=0x2b71)
CONTROL_EP = 0x01
@zerog2k
zerog2k / gist:f8d5ad83d2b93f145a4f1d8964663d10
Last active February 25, 2022 21:04
notes for repurposing Ubiquiti CRM Point to "Cloud Key", by installing unifi controller
install latest crmpoint fw per:
https://community.ui.com/questions/Installing-airControl-on-CRM-Point/a4f1fdcd-114a-4c06-a842-e56eff486570
# login via ssh
# change root/ubnt password
passwd
# fix jessie backports repo
echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
@zerog2k
zerog2k / ypyt_sensor_parse.py
Last active April 20, 2023 15:30
reads and parses sensor data of JQ-200 / JQ-300 from ypyt cloud for given device token
#!/usr/bin/env python3
""" reads and parses sensor data from ypyt cloud for given device token """
# see https://github.com/xoseperez/espurna/issues/1644 for more context
import json
import os
import sys
import paho.mqtt.client as mqtt
import time as t
@zerog2k
zerog2k / nginx.conf
Created February 7, 2019 04:07
poc of openresty config to dynamically route udp traffic to backends with ip whitelisting, based upon data stored in redis
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
stream {
lua_shared_dict config 10m;
@zerog2k
zerog2k / id115_description.md
Created August 11, 2018 23:39
ID115 Bluetooth BLE smart watch fitness band pinouts
@zerog2k
zerog2k / lynwo_i8_description.md
Last active June 24, 2021 04:52
Lynwo i8 bluetooth smart watch fitness band with heart rate sensing
@zerog2k
zerog2k / gist:f830c5722c4686c327e2850406cb9377
Last active July 11, 2020 11:17
ID115 ble command set exploration
ID115
settings write on uuid 0x0af6 to device:
responses read on uuid 0x0af7 (notify?)
------
startup - scan:
> 0204
< Value: 0204f2fc581240a6
> Value: 0202
< Value: 02025b0a8f01076d6b050f06