Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time



The 'firmware' directory contains code for the dev platform(s). Currently that is Pic32, but we will add a new section if and when required.


A fully built RFIDler board can be purchased here:


The main microcontroller is a Microchip PIC32MX795F512L

Software Build environment

The project was developed in Mplab-X IDE V3.20 under Linux, but can also be built under Windows & Mac:

The compiler used was the free version of Microchip's XC32 V1.40:

USB stack and peripheral support is provided by [Microchip Application Library v2013-06-15] (

  • Linux
    • Install to /opt/microchip/microchip_solutions_v2013-06-15/
    • Note: if the installer fails to start, try adding the run-time option '--mode text'
  • Windows
    • Install to installer default location
  • Mac
    • Install to installer default location

and [PIC32 Peripheral Library] (

  • Linux
    • Install to /opt/microchip/xc32/v1.40
  • Windows
    • Install to installer default location
  • Mac
    • Install to installer default location


When the Bootloader is running the RFIDler appears on the USB as a HID, and waits for new RFIDler firmware to install in Flash memory. There are several ways of entering the Bootloader, see "Loading new Firmware" section below.

USB HID Bootloader is provided by the UBW32 project

For convenience, a copy of the bootloader hex and an MPLAB hex load project is provided in firmware/Pic32/HIDBoot_MX795_Hex_Load.X

The Bootloader client, mphidflash, runs on Linux/Mac/Windows and transmits & verifies the new firmware.


mphidflash v1.3 has some known bugs where for some ROM binaries programming fails and a verification error is reported.

If you hit this problem check for a newer release of mphidflash. Pre-compiled executables for all platforms are available here

Software Build

Install packages as above.

Clone this repo to your local hard disk.

  1. Start MPLAB X IDE
  2. Choose File/Open Project/
  3. Browse to RFIDler.X and click 'Open Project'


If you are running Windows, you will need to change the default Linux library to the local Windows version:


(There are bugs in MPLAB X and GNU make such that paths to libraries containing spaces are not always processed correctly, and the default install path on Windows contains spaces so making the copy is the simplest solution.)

Mac OS X

If you are running Mac OS X, you will need to change the default Linux library to the local Mac version:



The device can be powered via the USB port, and, if connected to a PC, will provide a management CLI/API via USB-Serial CDC at 115200 baud (8 bit, No Parity, 1 Stop Bit, No Handshaking/Flow Control).

The CLI/API is also accessible via 3.3v or 5v UART on pins RG7 (UART3 RX) and RG8 (UART3 TX), also at 115200 baud.

When you connect with USB for the first time, you may need to perform some configuration steps:


Create a rule file for UDEV to allow non-root access to the file, and also disable modem manager access. An appropriate file can be found in the MPLAB project under the "Linux Support" tab. Copy this file to /etc/udev/rules.d and run sudo udevadm control --reload-rules

This file can also be found in this repo at: linux-support/71-rfidler-lf-cdc-blacklist.rules


Windows drivers can be found in the 'Windows Driver' tab of the MPLAB project

To connect, any serial terminal emulator should work, but we recommend:

  • Linux: minicom (sudo apt-get install minicom)
  • Windows: PuTTY
  • Mac OS X: SerialTools (free from the App Store)

Example linux connection:

minicom -D /dev/ttyACM1 -b 115200 

Once connected, hit <ENTER> to see the HELP screen and switch to CLI mode, or send commands to remain in API mode.

In API mode, all commands are as per CLI mode, and will be ACK'd by a single '.' or NACK'd by '!' if command fails or '?' if it is not recognised. Other output is command dependant.

Loading new Firmware

Enter bootloader mode

  • either from the menu (BL)
  • or by holding down button BOOTLOADER while simultaneously
    • plugging in the USB cable
    • or pressing the 'RESET' button.

LED6 and LED5 will show stable orange light to confirm bootloader mode has been entered.

#~/tools/mphidflash-1.6/binaries/mphidflash-1.6-linux-64 -r -w firmware/Pic32/RFIDler.X/dist/debug/production/RFIDler.X.production.hex 
USB HID device found: 503808 bytes free
Device family: PIC32

Writing hex file 'RFIDler.X.production.hex':......[...removed for brevity...]
Verifying:.... [...removed for brevity...]
Resetting device...

You can verify the flashing via version

*RFIDler> version


dmesg should show the following:

generic-usb 0003:04D8:003C.0003: hiddev0,hidraw1: USB HID v1.11 Device [Microchip Technology Inc. USB HID Bootloader] on usb-0000:00:1d.0-

To flash the code, cd to the top of the repo and run:

	mphidflash -r -w firmware/Pic32/RFIDler.X/dist/default/production/RFIDler.X.production.hex

The device will be programmed and will then reboot. dmesg should show:

usb 2- USB disconnect, device number 19
usb 2- new full speed USB device number 20 using ehci_hcd
cdc_acm 2- This device cannot do calls on its own. It is not a modem.
cdc_acm 2- ttyACM3: USB ACM device



Mac OS X

Install mphidflash from source

Option 1, v1.6:

curl > mphidflash1-6.tar.gz
mkdir mphidflash1-6
tar -zxvf mphidflash1-6.tar.gz -C mphidflash1-6
cd mphidflash1-6
mkdir binaries
sudo make install64

Option 2, latest:

git clone
cd mphidflash
sudo make install64

Flash device

cd #RFIDler repo
mphidflash -r -w firmware/Pic32/RFIDler.X/dist/debug/production/RFIDler.X.production.hex


RFIDler - Software defined RFID (LF) Reader/Writer/Emulator







No releases published


No packages published