Skip to content

Instantly share code, notes, and snippets.

@JamesHagerman
JamesHagerman / HowToHostapd.md
Last active April 7, 2024 12:50
Just some notes on getting wlan0->eth0 configured with hostapd and dnsmasq to turn a box into a router.

How to setup hostapd based router

Install some tools you'll need with: apt-get install -y hostapd dnsmasq wireless-tools iw wvdial

Note that some wifi cards just plain don't work with hostapd. Sorry.

Setup your network interfaces correctly

This is done in /etc/network/interfaces:

@JamesHagerman
JamesHagerman / stslte-notes.md
Last active March 17, 2024 20:37
My notes about running srsLTE

srsLTE notes

These are notes I've taken while rying to get srslte up and running. This is messy, sorry...

Working solution - LimeSDR + SoapySDR + srsLTE

Dependencies:

sudo apt install tree vim git g++ make cmake pkg-config libpython-dev python-numpy swig libi2c-dev libusb-1.0-0-dev libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev gnuradio
@JamesHagerman
JamesHagerman / Black-Magic-Probe-flash-notes.md
Last active December 7, 2023 18:12
The BPM is basically the best flashing tool for STM32/ARM chips. Get the hex file for whatever you're flashing (build it, download it, whatever), then follow these directions.

Black Magic Probe - Firmware Flashing

The BPM is basically the best flashing tool for STM32/ARM chips. Get the hex file for whatever you're flashing (build it, download it, whatever), then follow these directions.

Install compiler

First install the arm compiler:

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
@JamesHagerman
JamesHagerman / DisassembleARMBinaryInR2.md
Last active March 30, 2023 06:43
Some quick notes on disassembling 16bit ARM (STM32F4) code using radare2

Disassembling 1bitsy examples using radare2

Note that because radare2 uses Capstone to disassemble ARM code, there are issues with the disassembly. arm-none-eabi-objdump -d compiledbinary.elf actually does a better job in some cases. For example, msr isn't decompiled correctly...

First, you have to either strip the default ELF binaries the default Makefiles build when you run make OR you need to just compile .bin files using something like:

make binaryname.bin
@JamesHagerman
JamesHagerman / my_ys1_notes.md
Last active December 21, 2022 10:43
Some useful YARD Stick One notes

Some useful YARD Stick One notes

This thing is a bit of a beast. People don't give it NEARLY the credit, or the documentation it deserves.

Two ways of using this thing: rfcat directly, or write a python script for it.

Basically, writing a python script is easier. Using rfcat directly is great but often, there are just too many silly settings to configure

@JamesHagerman
JamesHagerman / start-forwarding.sh
Created June 4, 2017 21:48
Simple script to enable ip forwarding for basic routing
#!/bin/bash
logger "Telling kernel to turn on ipv4 ip_forwarding"
echo 1 > /proc/sys/net/ipv4/ip_forward
logger "Done. Setting up iptables rules to allow FORWARDING"
DOWNSTREAM=wlan0 # wlan0 is client network (running hostapd)
UPSTREAM=eth0 # eth0 is upstream network (internet)
# Allow IP Masquerading (NAT) of packets from clients (downstream) to upstream network (internet)

How to get firmware onto mutable modules

I had the best luck with the Black Magic Probe and gdb.

Install compiler

First install the arm compiler:

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
@JamesHagerman
JamesHagerman / lego-rcx-notes-2020.md
Last active April 10, 2022 13:54
LEGO RCX Notes

Lego RCX Notes

I tested these steps under WSL with Ubuntu.

I no longer have an official LEGO IR Tower, but in 2014 I created one with a simple IR receiver and an IR LED. The Arduino firmware and Eagle files are here: https://github.com/JamesHagerman/HardwareProjects/tree/master/LEGO_RCX_Tower Boards can be ordered from OSHPark here: https://oshpark.com/shared_projects/MtLGHYuW

Big shout out goes to John Holbrook (@johnholbrook on GitHub, @whole_brook on Twitter) for his awesome, up to date article found here: https://www.johnholbrook.us/RCX_guide.html

The following writeup (and my 2014 IR Tower hack) should provide a more complete answer to one of the FAQ's on that page ("Can I send data to the RCX from a [TV remote/IR port on an old laptop/IR LED and an Arduino]?").

@JamesHagerman
JamesHagerman / radio-hw-io-ratings.md
Last active February 7, 2022 18:55
Various max input and output power ratings for devices I own

Radio hardware input and output limits

This is a collection of maximum input and output power ratings for a random selection of devices. It's worth double checking them again to be sure...

DOUBLE CHECK THESE

LimeSDR USB

Note: These have not been verified!

@JamesHagerman
JamesHagerman / honda-fit-sport-2013-obd2-notes.md
Last active March 8, 2021 03:54
Sniffing OBDII on 2013 Honda Fit Sport

Honda OBDlink SX notes 2015-08-19

My OBDLink SX data:

>AT I
ELM327 v1.3a
>ST DI (HARDWARE ID STRING)
OBDLink SX r4.2
>ST I (FIRMARE ID STRING)