Skip to content

Commit

Permalink
fix webble ATT_MTU bug
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin committed Sep 5, 2023
1 parent d6d3a77 commit 5fe2c91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ console.log(JSON.stringify(resp6)) // {"success":[1,1,1,1,... (truncated)]}
* [Mifare Classic 1k ev1 v3.2 | NXP](https://www.nxp.com/docs/en/data-sheet/MF1S50YYX_V1.pdf)
* [Mifare Classic 4k ev1 v3.2 | NXP](https://www.nxp.com/docs/en/data-sheet/MF1S70YYX_V1.pdf)
* [Mifare Identifcation Procedure - AN10833 | NXP](https://www.nxp.com/docs/en/application-note/AN10833.pdf)
* [MIFARE ISO/IEC 14443 PICC selection - AN10834 | NXP](https://www.nxp.com/docs/en/application-note/AN10834.pdf)
* [MIFARE product and handling of UIDs - AN10927 | NXP](https://www.nxp.com/docs/en/application-note/AN10927.pdf)
* [A 2018 practical guide to hacking NFC/RFID](https://smartlockpicking.com/slides/Confidence_A_2018_Practical_Guide_To_Hacking_RFID_NFC.pdf)
* [Magic Cards Notes](https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/magic_cards_notes.md)
* [elechouse/PN532: NFC library for Arduino](https://github.com/elechouse/PN532)
Expand Down
7 changes: 6 additions & 1 deletion src/plugin/WebbleAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ export default class Pn532WebbleAdapter {
transform: async (pack, controller) => {
// https://stackoverflow.com/questions/38913743/maximum-packet-length-for-bluetooth-le
// 20 bytes are left for the attribute data
for (const chunk of pack.chunk(20)) controller.enqueue(chunk)
for (let i = 0; i < pack.length; i += 20) {
const buf1 = pack.subarray(i, i + 20)
const buf2 = new Packet(buf1.length)
buf2.set(buf1)
controller.enqueue(buf2)
}
},
})
pn532.tx.readable.pipeTo(new WritableStream({ // no wait
Expand Down

0 comments on commit 5fe2c91

Please sign in to comment.