Identium Active RFID Integration Kit 1.0
========================================

For developers connecting Identium F529 / F530 active RFID readers (T505, AT507, AT508 tags) to their own
software. Read it with the "Identium Active RFID Integration Guide" (PDF, Identium Resource Hub).

  receivers/node/receiver.js      TCP receiver, Node.js 18 or later, no packages to install
  receivers/python/receiver.py    TCP receiver, Python 3.8 or later, standard library only
  simulator/reader-sim.py         plays the part of a reader against your receiver and checks every reply
  frames/example-frames.txt       the example register / login / heartbeat / tag-data frames as hex

Both receivers do the same job: listen on one TCP port, find frames (55 AA ... CRC16), drop frames that
fail the CRC check without replying, reply to registration (0x0008), login (0x0001), heartbeat (0x0003) and
tag data (0x0004), and print every tag read as one JSON line on stdout. Connection events go to stderr.

Try it on one computer (two terminal windows)
---------------------------------------------
1. Start a receiver:
     node receivers/node/receiver.js --port 4610 --ip 127.0.0.1
   or
     python3 receivers/python/receiver.py --port 4610 --ip 127.0.0.1
2. Run the simulator:
     python3 simulator/reader-sim.py --port 4610
   Every line should say PASS and the receiver prints two tag reads as JSON.
3. Harder framing tests (split frames, stray bytes, two frames at once, a broken CRC):
     python3 simulator/reader-sim.py --port 4610 --chunk 7 --noise --together --bad-crc
4. Keep reporting every 10 seconds (Ctrl+C stops):
     python3 simulator/reader-sim.py --port 4610 --loop 10

Use it with a real reader
-------------------------
- Run the receiver on a computer the reader can reach. For a reader on mobile data that means a public IP
  address; open the TCP port in your firewall, router and cloud security group.
- --ip is sent back to the reader in the registration reply and tells it where to log in: give the address
  the reader uses to reach this computer (the same IP you set in the reader).
- In the Identium Active Reader app set the server IP and port (Plat IP 1 / Plat Port 1 for mobile data,
  Plat IP 2 / Plat Port 2 for a wired network), then Set Params. See the F529 user manual.
- Replace the console.log / print line with a write to your database, and reply only after the write
  succeeds: a reader that gets no reply sends the same reads again.

Support: Identium Tech Solutions Pvt. Ltd. - info@identium.in - www.identiumone.com/resourcehub/
