18-20.11 Research on different types of cards there are. Main technologies: chip cards, magnetic strip, NFC. Ordered cards and reader.
21.11 Installed MFRC522 library. Tried to use NFC reader board from Hacklab with Arduino. Error: card not connected. Probably poor connection, will try again with my own board.
22.11 Picked up Omnikey 3021.
23.11 Picked up the DomotiX package with cards and omnikey, two days late. Tested the reader, works well, even tough the sw is not supported from Win10 up. Installed drivers, worktool sw from HID, bought learning sw (CSC) from FinitePi. Waiting for delivery.
24.11 https://www.ebay.nl/itm/266621324642?mkevt=1&mkpid=0&emsid=e11050.m43.l1123&mkcid=7&ch=osgood&euid=affa7477eea347a48543e4f9909d18c0&bu=45875156603&osub=-1~1&crd=20241123155238&segname=11050 Tested UCC sw with SLE4442 and SLE4428 cards, both work fine. SLE4442 used in sync API mode: red, write, saved data on PC and uploaded data from PC. Tried to get some API to use with another sw, requires some C++. Setup NFC reader board with Arduino, successfully red the multiple NFC tags snd cards with test code from the library.
25.11 Checked for python codes to read and save data from Omnikey.
27.11 https://www.digi.com/resources/documentation/digidocs/90002386/os/python-hid-module-c.htm?TocPath=Applications|_____5 https://pyscard.sourceforge.io/ https://smartcard-atr.apdu.fr/ https://pcsc-tools.apdu.fr/smartcard_list.txt (ATR ids)
Installed python and hid python module. Talked to Bente from Hacklab, she shows me how to use python in Windows PowerShell terminal. She sugggested using Omnikey with Python and RFID with Arduino will be similair amount of work and learning. Installed local Git.
Successfully installed python 3.13 and hid module. Tried to access Omnikey with hid.enumerate. Outcome unclear. Tried reading the card with hid.Device().read(). No return, Shell freezes.
Installed pyscard module. Example code for reading ATR nr tested with blank SLE4442, old MasterCard and Vpay, returns data.
Tried ATR parsing website. Found a list of all known identified ATRs.
28.11 https://stackoverflow.com/questions/32839396/how-to-get-the-uid-of-rfid-in-arduino Debugged the RFID reader circuit, reading works well. Hard to find interpretation key. Found two ways to read only UID. Second one (DumpUID_2) seems to work better, but is harder to understand.
29.11 Got RFID readings into TouchDesigner through Serial (DAT).
4.12 https://matthewragan.com/workshops/td-summit-2019-external-python-libraries/ https://pyscard.sourceforge.io/#samples Got Raspberry Pi Pico. Magnetic connectors arrived, I don’t need them anymore. Installed Python 3.11 with corresponding pyscard lib, compliant with TD 099 built. Did Ex Python lib course from Mathew Reagan.
8.12 Tested two more examples from pyscard: HEX String conversions and Card event monitoring, made monitoring run in a loop.
9.12 Pyscard lib works in TD!!! pyscard_read & pyscard_card_monitor both work and print to textport.
4.02 Opened HID reader. PCB is fixed in place with four metal touch points to read the chip. Must be spring loaded to read cards of various thicknesses.
6.02 Changed ATRs in cards nr 7, 8, 13. Two first digits fixed, not visible in UCC sw (HEX 3B 04).
7.02 https://pyscard.sourceforge.io/#samples Made TD code for automated card reading. Gets first 16 bytes and works in TD (CardViz.54). TD gets 15th and 16th bytes as values in DAT and displays right word. Code works but not all cards are fitting right in the reader.
23.02 Got speakers, amp, jacks and osciloscope from Hacklab.
24.02
Soldered speaker cable, connected amp and tried two different tape heads (1) and (2). (1) outputs very subtle sound. Measured voltage 0 (?). (2) doesn’t output anything noticable. Measured out voltage 0.1 -0.3 mV on different cards.
https://github.com/seancolyer/pyMagStripe https://blog.yossarian.net/assets/MSR206_User_Guide.pdf (MSR206 doc, 2003) Found pyhton lib for magnetic stripes from 2012. Device used is MSR206. Compatible with iso/iec 7811 standard.
3.03 Talked to Lex and Gokay from EWP. MagStrip circuit needed pre amp, got Vellman diy one from Kiwi. Soldered it and added to the curcuit, cut the connections shorter. It’s louder but very noisy. Probably most of it is power supply (less noise when grounded), and also bare preamp connectins.
12.03 Made a switch circuit with relay. Connected Arduino to TD throught serial. Values incorrect and incoherent. Delay() not best for reading values on the same thread.
13.03 https://techeonics.com/ac-dimmer-module/
https://github.com/RobotDynOfficial/RBDDimmer
Changed relay to AC dimmer module. Tested example 1. code from RBDDimmer lib (SerialMonitorDim), works fine but slow (serial speed) :/ Made it work with values from credit cards send via Serial to Arduino (CardSwitch.toe).
17.03
Edited script to monitor for reader name, and add it to CardData DAT. Works well with two readers. Only the card data is send over serial, so that it affects the same light bulb. Also added Execute DAT with OnStart f to run script and clear CardData table.
Arduino sometimes disappear from serial port, reason unknow, but solved with new cable.
Code gave error from TD (requesting TD objects from separate thread?), but solved with laptop restart.
18.03 Switch off active par of Serial DAT added to OnStart. Then power in the whole building went of :/
19.03 Got another light to operate with two readers. Made both lights dim with the same value.
28.04 https://github.com/theriley106/magstripe-python - for MSR605/MSR605X https://github.com/manwinder123/MSR605-Card-Reader-Writer-Eraser-with-GUI for MSR605 https://www.colincrawley.com/audio-duration-calculator/
Magnetic stripe is disabled in the whole Netherlands in debit cards form Maestro and V pay. No way of charging visitors during the grad show. Bought one MSR505X reader from Amazon. Data stored on magnetic strips:
tracks | BPI = magnetic density, physical track property | ISO encoding | capacity | vertical position from top edge |
---|---|---|---|---|
Track 1 | ||||
IATA | 210 BPI | 7-bit encoding (6 bit + odd parity) | ~553 bits | |
8-bit: | ||||
69 bytes | ||||
ISO: | ||||
79 alphanumeric char | 1,50 mm | |||
Track 2 | ||||
ABA | 75 BPI | 5-bit encoding (4 bit + odd parity) | ~200 bits | |
8-bit: | ||||
25 bytes | ||||
ISO: | ||||
40 num char | 2,54 mm | |||
Track 3 | ||||
THRIFT | 210 BPI | 5-bit encoding (4 bit + odd parity) | ~535 bits | |
8-bit: | ||||
67 bytes | ||||
ISO: | ||||
107 num char | 3,58 mm | |||
MagStripe tracks hight: 2.794 mm.