Xerxes3rd / Wifiibo

Application and supporting library to manage amiibos using an ESP8266
67 stars 12 forks source link

Can't read or write an amiibo #1

Closed konstantin-kelemen closed 7 years ago

konstantin-kelemen commented 7 years ago

Hi!

First, thank you for this great tool, it really looks nice.

But unfortunately I was unable to make it work no matter how hard I tried.

I've connected the PN532 module as described but every time I try to read or write an amiibo I just get an error: "writeTag error: NFC hardware not available"

But I'm pretty sure that I've connected it correctly, I've also checked the connections a hundred times and checked the module itself — it works fine with Arduino.

The Name and MiiName fields also look strange to me, but that's another issue.

Is there any way to debug this issue? Or maybe I just have things connected improperly?

screen shot 2017-11-06 at 23 11 00 screen shot 2017-11-06 at 23 11 08 connections

Xerxes3rd commented 7 years ago

Kostya,

Sorry you're having troubles with the PN532. Have you tried moving the SPI wires on the D1 from D5/D6/D7 to D11/D12/D13? It seems like what you have should be correct, but it's worth and shot. If you open the Arduino IDE's Serial Monitor at 115200 baud, you should see some diagnostic output about the PN532 (version numbers and such). You can also try installing the Adafruit PN532 library and running some of its examples, as it should work on the ESP8266. The version I included in Wifiibo has some fixes from a pull request (that I also had to modify) to make the PN532 more stable, but the stock Adafruit one should work.

The "Name" and "MiiName" fields in a lot of the amiibo dumps are in Japanese. That data in the amiibo dump is encoded in UTF-16, and while I confirmed that ASCII English text worked fine, I'm not totally sure that I'm decoding other characters properly. I don't speak Japanese at all, so it was difficult to test.

Let me know if you get anywhere. You're the first person to actually test the software besides me, so there are bound to be issues. =)

-Scott

On Mon, Nov 6, 2017 at 4:37 PM, Konstanin Kelemen notifications@github.com wrote:

Hi!

First, thank you for this great tool, it really looks nice.

But unfortunately I was unable to make it work no matter how hard I tried.

I've connected the PN532 module as described but every time I try to read or write an amiibo I just get an error: "writeTag error: NFC hardware not available"

But I'm pretty sure that I've connected it correctly, I've also checked the connections a hundred times and checked the module itself — it works fine with Arduino.

The Name and MiiName fields also look strange to me, but that's another issue.

Is there any way to debug this issue? Or maybe I just have things connected improperly?

[image: screen shot 2017-11-06 at 23 11 00] https://user-images.githubusercontent.com/19798607/32464418-a17eaf40-c348-11e7-9c10-dc9c9ccefc9e.png [image: screen shot 2017-11-06 at 23 11 08] https://user-images.githubusercontent.com/19798607/32464420-a1a89a1c-c348-11e7-8330-94d4d436a7ff.png [image: connections] https://user-images.githubusercontent.com/19798607/32465142-1b6acf94-c34b-11e7-917a-fb3936e8865a.jpg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Xerxes3rd/Wifiibo/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AB070LMMnwoA7iX7SCEHA8PZyLgHTXRlks5sz3wKgaJpZM4QT6cV .

Xerxes3rd commented 7 years ago

One more thing- in the mail today I actually happened to get the same ESP8266 board you're using, so I'll be able to test it tonight and see what happens. =)

On Mon, Nov 6, 2017 at 5:12 PM, Scott Rising scott@xerxes3rd.net wrote:

Kostya,

Sorry you're having troubles with the PN532. Have you tried moving the SPI wires on the D1 from D5/D6/D7 to D11/D12/D13? It seems like what you have should be correct, but it's worth and shot. If you open the Arduino IDE's Serial Monitor at 115200 baud, you should see some diagnostic output about the PN532 (version numbers and such). You can also try installing the Adafruit PN532 library and running some of its examples, as it should work on the ESP8266. The version I included in Wifiibo has some fixes from a pull request (that I also had to modify) to make the PN532 more stable, but the stock Adafruit one should work.

The "Name" and "MiiName" fields in a lot of the amiibo dumps are in Japanese. That data in the amiibo dump is encoded in UTF-16, and while I confirmed that ASCII English text worked fine, I'm not totally sure that I'm decoding other characters properly. I don't speak Japanese at all, so it was difficult to test.

Let me know if you get anywhere. You're the first person to actually test the software besides me, so there are bound to be issues. =)

-Scott

On Mon, Nov 6, 2017 at 4:37 PM, Konstanin Kelemen < notifications@github.com> wrote:

Hi!

First, thank you for this great tool, it really looks nice.

But unfortunately I was unable to make it work no matter how hard I tried.

I've connected the PN532 module as described but every time I try to read or write an amiibo I just get an error: "writeTag error: NFC hardware not available"

But I'm pretty sure that I've connected it correctly, I've also checked the connections a hundred times and checked the module itself — it works fine with Arduino.

The Name and MiiName fields also look strange to me, but that's another issue.

Is there any way to debug this issue? Or maybe I just have things connected improperly?

[image: screen shot 2017-11-06 at 23 11 00] https://user-images.githubusercontent.com/19798607/32464418-a17eaf40-c348-11e7-9c10-dc9c9ccefc9e.png [image: screen shot 2017-11-06 at 23 11 08] https://user-images.githubusercontent.com/19798607/32464420-a1a89a1c-c348-11e7-8330-94d4d436a7ff.png [image: connections] https://user-images.githubusercontent.com/19798607/32465142-1b6acf94-c34b-11e7-917a-fb3936e8865a.jpg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Xerxes3rd/Wifiibo/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AB070LMMnwoA7iX7SCEHA8PZyLgHTXRlks5sz3wKgaJpZM4QT6cV .

konstantin-kelemen commented 7 years ago

After some additional testing I've been able to finally make it recognize the PN532 module! It was the D4 pin that was incorrectly marked on my board (it is actually marked as TX1/D9/GPIO2).

After a few tries I was able to dump and write the tags.

First it was hanging up during the dump process: image 2017-11-07 20-28-40

screen shot 2017-11-07 at 20 10 20

But then I tried the same process in AP mode and it worked fine.

The tag writing also failed the first time I tried, it was noticeably slow and wrote nothing to the tag. On the second try everything was fast and the tag was written properly.

I am happy with the result, the only missing feature which many might find critical is multi-file upload to the ESP memory, if you know what I mean 😉

I will close this issue and will probably create a couple later, maybe even with some pull-requests, who knows 😄

It is a great project, keep it up!

Xerxes3rd commented 7 years ago

Great! I did have plans to implement zip file upload and download, but a small, lightweight zip/unzip library would be necessary and I haven't had a chance to evaluate any. For posterity, I was thinking of trying out the one here: http://demin.ws/blog/english/2012/09/18/miniz-minilzo/