A tiny screen on your kaliPi that shows the name, current IP and MAC address of your device.
The project intends to help in acquiring a device's IP on a network more quickly. Especially in large company networks with restricted NATs it can sometimes be a lengthy process to determine the IP from the "outside".
The code is python-based. Assembly is pretty much lego-like.
- KaliPi (consisting of a Raspberry Pi 4, a MicroSD Card and a Case)
- Adafruit PiOLED 128x32 Display
Close-up of the assembled device (see the PiOLED at the top left) |
---|
These instructions assume your KaliPi is assembled and "ready to go".
- Update/Upgrade your KaliPi:
sudo apt-get update && sudo apt-get upgrade -y
- Install software:
sudo apt-get install python3-pip
sudo pip3 install adafruit-circuitpython-ssd1306
sudo apt-get install python3-pil
sudo pip install getmac
sudo apt-get install i2c-tools
- Edit/add the following lines in the config file (
sudo nano /boot/config.txt
) and save it in order to enable I2C and change the I2C core frequency to 100 kHz:
dtparam=i2c_arm=on
dtparam=i2c_baudrate=100000
- Add the following line to /etc/modules (
sudo nano /etc/modules
) and save the file:
i2c-dev
- Reboot the device and test I2C functionality by entering
sudo i2cdetect -y 1
. If said command returns the following output, I2C is working as intended.
- Copy
minidisplay.py
and thevisitor.ttf
font to your device, preferably into a new folder. - Make the script execute on bootup. One way of achieving this is adding these lines to /etc/rc.local (
sudo nano /etc/rc.local
):
sudo python3 /var/minidisplay/minidisplay.py &
exit 0
- After that, add the permission to execute rc.local by entering
sudo chmod +x /etc/rc.local
. - Reboot. You're done.