{"id":572,"date":"2014-06-20T14:43:58","date_gmt":"2014-06-20T18:43:58","guid":{"rendered":"http:\/\/www.willhackforsushi.com\/?p=572"},"modified":"2014-06-20T14:45:05","modified_gmt":"2014-06-20T18:45:05","slug":"updating-rfidler-firmware-on-ubuntu-12-04-4","status":"publish","type":"post","link":"https:\/\/www.willhackforsushi.com\/?p=572","title":{"rendered":"Updating RFIDler Firmware on Ubuntu 12.04.4"},"content":{"rendered":"<p>As a beat-my-tester for the <a title=\"RFIDler Kickstarter\" href=\"https:\/\/www.kickstarter.com\/projects\/1708444109\/rfidler-a-software-defined-rfid-reader-writer-emul\" target=\"_blank\">RFIDler Kickstarter<\/a> project, I got one of the first batch of these sweet LF RFID reader\/writer\/emulator units, straight from <a title=\"Zac's Blog\" href=\"http:\/\/zacsblog.aperturelabs.com\/\" target=\"_blank\">Zac Franken<\/a> and <a title=\"Adam's Blog\" href=\"http:\/\/adamsblog.aperturelabs.com\/\" target=\"_blank\">Adam Laurie<\/a>.<\/p>\n<div id=\"attachment_573\" style=\"width: 3067px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.willhackforsushi.com\/wp-content\/uploads\/2014-06-20-14.01.05.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-573\" class=\"size-full wp-image-573\" src=\"http:\/\/www.willhackforsushi.com\/wp-content\/uploads\/2014-06-20-14.01.05.jpg\" alt=\"The RFIDler, Beta Version, and Antenna (background)\" width=\"3057\" height=\"1873\" \/><\/a><p id=\"caption-attachment-573\" class=\"wp-caption-text\">The RFIDler, Beta Version, and Antenna (background)<\/p><\/div>\n<p>Although I have a Proxmark3 (actually, it&#8217;s not mine, it belongs to <a title=\"Larry's Twitter Feed\" href=\"https:\/\/twitter.com\/haxorthematrix\" target=\"_blank\">Larry Pesce<\/a>, but he&#8217;s never getting it back), I am excited about the RFIDler as a low-cost alternative with active and exciting development.<\/p>\n<p>When the RFIDler arrived it was running alpha3 firmware, which needed to be upgraded to the latest firmware in the <a title=\"RFIDler GitHub\" href=\"https:\/\/github.com\/ApertureLabsLtd\/RFIDler\" target=\"_blank\">RFIDler GitHub repository<\/a>.\u00a0 Flashing requires the mphidflash utility, which is available in source or binary form on <a title=\"Google Code Respository for mphidflash\" href=\"https:\/\/code.google.com\/p\/mphidflash\/\" target=\"_blank\">Google Code<\/a>.<\/p>\n<p>The mphidflash tool required libhid-dev on Ubuntu, but that package has been retired for a while as abandoned by the author.\u00a0 To get mphidflash working on Ubuntu, I grabbed the packages from Ubuntu 10.04 and installed them as shown:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ wget http:\/\/mirrors.kernel.org\/ubuntu\/pool\/universe\/libh\/libhid\/libhid-dev_0.2.15+20060325-2.2ubuntu1_i386.deb\r\n$ wget http:\/\/mirrors.kernel.org\/ubuntu\/pool\/universe\/libh\/libhid\/libhid0_0.2.15+20060325-2.2ubuntu1_i386.deb\r\n$ sudo dpkg -i libhid0_0.2.15+20060325-2.2ubuntu1_i386.deb\r\n$ sudo dpkg -i libhid-dev_0.2.15+20060325-2.2ubuntu1_i386.deb\r\n$ wget http:\/\/mphidflash.googlecode.com\/files\/mphidflash-1.3-bin-linux.tar.gz\r\n$ tar xfz mphidflash-1.3-bin-linux.tar.gz\r\n$ sudo cp mphidflash \/usr\/sbin\r\n<\/pre>\n<p>After that, flashing the RFIDler becomes straightforward. First, download the GitHub repository files and change to the RFIDler\/python directory, then run the setup.py script:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ git clone https:\/\/github.com\/ApertureLabsLtd\/RFIDler.git\r\nCloning into 'RFIDler'...\r\nWARNING: gnome-keyring:: couldn't connect to: \/tmp\/keyring-WsskxT\/pkcs11: No such file or directory\r\nremote: Reusing existing pack: 518, done.\r\nremote: Counting objects: 16, done.\r\nremote: Compressing objects: 100% (13\/13), done.\r\nremote: Total 534 (delta 1), reused 0 (delta 0)\r\nReceiving objects: 100% (534\/534), 8.90 MiB | 1001 KiB\/s, done.\r\nResolving deltas: 100% (279\/279), done.\r\n$ cd RFIDler\/python\r\n$ sudo python setup.py install\r\n<\/pre>\n<p>Now you should be able to run the rfidler.py script to interact with the RFIDler hardware. Plug in the hardware and check the version on your hardware (you may need to run rfidler.py as root on your system):<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ rfidler.py \/dev\/ttyACM0 'VERSION'\r\nsending 'VERSION'\r\n0003-alpha\r\n<\/pre>\n<p>To update the firmware, hold the bootloader button and press &#8220;reset&#8221;. The LED07 and LED08 LED&#8217;s will start alternating amber and green.<\/p>\n<div id=\"attachment_574\" style=\"width: 851px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.willhackforsushi.com\/wp-content\/uploads\/rfidler-flash-prep.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-574\" class=\"size-full wp-image-574\" src=\"http:\/\/www.willhackforsushi.com\/wp-content\/uploads\/rfidler-flash-prep.png\" alt=\"RFIDler Prepped for Bootloader\" width=\"841\" height=\"569\" \/><\/a><p id=\"caption-attachment-574\" class=\"wp-caption-text\">RFIDler Prepped for Bootloader<\/p><\/div>\n<p>You will also see a kernel message indicating that the device has entered into bootloader mode.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ dmesg | grep Bootloader\r\n&#x5B;783265.119771] generic-usb 0003:04D8:003C.0006: hiddev0,hidraw2: USB HID v1.11 Device &#x5B;Microchip Technology Inc. USB HID Bootloader] on usb-0000:02:00.0-2.1\/input0\r\n<\/pre>\n<p>Now, change to the head of the RFIDler directory and flash the device (lots of the status dots have been removed below):<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo mphidflash -r -w firmware\/Pic32\/RFIDler.X\/dist\/debug\/production\/RFIDler.X.production.hex\r\n&#x5B;sudo] password for jwright: \r\nUSB HID device found: 503808 bytes free\r\nErasing...\r\nWriting hex file 'firmware\/Pic32\/RFIDler.X\/dist\/debug\/production\/RFIDler.X.production.hex':..................................................................................................................................\r\nVerifying:..................................................................................................................................\r\nResetting device...\r\n$ rfidler.py \/dev\/ttyACM0 version\r\nsending 'VERSION'\r\n0019-beta\r\n<\/pre>\n<p>Voila!<\/p>\n<p>-Josh<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a beat-my-tester for the RFIDler Kickstarter project, I got one of the first batch of these sweet LF RFID reader\/writer\/emulator units, straight from Zac Franken and Adam Laurie. Although I have a Proxmark3 (actually, it&#8217;s not mine, it belongs &hellip; <a href=\"https:\/\/www.willhackforsushi.com\/?p=572\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,17,35],"tags":[],"class_list":["post-572","post","type-post","status-publish","format-standard","hentry","category-hardware","category-linux","category-rfid"],"_links":{"self":[{"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=\/wp\/v2\/posts\/572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=572"}],"version-history":[{"count":5,"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=\/wp\/v2\/posts\/572\/revisions"}],"predecessor-version":[{"id":579,"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=\/wp\/v2\/posts\/572\/revisions\/579"}],"wp:attachment":[{"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.willhackforsushi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}