Tap the card on the charger and the number fills itself in
The enrolment the Anker app does, done here: 0108 a2=7 opens the reader, 0908 brings back the UID. The frames this sends are byte-for-byte the ones the app was captured sending — checksum included — which is what the new test asserts. Adding and removing now write the charger as well as the account: the device write is the app's own message, the account write is the inferred one that carries the name, and either may fail without the other. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
4c73d4ac05
commit
7176867eb3
@@ -345,6 +345,13 @@ export const api = {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ cardNumber, cardName }),
|
||||
}),
|
||||
// Opens the charger's own card reader and waits for a tap — the request is in
|
||||
// flight for the whole twenty-second window, and answers whether or not a card
|
||||
// arrived.
|
||||
scanAnkerRfidCard: (sn) =>
|
||||
request(`/integrations/anker-solix/chargers/${encodeURIComponent(sn)}/rfid-cards/scan`, {
|
||||
method: "POST",
|
||||
}),
|
||||
deleteAnkerRfidCard: (sn, cardNumber) =>
|
||||
request(
|
||||
`/integrations/anker-solix/chargers/${encodeURIComponent(sn)}/rfid-cards/${encodeURIComponent(cardNumber)}`,
|
||||
|
||||
Reference in New Issue
Block a user