Skip to content

Commit fed527a

Browse files
committed
Add Japanese Libre IDs
1 parent 2c8697c commit fed527a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

app/src/main/java/me/cominixo/openlibrenfc/LibreConstants.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ class LibreConstants {
1414
(byte) 0x00
1515
};
1616

17+
static final byte[] LIBRE1_JAPAN_ID = {
18+
(byte) 0x00,
19+
(byte) 0x00,
20+
(byte) 0x04
21+
};
22+
1723
static final int MEMORY_SIZE = 360;
1824

1925
// Password to unlock/lock the chip

app/src/main/java/me/cominixo/openlibrenfc/LibreNfcUtils.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ public static byte[] readMemory(NfcV handle) {
4646

4747
}
4848

49-
// TODO remove dump for debug
50-
System.out.println(bytesToHexStr(received));
51-
5249
return received;
5350

5451
}
@@ -140,7 +137,6 @@ public static byte[] hexStrToBytes(String string) {
140137
}
141138

142139
if (cleanString.size() != 360) {
143-
System.out.println(string);
144140
return null;
145141
}
146142

app/src/main/java/me/cominixo/openlibrenfc/MainActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ public void onNewIntent(Intent intent) {
210210
libreType = "Libre 1 New";
211211
} else if (Arrays.equals(typeIdentifier, LibreConstants.LIBRE1_OLD_ID)) {
212212
libreType = "Libre 1 Old";
213+
} else if (Arrays.equals(typeIdentifier, LibreConstants.LIBRE1_JAPAN_ID)) {
214+
libreType = "Libre 1 Japan";
213215
} else {
214216
libreType = "Unsupported";
215217
}

0 commit comments

Comments
 (0)