Kushal Das

FOSS and life. Kushal Das talks here.

kushal76uaid62oup5774umh654scnu5dwzh4u2534qxhcbi4wbab3ad.onion

librfid 0.1.0 build on Fedora

After last Saturday, when Harald announced librfid 0.1.0 release, today the rpm is ready in the Fedora build system. librfid is a Free Software RFID library. It implements the PCD (reader) side protocol stack of ISO 14443 A, ISO 14443 B, ISO 15693, Mifare Ultralight and Mifare Classic. Support for iCODE and other 13.56MHz based transponders is planned. OpenPCD is the recommended reader with librfid. librfid team is happy to offer paid development services to add support for your reader, too.

OpenPCD application

Wrote my second OpenPCD application, now my KDE desktop can be locked-unlocked using my OpenPCD board. Update: Tarique asked for adding some more lines with this. For this code again taking help from Harald's librfid-tool.c in the utils directory of the librfid source. The main idea is to show how OpenPCD can be used. First I was looking for a way to keep unlock my laptop as my OpenPCD card is near to the OpenPCD reader & as I(the card) move away from the reader it should get unlocked automatically,, which it turn produced my first application. Last night found a simple way to do that with dcop.

dcop kdesktop KScreensaverIface lock
dcop kdesktop KScreensaverIface quit

The first line will lock your KDE desktop & the second one will unlock it. Still don't understand makefiles well, tried to avoid any more dependencies in the code thus calling these two commands as need using system().

csv module

There is a csv module in python :) You can use it like:

import csv
reader = csv.reader(open('details.csv', 'r'))
for row in reader:
        print row

My first C code

Well, I can say that this is my first C code :) Milosch gave me the idea to write a small application which can detect openpcd cards and unlock the computer. So, I started with easier target & now my openpcd board can login in any (username,password) based system(tested with different browsers still now). The code is in very early stage, and I put every thing manually(not dynamic at all).

OpenPCD Hack day 2:

Day two finished. A more eventful one. Milosch bought a basic electronics book for me so that I can understand the basics :) Then we went to SP Road to buy the equipments. Again Milosch bought all of them for me. Here is the set.

Then my first work. A single LED :P

At the end Milosch made a piezo speaker system for the openpcd board, and we made few changes to build a new firmware (main_piezo) which can make a 10sec noise at the speaker system. Can you find the speaker in the above picture ? :P

openpcd hack..

So, the best thing this time in foss.in is the starting of my embedded work. Openpcd is a nice work from Milosch, Brita & Harald. Yesterday from 4pm me & Milosch was trying to make my laptop configured properly so that I can start wokring on the openpcd board that Milosch presented me :) And it took 8 hours (with 2 hours for dinner) to fix it. Now it is a only 3 minute job. So, here is the procedure:

First make sure that you do a modprobe usbserial. Now first I am going to fix my laptop as the host:

tar -xjvf librfid-1929.tar.bz2 mv librfid librfid.host cd librfid.host/ mcedit src/Makefile.am //////delete -lopenct from there ./autogen.sh ./configure --without-openct --prefix=/usr/local/openpcd make su -c "make install"

Now I have to fix my librfid for the firmware:

tar -xjvf librfid-host.tar.bz2 make cd .. tar -xjvf openpcd-firmware-274.tar.bz2 find firmware -exec touch {} ; ls cd host/ make ls -l cd .. tar -xjvf librfid-1929.tar.bz2 mv librfid librfid.firm cd librfid.firm/ export CFLAGS="-I/usr/include -DLIBRFID_FIRMWARE" export CC=arm-elf-gcc export PATH=/usr/local/gnuarm-4.0.2/bin:$PATH ./autogen.sh ./configure --without-openct --host=arm-elf --with-firmware=/home/kd/build/openpcd/firmware make cd ../firmware/ mcedit Makefile (((((((((((((((Please point LIBRFID to the correct directory)))))))))) make DEBUG=1 BOARD=PCD TARGET=main_reqa ls -l su -c "/usr/local/openpcd/bin/dfu-programmer openpcd dfu_dnload main_reqa.bin" su -c "/usr/local/openpcd/bin/dfu-programmer openpcd dfu_dnload main_reqa.bin"

And it is done.. My first experience with good C :P

Sorry, I can't do any thing now..

My home desktop is down :( Power is coming & it stops there only, so no work.. Asked shreyas to send me my primary slides for foss.in or else I can't submit the final slides. I will talk about Fedora Extras.

Update: Back again :) The 512MB clip is gone.. Now only on 1GB clip