Bluetooth Hacking?
Linux Installation Process of Microchip development environment

From OpenBeacon

(Redirected from OpenBeacon Tag Firmware)
Jump to: navigation, search
Spurnik tag as used on the 25C3 CCC congress


Getting the OpenBeacon Tag firmware

OpenBeacon Tag related firmware source may be found on our server for occasional browsing (pic16tag Firmware) and for development purposes in our git repository:

 git clone

Compiler Installation

PIC16F684 Microcontroller from Microchip on the OpenBeacon Tag

Download the HI-TECH C for the PIC10/12/16 MCU Family compiler at Registration at Microchip seems to be mandatory for that.

Unpack the download archive:

mkdir -p ~/Install
cd ~/Install
unzip ~/Downloads/

You now should have the installation file in that directory which you can execute using sh.

ls -l              # verify if file is there
-rwxr-xr-x. 1 meri meri 8691338 13. Aug 01:25
su                 # switch to root user for further installation
sh ./picc-pro_*.run  # run setup as root

Please setup as follows:

==> Do you accept the terms of the licence agreement? [y/n] y
==> Please enter the installation directory [/usr/hitech/picc/9.80]: 
==> Please enter Serial Number, demo or lite: HCPICP-demo

Leave root mode:


Add path to your startup scripts

gedit ~/.bashrc

Add the following line at the end - make sure to adjust to your actual compiler version:

export PATH=$PATH:/usr/hitech/picc/9.80/bin

To make the changes effective you need to close your current terminal and open a new one.


Programmer installation

PICkit2 USB programmer with six pin 2.54mm header attached
Cut your own six pin 2.54 header and insert into PICkit2 programmer to re-flash tags

At PICkit 2 Development Programmer/Debugger please scroll down to Linux & Mac OS X Software (Unsupported) and download PK2CMD V1.20 Linux Kernel 2.6 Executable Binary.

Example installation process:

mkdir -p ~/Install
cd ~/Install
tar -xvzf pk2cmdv1-20Linux2-6.tar.gz
cd pk2cmdv1-20Linux2-6
su                 # switch to root user for further installation
install *.dat pk2cmd /usr/local/binexit               # switch back to normal user

If you get a No PICkit 2 found. error message, you need to allow access to the programmer to non-root users. Please create a file called pickit.rules at /etc/udev/rules.d/ as root user.

Verify first if the programmer is connected:

lsusb -d 04d8:Bus 002 Device 039: ID 04d8:0033 Microchip Technology, Inc.

Now create /etc/udev/rules.d/pickit.rules :

echo 'SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="0033", MODE="0666"' >> /etc/udev/rules.d/pickit.rules

Please unplug and re-plug your programmer before running pk2cmd again.