garrett-davidson / pimiibo

A tool to create your own amiibo!
115 stars 32 forks source link

Pimiibo is a directory and permission denial. #10

Closed kyle-matthews closed 4 years ago

kyle-matthews commented 4 years ago

Hi- I’ve been following your steps to get pimiibo working which are very well written by the way.

The issue I’ve been having is when trying to write the bin files to NFC card.

When following the command from readme.md it returns ‘./pimiibo/ is a directory’

I attempted to cd into pimiibo, but upon doing this it returns ‘key_retail.bin: permission denied.’ I’ve checked the MD5 of my key and it matches readme.md

Sorry to be a nuisance! Thank you for all of your work.

(Attached is an image of what I ran in terminal.) image

Kyle

command-tab commented 4 years ago

(Not the author, but I've used pimiibo many times)

It looks like you're having trouble running pimiibo, and the issue is related to use of file and directory paths. In your first attempt, your terminal was not navigated to the ~/pimiibo directory where the pimiibo program resides (hence the "Is a directory" error), and the path to the .bin file ended with a slash (indicating a directory, not a file). Then you ran cd pimiibo which was the right move to fix one of those issues, but then you omitted ./pimiibo from the second attempt. You did also remove the trailing slash on the .bin path on the second attempt, though. You were so close!

I think what you want to do is:

cd
cd pimiibo
./pimiibo ~/key_retail.bin "~/AC/Animal Crossing/Cards/Series 2/[AC] 188 - Ankha.bin"
kyle-matthews commented 4 years ago

Thank you ever so much for your reply! I’ve typed everything in as you’ve suggested the terminal’s returning: `Bash: ./pimiibo: no such file or directory.

EDIT: I’m not sure if step 3 might have something to do with when I enter the make Command.

I’ve spent most of today googling and looking around reddit and all sorts but there doesn’t seem to be much out there for me to look at.

command-tab commented 4 years ago

Oh, if the pimiibo program isn't in the pimiibo/ directory, it must not have been compiled yet. What happens when you run make inside the pimiibo/ directory?

kyle-matthews commented 4 years ago

It goes through a lot, but it does mention at the end that it has 1 error. I’ve attached the exact copied and pasted message returns. Thanks again! pimiibo make.txt

command-tab commented 4 years ago

I tried building pimiibo on my Pi 3B+ and ran into the same issue. (I've always built and run pimiibo on macOS with a USB NFC reader/writer, so this issue is new to me.) But at least it's failing consistently 😆

I managed to fix it and get it compiling successfully on the Pi by modifying the files amiibo.h and amiitool.h to include #include <stdint.h> right after #include <stdlib.h>. You can do something like nano amiibo.h to edit amiibo.h, add #include <stdint.h>, then press Ctrl-X, y, Return to exit.

Repeat for amiitool.h.

Run make again, and it should build successfully. Then you should be able to run ./pimiibo ~/key_retail.bin "~/AC/Animal Crossing/Cards/Series 2/[AC] 188 - Ankha.bin".

kyle-matthews commented 4 years ago

You sir are an absolute saint! There’s absolutely no way I’d have figured that out without you! Thank you ever so much!

command-tab commented 4 years ago

@garrett-davidson Is adding #include <stdint.h> to amiibo.h and amiitool.h a change you'd like to have in the repo? I'm happy to open a quick PR if you'd like.