Trammell Hudson avatar Trammell Hudson committed 1636e2a Draft

35-bit tags works

Comments (0)

Files changed (1)

  *                  Xtal2 3     6 MISO  Black/Black
  *    Black         Gnd   4     5 MOSI  Gray/Yellow
  *
+ * If the tag seems to have trouble reading, try adding a 0.1 uF cap
+ * between the two clock pins.
+ *
  */
 #include <avr/io.h>
 #include <avr/pgmspace.h>
 static void manchester_1(void);
 static void hid_header(void);
 static void hid_reset(void);
-//int main(void);
-
-#define HID_MFG_CODE        0x01002  // Do not modify
-#define HID_SITE_CODE       42
-#define HID_UNIQUE_ID       23946     // May be written on the back of the card
 
 #define HID_HEADER "2"
 #define HID_RESET "3"
 
 static const char hid_bits[]
 PROGMEM __attribute__((__used__)) = {
-#if 1
 	HID_HEADER
-	"0000"
-	"0001"
-	"0000"
-	"0000"
-	"0010" // HID Manufacturer code 0x01002 for n1002 cards?
-	"00101010" // Site code 42
-	"01011101"
-	"10001010" // ID 23946
-	"0" // parity
+#if 0
+	// 19 bits: 0x0801:
+	"000"
+	"00001000" // 0x08
+	"00000001" // 0x01
+	"00010101001011101100010100" // 26 bit card
 #else
-	HID_HEADER
-	"0001"
-	"0000"
-	"0000"
-	"0000"
-	"0010" // HID Manufacturer code, trying 10002 for 34-bit?
-	"00000000" // fc-12
-	"00001100"
-	"00111000" // id 14371
-	"00100011"
-	"0"
+	// 35 bit cards use header 0x05, with 10 bits
+	"0000000101" // 10 bit header, 0x005
+// read from card 11100001001000000111000011001001010
+	"11" // 2 parity bits
+	"100001001000" // fc=2120, 12 bits
+	"00011100001100100101" // id=115493, 20 bits
+	"0" // 1 parity bit
 #endif
 	HID_RESET
 };
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.