This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
MAGIC_RAND_COLOR='7e' | |
MAGIC_AWOO='a0' | |
MAGIC_BEACON='00' | |
# The docs say MAGIC_EMOTE is b3. The docs are wrong. | |
MAGIC_EMOTE='b2' | |
MFG_FLAGS='ff ff 71' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Preface: | |
This guide shows how to quickly hack in support for the Waveshare V1 display module. Expect this guide to become inaccurate, as official support may be added soon. | |
This guide does not cover the 3-color variants. The same idea should work, but you will need to supply a second image buffer in .display(). | |
Steps: | |
0. If you have already run a V1 module with stock pwnagotchi code, the screen is probably damaged. It can be revived by disconnecting it and leaving it in a dark location for a while - probably overnight. The screen may still show signs of damage, but it will be usable. | |
1. Replace /root/pwnagotchi/scripts/pwnagotchi/ui/waveshare.py with https://github.com/waveshare/e-Paper/blob/master/RaspberryPi%26JetsonNano/python/lib/waveshare_epd/epd2in13.py | |
2. Create /root/pwnagotchi/scripts/pwnagotchi/ui/epdconfig.py containing https://github.com/waveshare/e-Paper/blob/master/RaspberryPi%26JetsonNano/python/lib/waveshare_epd/epdconfig.py | |
3. Update /root/pwnagotchi/scripts/pwnagotchi/ui/display.py to suppo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Preface: | |
I have no idea if any of this is the "right" way of doing it. This is just how I got my unit working. | |
Good luck. | |
WARNING: Do not use a V1 Waveshare display module with a stock pwnagotchi! The pwnagotchi expects a V2 module, and may irreparably damage a V1 module! | |
A V1 display module *can* work, but you must modify `waveshare.py` and `display.py` beforehand. For the time being, this is left as an exercise for the reader. | |
If you have already burnt a V1 display, try disconnecting it from the Pi and leaving it overnight. This may rejuvenate the display somewhat, but it will likely still display signs of damage. | |
Installation: | |
1. `dd` Raspbian Lite to an SD card. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEBUG=1 | |
# Indicator string as seen in dbus messages. Will probably change frequently. | |
DM_INDICATOR='chrome_app_indicator2_5dc5a4d4fc9f0cfd05f90bfbb2390e06' | |
function debugEcho { | |
if [ "$DEBUG" -eq 1 ] ; then | |
echo "$@" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This firmware is really just the original firmware with some extras slapped on. | |
All original commands are included, as well as a few additional ones. This | |
firmware also sends more verbose messages to the STM32 micropython environment | |
when most beacons are received, so badges can now detect each other easily. | |
Commands should be sent to the BLE module via "badge.ble.write('<PAYLOAD>\r\n')" | |
in the micropython environment. Note that this will not work when running | |
interactively - messages just sit in a buffer. There should be a way to make | |
this work but I have yet to discover it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
IFACE='hci0' | |
SN='8678' | |
MAGIC_AWOO='a0' | |
MAGIC_BEACON='00' | |
MAGIC_CURE='ce' | |
MAGIC_EMOTE='b2' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D E F C O N F u r s ^ . ^ | |
hcitool -i hci0 cmd 0x08 0x0008 1E 03 19 dc 26 02 01 06 0b 09 44 45 46 43 4f 4e 46 75 72 73 09 ff ff 71 b2 00 00 5e 2e 5e 00 | |
\_____/ \_____/ \_/ \__/ \____/ \/ \_________/ \______/ \_________________________________/ \___________________________/ \/ | |
| | | | | | | | \/ | \___________________________/ \/ | \___/ \______/ \______/ | | |
Cmd-' | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
Interface-' | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
Send-raw-cmd----' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ -e "workshopPages" ] || mkdir 'workshopPages' | |
for NUM in $(seq 1 92) ; do | |
echo "[INFO]: Requesting list page '${NUM}'" | |
wget -O "workshopPages/list_${NUM}.html" "http://steamcommunity.com/workshop/browse/?appid=211820&browsesort=mostrecent§ion=readytouseitems&actualsort=mostrecent&p=${NUM}" | |
done | |
echo "[INFO]: Generating ID list." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ -d tmp ] || mkdir tmp | |
INITDIR="$(pwd)" | |
WSDIR='../steamcmd/tmp/Starbound/steamapps/workshop/content/211820/' | |
SBDIR="../steamcmd/tmp/Starbound/" | |
MODSDIR="mods/" | |
UPDIR="unpack/" | |
MODBASE="modBase/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
### see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
### for examples | |
### If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |