Skip to content

Instantly share code, notes, and snippets.

Baofeng UV-5R Channel save steps

Buttons Overview

  • VFO/MR - Toggle Mode: Frequency mode vs Channel mode
  • A/B - Toggle Side/Display: A(top) or B(bottom)
  • BAND - Toggle Band: 144-148MHz/VHF/2m or 420-450MHz/UHF/70cm
  • MENU - Handle Menu options. Duh, mostly.

Main screen buttons

@JamesHagerman
JamesHagerman / error
Created June 18, 2017 03:34
error when trying to set a breakpoint
[0x08000224]> db 0x00000214
Cannot place a breakpoint on 0x00000214 unmapped memory. See e? dbg.bpinmaps
[0x08000224]> e dbg.bpinmaps=false
[0x08000224]> db 0x00000214
[0x08000224]> dc
Selecting and continuing: 0
= attach 0 0
got signal...
= attach 0 1
= attach 6 1
@JamesHagerman
JamesHagerman / BMP-radare2-todos.md
Created June 17, 2017 10:42
A list of TODOs on what we need to get working in radare2 to support the BMP.

Adding BMP support to radare2

Being able to do dynamic analysis on embedded targets over SWDP and JTAG is a pretty big win. The Black Magic Probe (BMP) is an amazing hardware platform to allow this type of work.

Radare2 (r2) has a fairly large amount of support for a wide variety of tasks including dynamic analysis.

Getting the two to work together would be an amazing gift to the community.

TODOs:

@JamesHagerman
JamesHagerman / CapstoneIssue.md
Last active June 12, 2017 23:42
Found an issue with CS_ARCH_ARM, CS_MODE_THUMB not handling an op code correctly

Issue (resolved! See comments!)

As a test, I compiled the 1bitsy miniblink example (from https://github.com/1Bitsy/1bitsy-examples) using:

make miniblink.bin

Decompile of address 0x1ac using arm-none-eabi-objdump -d miniblink.bin gets me

@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 / 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 / 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)
@JamesHagerman
JamesHagerman / LayerOne2017BadgeNotes.md
Last active June 11, 2017 02:00
LayerOne 2017 Badge Linux walkthrough

LayerOne 2017 Badge Notes

The badge for LayerOne 2017 runs on an STM32 ARM embedded microprocessor. Most of the notes about this board can be dug out of CharlieX's page on Hackaday.io: https://hackaday.io/project/13262-layerone-2017

Known bugs

Yes, there are a few. Word on the street is that when the original code is compiled under Linux, the USB doesn't enumerate! There is a fix for this... but then the SD card doesn't work correctly

PLEASE let me know if you figure out what could be causing this!

@JamesHagerman
JamesHagerman / conversion notes.md
Last active May 17, 2017 23:04
Convert Github style Markdown to PDF in one line (using docker and pandoc)