Automatic badge reader project

Hi all! I am in a phase of ramping up in knowledge about RFID, Proxmar and even Linux. I feel like I am again a university student trying to hack electronics : )

long story short

I am building a badge reader using a proxmark3 easy 512 connected to a Raspberry PI 4.

Installed everything and works like charm manually sending the commands.

I’d like to set up my process with Node Red in order to control the flow. The commands I need are:

lf hid watch
lf hid read

with the first one I need to understand when a badge is placed on the reader, acting like a trigger, once I know a badge is there I need to use the read command to periodically (say every minute) check if the badge with that code is still there (and capture the output). If the badge is removed then I go back to the watch process.

My issue is the output capturing. It looks like there is some buffer and only when it’s full the output is sent to stdout. I am therefore failing in node red having configured PM3 to run as a daemon and injecting the commands, as I get no output.

For the read one I have found a workaround redirecting the output to a file, with this command:

proxmark3 /dev/ttyACM0 “lf read” > lf_read_output.txt

but I don’t know how to handle the watch state. Any hints? Is there a way to intercept the output I see it on the screen if I launch the program manually?

thank you

d.

1 Like

Without seeing what you’re doing exactly, it’s all speculation. I can tell you i use Python’s pexpect to handle my proxmark automation.

3 Likes