Wifiibo icon indicating copy to clipboard operation
Wifiibo copied to clipboard

Wifiibo freezes after read or write

Open tgeorge91 opened this issue 4 years ago • 6 comments

Hello! I'm having a bit of trouble with Wifiibo. I'm using a NodeMCU and a PN532. The web page keeps freezing and I have to reset my NodeMCU. This happens when I try to read or write an Amiibo. Here's my steps for reproduction.

Reading:

Navigate to Wifiibo > Click Read amiibo > Status is sometimes blank, sometimes "Connected". Click on "Read amiibo" button > "Status: Place amiibo on the reader." > Place card on reader > Nothing happens. Refreshing page just spins forever.

Here was the output of Arduino IDE's serial monitor:

connected with wifinetwork*, channel 11 dhcp client start... ip:192.168.10.84,mask:255.255.0.0,gw:192.168.1.1 NFC chip: PN532 FW ver: 1.6 ws[/ws][1] connect SHA1 Sum: BBDBB49A917D14F7A997D327BA40D4C39E66CE getAmiiboList: lastFilename=,maxCount=25,printFiles=0 Encoding 0 amiibo entries. pm open,type:2 0 ws[/ws][1] text-message[18]: {"func":"readnfc"} Triggering NFC read Reading NFC tag...Place amiibo on the reader. 0% Starting dump... 45% 91% 100% Tag read successfully. ws[/ws][1] disconnect: 0

When writing an amiibo, Find Amiibo, Select "Create Tag". Again, sometimes Status says Connected, sometimes it's blank. Click Create Amiibo. Sometimes the status stays on "Connected", but sometimes it changes to "Writing tag data", but regardless of which happens, afterwards, the web page freezes, but the amiibo works fine. Refreshing web page spins endlessly and doesn't ever load. Resetting my NodeMCU works, until I write another Amiibo, then it's rinse and repeat.

I'm not sure if it's maybe because I'm using the cheapest NodeMCU I could possibly find, or the cheapest PN532 I could find, or if it's an actual software issue somewhere, although I'd assume that more people would have the issue then....

I have tried with the mini and lite firmware and both seemed to have the issue, on 2 different NodeMCU's...

Here's the output of Arduino IDE's serial monitor for writing:

ws[/ws][1] connect SHA1 Sum: BBDBB49A917D14F7A997D327BA40D4C39E66CE ws[/ws][1] text-message[47]: {"func":"createamiibo","id":"027E000101690502"} Triggering NFC create Create amiibo: ID=0x027e000101690502 Creating NFC tag...Place tag on the reader. 0% Tag UID: 4F897824C6880

Writing tag data... Wrote page 3, bytes:F1 10 FF EE Wrote page 4, bytes:A5 00 00 00 Wrote page 5, bytes:D0 E6 D3 05 Wrote page 6, bytes:7D 5F 64 FE Wrote page 7, bytes:16 88 69 B9 Wrote page 8, bytes:D5 B8 98 53 Wrote page 9, bytes:B7 CB 4F 58 Wrote page 10, bytes:30 7F 44 27 Wrote page 11, bytes:3E BE 9B 87 Wrote page 12, bytes:D0 69 9C 9F Wrote page 13, bytes:31 92 96 2C Wrote page 14, bytes:FD 68 4F BA 10% Wrote page 15, bytes:4D C5 A6 3B Wrote page 16, bytes:77 50 B3 B6 Wrote page 17, bytes:AD 66 EF B5 Wrote page 18, bytes:DF 76 FC EC Wrote page 19, bytes:7E 02 F2 64 Wrote page 20, bytes:AC B6 AA FA Wrote page 21, bytes:02 7E 00 01 Wrote page 22, bytes:01 69 05 02 Wrote page 23, bytes:00 00 00 00 Wrote page 24, bytes:00 00 00 00 Wrote page 25, bytes:00 00 00 00 Wrote page 26, bytes:00 00 00 00 Wrote page 27, bytes:00 00 00 00 20% Wrote page 28, bytes:00 00 00 00 Wrote page 29, bytes:00 00 00 00 Wrote page 30, bytes:00 00 00 00 Wrote page 31, bytes:00 00 00 00 Wrote page 32, bytes:D1 0F 10 92 Wrote page 33, bytes:15 8C 80 39 Wrote page 34, bytes:ED 1E 53 BF Wrote page 35, bytes:78 24 7C 55 Wrote page 36, bytes:C2 B5 3D 79 Wrote page 37, bytes:59 08 86 E5 Wrote page 38, bytes:6A FC 0D ED Wrote page 39, bytes:2D 15 8B 80 Wrote page 40, bytes:61 8B 00 5C Wrote page 41, bytes:63 83 B7 14 30% Wrote page 42, bytes:AE 97 67 D5 Wrote page 43, bytes:73 04 65 E6 Wrote page 44, bytes:97 4D 60 D4 Wrote page 45, bytes:80 84 2C 5D Wrote page 46, bytes:91 6F 07 B8 Wrote page 47, bytes:58 41 BF 5A Wrote page 48, bytes:B7 98 65 DC Wrote page 49, bytes:50 11 7D 1C Wrote page 50, bytes:06 F3 B9 08 Wrote page 51, bytes:D9 03 BA 97 Wrote page 52, bytes:84 07 AD 2A Wrote page 53, bytes:5E FC E0 D6 Wrote page 54, bytes:AA E4 75 B1 40% Wrote page 55, bytes:EA 32 8E 4B Wrote page 56, bytes:E1 0A 0B 4E Wrote page 57, bytes:82 D9 3C DC Wrote page 58, bytes:B0 41 C2 3D Wrote page 59, bytes:32 5A 7E CE Wrote page 60, bytes:84 15 27 55 Wrote page 61, bytes:C5 E7 C2 8B Wrote page 62, bytes:1B 3B 85 E4 Wrote page 63, bytes:F0 7F 8C 79 Wrote page 64, bytes:F3 2D 9D 89 Wrote page 65, bytes:40 75 3E ED Wrote page 66, bytes:DB 30 0C D1 Wrote page 67, bytes:F6 B9 F2 61 Wrote page 68, bytes:29 31 FB 45 50% Wrote page 69, bytes:FE B2 69 69 Wrote page 70, bytes:A2 CB 78 09 Wrote page 71, bytes:C4 E4 42 2A Wrote page 72, bytes:24 A7 DE 72 Wrote page 73, bytes:33 8C 69 17 Wrote page 74, bytes:38 DE 0A 3B Wrote page 75, bytes:A1 9B E9 CF Wrote page 76, bytes:6F E0 04 BB Wrote page 77, bytes:3D 18 7D 6E Wrote page 78, bytes:C4 D0 0C F1 Wrote page 79, bytes:3E 9F 24 15 Wrote page 80, bytes:C6 4C B9 D9 Wrote page 81, bytes:F8 28 3A A0 Wrote page 82, bytes:8E 39 FE D2

60% Wrote page 83, bytes:F6 CD 9D 75 Wrote page 84, bytes:9B 97 09 08 Wrote page 85, bytes:12 14 37 5A Wrote page 86, bytes:10 B4 44 14 Wrote page 87, bytes:CB 89 A8 C6 Wrote page 88, bytes:0C A3 8E 89 Wrote page 89, bytes:DC EA 83 21 Wrote page 90, bytes:5C CA 51 22 Wrote page 91, bytes:B2 0C 54 C8 Wrote page 92, bytes:4B 28 4C 61 Wrote page 93, bytes:23 D4 14 AB Wrote page 94, bytes:73 11 CB 08 Wrote page 95, bytes:E1 20 37 B9 70% Wrote page 96, bytes:C8 49 07 67 Wrote page 97, bytes:31 43 B1 DD Wrote page 98, bytes:ED B2 95 12 Wrote page 99, bytes:ED 72 C4 EB Wrote page 100, bytes:BA 10 C4 70 Wrote page 101, bytes:7E 99 6D B2 Wrote page 102, bytes:2C 49 91 FC Wrote page 103, bytes:6B 2C 9B 87 Wrote page 104, bytes:0B A6 00 A9 Wrote page 105, bytes:23 A7 33 61 Wrote page 106, bytes:FD FB 2B D9 Wrote page 107, bytes:D5 4E 22 87 Wrote page 108, bytes:CB 4D 17 C9 80% Wrote page 109, bytes:C1 5E 8E 19 Wrote page 110, bytes:4F DE 9B 6D Wrote page 111, bytes:BB 0B 9F 0C Wrote page 112, bytes:86 AB 06 38 Wrote page 113, bytes:EF EA AF 84 Wrote page 114, bytes:59 32 EB 75 Wrote page 115, bytes:FD 81 74 15 Wrote page 116, bytes:6C B7 C3 45 Wrote page 117, bytes:94 D7 09 97 Wrote page 118, bytes:D2 23 47 68 Wrote page 119, bytes:F1 49 E1 E2 Wrote page 120, bytes:FB 3A 67 C6 Wrote page 121, bytes:C4 81 00 72 Wrote page 122, bytes:69 18 56 33 90% Wrote page 123, bytes:2C C3 98 6F Wrote page 124, bytes:8A 84 70 66 Wrote page 125, bytes:02 98 C4 F3 Wrote page 126, bytes:86 4F CB 0A Wrote page 127, bytes:B0 03 2E E3 Wrote page 128, bytes:57 BE 2A F1 Wrote page 129, bytes:6B 5A 58 CA Wrote page 130, bytes:00 00 00 BD Wrote page 131, bytes:00 00 00 04 Wrote page 132, bytes:5F 00 00 00 Wrote page 133, bytes:D0 8E 40 99 Wrote page 134, bytes:80 80 00 00 100% Wrote page (dynamic lock) 130, bytes:01 00 0F BD Wrote page (static lock) 2, bytes:00 00 0F E0 Tag successfully created & written. ws[/ws][1] disconnect: 0

Please let me know if you have any ideas, or have anything you'd like me to try... Thank you!!!

tgeorge91 avatar Jul 20 '20 01:07 tgeorge91

I purchased a Wemo D1 Mini and it arrived today. I flashed the image and get the exact same result on it.

tgeorge91 avatar Jul 21 '20 21:07 tgeorge91

What browser and operating system are you using? It looks like the WebSocket is disconnecting for some reason.

On Jul 21, 2020, at 5:49 PM, Timothy [email protected] wrote:

 I purchased a Wemo D1 Mini and it arrived today. I flashed the image and get the exact same result on it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Xerxes3rd avatar Jul 21 '20 21:07 Xerxes3rd

Getting same issue on chrome on Windows 10 and chrome on iOS.

tgeorge91 avatar Jul 21 '20 22:07 tgeorge91

Hmmm, I also use Chrome on Windows 10. In Chrome on Windows, can you open the Chrome developer tools (F12 should open it), try reading or writing an amiibo, and see if there are any exceptions/errors? This seems like some sort of JavaScript websocket issue. I won’t have time to do any local debugging for a few days, but hopefully I’ll have time to run some tests this weekend.

On Jul 21, 2020, at 6:14 PM, Timothy [email protected] wrote:

 Getting same issue on chrome on Windows 10 and chrome on iOS.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Xerxes3rd avatar Jul 21 '20 22:07 Xerxes3rd

I was thinking websocket issue too, but I have to reset my nodemcu/wemo after it freezes, so I don't think it makes sense for it to be a client side issue. It's been a few days since I played with it, but I'll try to find time this weekend to get the chrome developer tools logs.

I'm decent-ish at arduino stuff, but there's no .ino file, so I'm not sure totally how to compile wifiibo from source. Actually - I just re-read the compiling section so I didn't look too dumb when commenting... is adding it to the libraries folder the key? If not, can you maybe help point me in the right direction? (Just a link or something, I don't want you to waste any time holding my hand here.)

tgeorge91 avatar Jul 25 '20 17:07 tgeorge91

Interesting, might require some more debugging print statements (yay for no proper debugger).

The main Wifiibo .ino application is the “example.” Copy/clone Wifiibo into your libraries folder, start/restart the Arduino IDE, and it should show up under Examples->Wifiibo. If you want to make edits, you’ll have to save it under a different name, or make edits with a different editor. Let me know if that doesn’t make sense and I can provide more details. Sounds like I need to update the readme to include this information. =)

On Jul 25, 2020, at 1:11 PM, Timothy [email protected] wrote:

 I was thinking websocket issue too, but I have to reset my nodemcu/wemo after it freezes, so I don't think it makes sense for it to be a client side issue. It's been a few days since I played with it, but I'll try to find time this weekend to get the chrome developer tools logs.

I'm decent-ish at arduino stuff, but there's no .ino file, so I'm not sure totally how to compile wifiibo from source. Actually - I just re-read the compiling section so I didn't look too dumb when commenting... is adding it to the libraries folder the key? If not, can you maybe help point me in the right direction? (Just a link or something, I don't want you to waste any time holding my hand here.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Xerxes3rd avatar Jul 26 '20 01:07 Xerxes3rd