Logo

Brian Fløe

  • Archive
  • RSS

PN532 + libnfc + mfoc with OSX

$ wget http://libnfc.googlecode.com/files/libnfc-1.7.0-rc7.tar.gz
$ tar xzvf libnfc-1.7.0-rc7.tar.gz
$ cd libnfc-1.7.0-rc7
$ ./configure --with-drivers=pn532_uart
$ vi utils/nfc-mfclassic.c

Comment out the following two lines

if (uiBlock == 0 && ! write_block_zero && ! magic2)
  continue;

Result

//if (uiBlock == 0 && ! write_block_zero && ! magic2)
//  continue;

$ vi libnfc/drivers/pn532_uart.c

Append 7 more 0x00 to allow wakeup to work correctly

const uint8_t pn532_wakeup_preamble[] = { 0x55, 0x55, 0x00, 0x00, 0x00 };

Result

const uint8_t pn532_wakeup_preamble[] = { 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

$ make
$ sudo make install
$ sudo cp /usr/local/etc/nfc/devices.d/libnfc.conf.sample /usr/local/etc/nfc/devices.d/pn532_uart.conf

Connect the PN532 board using a serial to USB cable

$ ls -la /dev/tty.usbserial*
crw-rw-rw-  1 root  wheel   18,  12 May 13 20:16 /dev/tty.usbserial-FTDK0QLG

Notice the name of the usbserial TTY

$ sudo vi /usr/local/etc/nfc/devices.d/pn532_uart.conf

Change the conn string to the correct usbserial TTY name

name = "PN532 board via UART"
connstring = pn532_uart:/dev/tty.usbserial-FTDK0QLG

$ wget http://mfoc.googlecode.com/files/mfoc-0.10.5.tar.gz

$ tar xzvf mfoc-0.10.5.tar.gz

$ cd mfoc-0.10.5

$ ./configure LDFLAGS=-L/usr/local/lib PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ vi src/nfc-utils.c

Fix the following line by adding & before nt

str_nfc_target(&s, nt, verbose);

Result

str_nfc_target(&s, &nt, verbose);

$ make
$ sudo make install

You are now ready to use libnfc and the build in tools

$ nfc-list
$ nfc-poll

    • #pn532 libnfc mfoc osx
  • 1 month ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Node.js 0.8.9 on Rasberry Pi (Raspbian/Occidentalis)

How to install the latest (stable) version of node.js on a Raspberry Pi running Raspbian Wheezy or Occidentalis distros.

This is tested and both node and npm works without crashing with the “illegal instruction” error mesage.

Make sure to update your system and install the required build and developer tools.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git-core build-essential

Checkout Node.js source code.

$ cd ~
$ git clone https://github.com/joyent/node.git
$ cd node
$ git checkout v0.8.9 -b v0.8.9

Download and apply patches.

$ cd ~
$ curl -O https://github.com/joyent/node/commit/25c2940a08453ec206268f5e86cc520b06194d88.patch
$ curl -O https://github.com/joyent/node/commit/1d52968d1dbd04053356d62dc0804bcc68deed8a.patch
$ cd node
$ git apply --stat --apply ../25c2940a08453ec206268f5e86cc520b06194d88.patch
$ git apply --stat --apply ../1d52968d1dbd04053356d62dc0804bcc68deed8a.patch

Configure, make and install (NOTE: build time is very long 2-3 hours).

$ ./configure
$ make
$ sudo make install

You are now ready to start using node and npm!

    • #raspberry pi
    • #Occidentalis
    • #raspbian
    • #node.js
  • 8 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Ny Makerbot Replicator firmware v5.5 og ReplicatorG v37

    • #makerbot
    • #replicator
    • #firmware
  • 10 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Pop-up View Separately
Pop-up View Separately
Pop-up View Separately
PreviousNext

Wireless weather station with Adafruit solar charger

I have a cheap $70 wireless weather station mounted on the roof and was tired of climbing up to change batteries.

So I decided to convert it to run on solar energy using a 6V / 250mA solar panel to charge a 4400mAh LiPoly battery.

It was relatively easy to replace the standard 2xAA batteries with a 3.7V LiPoly battery and solar charger from Adafruit.

Next step is to build an Arduino based receiver for the 434MHz radio signal and parse the weather data.

To be continued…

    • #weather station
    • #solar charger
    • #adafruit
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Kerteminde Marina set fra luften. Se alle billeder på Flickr
Pop-upView Separately

Kerteminde Marina set fra luften. Se alle billeder på Flickr

    • #kerteminde
    • #luftfoto
    • #hexakopter
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Simon’s Cat in ‘Shelf Life’

    • #simon's cat
    • #video
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Video af min nye Nixie Therm som jeg har købt hos Mr. Nixie.

Det er et termometer som viser temperaturen med et gammelt russisk bargraph nixie-tube.

    • #nixie therm
    • #termometer
    • #nixie tube
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Pinheads: The Story of the Pacific Pinball Museum

    • #pinball
    • #video
    • #dokumentar
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Jimmy Kimmel Live - Movie: The Movie

    • #trailer
    • #spoof
    • #jimmy kimmel
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Everything Is a Remix

    • #copyright
    • #patent
    • #video
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Page 1 of 3
← Newer • Older →

About

Senior Developer & Co-Founder at Woerk™
Odense, Denmark

Me, Elsewhere

  • @onkelcommy on Twitter
  • Google
  • Linkedin Profile

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Mobile

© 2012 Brian Fløe All Rights Reserved.

Effector Theme by Pixel Union