-
-
Notifications
You must be signed in to change notification settings - Fork 561
USB Serial Console
The PortaPack Mayhem firmware exposes a serial console via USB when connected to a computer.
Any serial terminal client can be used to connect like PuTTY, minicom, screen, HTerm. There are even web based ones (Chrome&Edge, no Firefox): https://www.serialterminal.com/ or https://hackrf.app/
The terminal exposes the ChibiOS/RT Shell:
-
help
: lists all available commands. -
info
: shows the ChibiOS/RT system details. -
systime
: shows the uptime in ms. -
reboot
: reboots the PortaPack. This will also work on devices where the reset button is not working. -
dfu
: reboots the PortaPack into DFU firmware upgrade mode. -
hackrf
: Starts the original HackHF firmware to use the PortaPack as HackHF. -
sd_over_usb
: Starts the SD Over USB mode. -
flash
: This is the Flash Utility. -
screenshot
: Takes a screenshot. -
cmd_screenframe
: Replies with the screen's content. Format is 1 line / screen line, and for each pixel HEX (2 char) in the R,G,B order. So one line will be 720 + newline. -
cmd_screenframeshort
: Replies with the screen's content. Format is 1 line / screen line, and for each pixel you'll get 1 character. Format is '00RRGGBB' + 32. So for black you'll get 32 (' '). For white 95 ('_'). -
gotgps
: You can send apps your current position. Formatgotgps lat lon <alt> <speed>
. Lat, lon is mandantory with '.' as a decimal separator. -
gotorientation
: You can send apps your current orientation. Formatgotorientation angle
. Send only integer, where 0 mean North, 90 East, 400 mean 'not set'. -
applist
: Shows the apps that can be started withappstart
command. You'll get 3 parameters per line: app short name (you'll need to use this with appstart), app's full name, and app category. -
appstart
: You can start apps from the list given by theapplist
command. 1 paremeter needed, the app's short name. It'll stop any running apps. -
write_memory
: Writes arbitrary memory locations. -
read_memory
: Reads arbitrary memory locations. -
button
: Simulates a button press- button 1: Right
- button 2: Left
- button 3: Down
- button 4: Up
- button 5: Select/Enter
- button 6: DFU
- button 7: Rotary Left
- button 8: Rotary Right
-
ls
: Lists files and directories. -
mkdir
: Creates a directory. -
unlink
: Deletes a file. -
fopen
: Opens a file for reading and modification.
Note
The current position will be set to the end of the file. Use fseek 0
to move to the start of the file.
-
fseek
: Sets the current position inside the currently opened file. -
fclose
: Closes the currently opened file. -
ftruncate
: removes all content in the file behind the current position. -
ftell
: shows the current position is the file. -
fread
: Reads n bytes from the currently opened file.
Tip
there is a faster binary read option: frb
-
fwrite
: Writes bytes from the currently opened file.
Tip
there is a faster binary write option: frw
Note
The wiki is incomplete. Please add content and collaborate.
Important
- This is a public wiki. Everything is visible to everyone. Don't use it for personal notes.
- Avoid linking to external tutorials/articles; they may become outdated or contain false information.
How to collaborate
How to ask questions correctly
- First steps
- Usage cautions
- Intended use and Legality
- Features
- PortaPack Versions (which one to buy)
- HackRF Versions
- Firmware update procedure
- Description of the hardware
- User interface
- Powering the PortaPack
- Troubleshooting
- Applications
-
Compilation of the firmware
- Compile on WSL with ninja
- How to compile on Windows faster with WSL 2
- Using Docker and Kitematic
- Docker command-line reference
- Using Buddyworks and other CI platforms
- Notes for Buddy.Works (and other CI platforms)
- Using ARM on Debian host
- All in one script for ARM on Debian host
- Compile on Arch based distro (exclude Asahi)
- Dev build versions
- Notes About ccache
- Create a custom map
- Code formatting
- PR process
- Description of the Structure
- Software Dev Guides
- Tools
- Research
- UI Screenshots
- Maintaining
- Creating a prod/stable release (Maintainers only)
- Maintaining rules
- Development States Notes