RFID and Processing help

37 views
Skip to first unread message

David Russell

unread,
May 5, 2011, 7:00:57 PM5/5/11
to London Hackspace
Hi all,

Not sure if this is the right platform to be doing this, but I'm
looking for some help getting a project off the ground...I'm currently
borrowing one of the Hackspace tikitag RFID readers and I'm trying to
use Processing to read Oyster Cards and generate a unique visual
output based on their ID numbers. I've installed the libraries and
other bits here: http://code.google.com/p/touchatag-processing/ but
get an error when I run the example script in Processing, and being a
complete nub with the software I have no idea how to correct it.

I was wondering if there was anyone around with Processing experience
who would be willing to help me bring this idea to fruition!

Cheers, Dave.

Mark Steward

unread,
May 5, 2011, 8:17:12 PM5/5/11
to london-h...@googlegroups.com
Definitely!  There are a few members of the space familiar with Processing, Tikitags or both.  When are you around?  It might help if you start a project page on the wiki[1] detailing what you're running it on and how far you've got.  I find that doubles up usefully as a work log/notebook.

Do the utilities like pcsc_scan or nfc_list work?


Mark



David Russell

unread,
May 6, 2011, 6:48:14 AM5/6/11
to London Hackspace
I'm studying for my final year of my Graphic Design degree, and this
is my final project so all of my attention (and time) will be fully
dedicated to this project in the coming weeks – basically I'm around
all the time.

I've installed libnfc and followed the instructions on the link I
posted exactly but I get an unsatisfied link error...I'm somewhat
annoyingly on a Mac (10.5, which might be part of the problem as
well), but I'm thinking it might be necessary to borrow/buy a netbook
or something anyway so that I can have the thing working live in our
exhibition.

It would be great to be able to speak to someone about whether what I
want to do is actually possible – the project has changed slightly
since the last time I spoke to someone who knew what they were talking
about, and I'm not sure if Processing is still the right software to
be using.

tom

unread,
May 7, 2011, 7:40:04 AM5/7/11
to London Hackspace
paste the full error here and I'll have a looksy.

I'm trying to break my processing habit but i'll relapse just this
once :)

David Russell

unread,
May 8, 2011, 8:29:22 AM5/8/11
to London Hackspace
The error reads:

Exception in thread "Animation Thread"
java.lang.UnsatisfiedLinkError: /Users/Dave/Documents/Processing/
Libraries/touchatag/library/libnfc.dylib: no suitable image found.
Did find: /Users/Dave/Documents/Processing/Libraries/touchatag/
library/libnfc.dylib: unknown required load command 0x80000022
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1824)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1748)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at touchatag.Touchatag.<clinit>(Unknown Source)
at touchatagExample.setup(touchatagExample.java:39)
at processing.core.PApplet.handleDraw(PApplet.java:1583)
at processing.core.PApplet.run(PApplet.java:1503)
at java.lang.Thread.run(Thread.java:655)

And the example I'm using is:

import touchatag.*;

Touchatag rfid;
PFont font;

// Defines the maximum number of touchatag
// readers that might be connected to the computer
int numOfReaders = 3;

// This library affords up to three touchatag
// tags on each of the touchatag readers
String[][] tags = new String[numOfReaders][3];

void setup() {

// Optinally, if only one touchatag reader will
// be used: rfid = new Touchatag(this);
rfid = new Touchatag(this, numOfReaders);

font = loadFont("Verdana-10.vlw");
textFont(font);

size(800, 400);

rectMode(CENTER);
stroke(0);
fill(125);
}

void draw() {
background(255);

// Gets the number of touchatag readers connected
int numReaders = rfid.On();

if (numReaders != 0) {
drawReaders(numReaders);

// Gets the tags for each of the touchatag readers
for (int i = 0; i < numReaders; i++) {
tags[i] = rfid.tagsOnReader(i);
drawTags(tags[i], i);
}
}
}

// Draws a small square for each of
// the touchatag readers connected
void drawReaders(int num) {
for (int i = 1; i <= num; i++) {
rect(i * 200, 100, 50, 50);
}
}

// Writes the list of tag IDs
// present on a touchatag reader
void drawTags(String[] tagList, int pos) {
for (int i = 0; i < tagList.length; i++) {
text(tagList[i], (pos + 1) * 175, (i * 10) + 150);
}
}


Line 18 ( rfid = new Touchatag(this, numOfReaders); ) gets
highlighted so presumably that's the problematic bit. To be quite
honest, I'm not even entirely sure what this example is supposed to
do...Would it be possible to come and talk to one of you guys (or
anyone else for that matter) about what I'm trying to do?

Cheers, Dave

Mark Steward

unread,
May 8, 2011, 10:07:26 AM5/8/11
to london-h...@googlegroups.com
Looks like you'll need to recompile the Processing touchatag library:



Mark

David Russell

unread,
May 9, 2011, 7:29:05 PM5/9/11
to London Hackspace
Ok, that's way more than I can understand. I've upgraded to 10.6
(after going back and reading that it was tested on 10.6) and it
occurred to me that I wasn't able to do the part in the tutorial from
http://code.google.com/p/touchatag-processing/ where you use the
install app to install libnfc.0.dylib and libusb because apparently I
don't have the right permissions (I'm on the admin account and the
file info says I do...)

Mark are you around tomorrow evening by any chance to talk about it?

tom

unread,
May 10, 2011, 5:01:41 AM5/10/11
to London Hackspace
You might have to just make sure youre using the 32bit version of java
for processing. I had this problem when trying to use processing libs
in Eclipse, it kept starting with a 64bit VM and chucking out
UnsatisfiedLinkErrors

On May 10, 12:29 am, David Russell <thedruss...@gmail.com> wrote:
> Ok, that's way more than I can understand. I've upgraded to 10.6
> (after going back and reading that it was tested on 10.6) and it
> occurred to me that I wasn't able to do the part in the tutorial fromhttp://code.google.com/p/touchatag-processing/where you use the

David Russell

unread,
May 10, 2011, 5:39:58 AM5/10/11
to London Hackspace
How do I change that? I was getting that error in 10.5 and 10.6...

On May 10, 10:01 am, tom <bollocks...@gmail.com> wrote:
> You might have to just make sure youre using the 32bit version of java
> for processing. I had this problem when trying to use processing libs
> in Eclipse, it kept starting with a 64bit VM and chucking out
> UnsatisfiedLinkErrors
>
> On May 10, 12:29 am, David Russell <thedruss...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Ok, that's way more than I can understand. I've upgraded to 10.6
> > (after going back and reading that it was tested on 10.6) and it
> > occurred to me that I wasn't able to do the part in the tutorial fromhttp://code.google.com/p/touchatag-processing/whereyou use the

Mark Steward

unread,
May 10, 2011, 6:05:35 AM5/10/11
to london-h...@googlegroups.com
Look at the command line under ps -f?

However, it strikes me that if the install notes say you *need* to replace those libraries to get it to work, you should try that first.

tom

unread,
May 10, 2011, 6:35:47 AM5/10/11
to London Hackspace
Theres a command line switch you throw to the JVM to force it into
32bit mode, -d32 I think.

On May 10, 11:05 am, Mark Steward <markstew...@gmail.com> wrote:
> Look at the command line under ps -f?
>
> However, it strikes me that if the install notes say you *need* to replace
> those libraries to get it to work, you should try that first.
>
> On Tue, May 10, 2011 at 10:39 AM, David Russell <thedruss...@gmail.com>wrote:
>
>
>
>
>
>
>
> > How do I change that? I was getting that error in 10.5 and 10.6...
>
> > On May 10, 10:01 am, tom <bollocks...@gmail.com> wrote:
> > > You might have to just make sure youre using the 32bit version of java
> > > for processing. I had this problem when trying to use processing libs
> > > in Eclipse, it kept starting with a 64bit VM and chucking out
> > > UnsatisfiedLinkErrors
>
> > > On May 10, 12:29 am, David Russell <thedruss...@gmail.com> wrote:
>
> > > > Ok, that's way more than I can understand. I've upgraded to 10.6
> > > > (after going back and reading that it was tested on 10.6) and it
> > > > occurred to me that I wasn't able to do the part in the tutorial
> > fromhttp://code.google.com/p/touchatag-processing/whereyouuse the

Ben Blundell

unread,
May 10, 2011, 6:41:39 AM5/10/11
to london-h...@googlegroups.com
I'd second the 64/32 bit issue. Also, libusb is a pain in the arse under snowleopard and having that checked first it most definitely the right move. With these libs, its best to make sure EVERYTHING is 32bit and 32 bit only. OSX gives you lots of issues because it tries to allow both.

--
-- 
(>) SECTION9 * Benjamin Blundell
(>) b...@section9.co.uk * www.section9.co.uk 
(>) Code, Design, Graphic, Web 
(>) London Hackspace, Laboratory 24, Cremer Business Centre. London E2 8HD


tom

unread,
May 10, 2011, 7:03:48 AM5/10/11
to London Hackspace
really? No problems on this laptop :D


On May 10, 11:41 am, Ben Blundell <o...@section9.co.uk> wrote:
> I'd second the 64/32 bit issue. Also, libusb is a pain in the arse under
> snowleopard and having that checked first it most definitely the right move.
> With these libs, its best to make sure EVERYTHING is 32bit and 32 bit only.
> OSX gives you lots of issues because it tries to allow both.
>

David Russell

unread,
May 10, 2011, 9:48:38 AM5/10/11
to London Hackspace
So are you running these libraries on a Mac Tom? I've tried installing
them on a second laptop and get exactly the same errors...

tom

unread,
May 10, 2011, 11:56:20 AM5/10/11
to London Hackspace
not these libraries but all of the opengl ones that processing uses,
and that was outside of the processing IDE in Eclipse

David Russell

unread,
May 10, 2011, 7:30:02 PM5/10/11
to London Hackspace
So I've got the card reader working with Processing now thanks to some
help from a guy on the Processing forum. Is there anyone around at the
space this week that I might be able to chat to about the rest of the
coding? I basically want the ID numbers to be assigned a line of text
from a database and to be displayed each time it's scanned so that the
text is unique to that ID...

Mark Steward

unread,
May 11, 2011, 4:29:06 AM5/11/11
to london-h...@googlegroups.com
What was the fix?  Would be helpful to know for the future.

Unless you've got a large number (read thousands) of IDs, you'll probably be fine parsing a text file in Processing.


Mark

David Russell

unread,
May 11, 2011, 8:09:41 AM5/11/11
to London Hackspace
The libraries needed to be installed manually via Terminal because the
installer script that comes with the download doesn't work (sorry,
can't get any more technical than that).

That was exactly what I was thinking, or possibly even typesetting the
text in individual images which are paired up with the ID numbers. I
think realistically I shouldn't need more than a few hundred. The
problem is I don't even know where to begin with building that!

On May 11, 9:29 am, Mark Steward <markstew...@gmail.com> wrote:
> What was the fix?  Would be helpful to know for the future.
>
> Unless you've got a large number (read thousands) of IDs, you'll probably be
> fine parsing a text file in Processing.
>
> Mark
>
Reply all
Reply to author
Forward
0 new messages