zmk icon indicating copy to clipboard operation
zmk copied to clipboard

Copying .UF2 on nice!nano doesn't seem to work

Open jwav opened this issue 3 years ago • 12 comments

I use Ubuntu 21.10. My nice!nano seems to work, it was outputting text before today's fiddling session. I generated a zmk.uf2 with no error and have tried to copy it on a nice!nano with the following variations:

  • drag & drop zmk.uf2 as is
  • same thing with the cp command
  • rename to "CURRENT.UF2" before drag & drop
  • same thing with the cp command

In all cases, the following happens:

  • The nice!nano reboots (normal)
  • Once connected, if I press any key, nothing happens
  • When running a diff between the currently on-board "CURRENT.UF2" and the generated "zmk.uf2", it returns: Binary files zmk.uf2 and CURRENT.UF2 differ

I may be wrong but it seems to mean the nice!nano wasn't flashed. Any idea on how to solve this ?

jwav avatar May 18 '22 17:05 jwav

The UF2 bootloader isn't a real file system, so it doesn't matter what the file you copy is named. IIRC, the CURRENT.UF2 file includes other things such as the bootloader itself, so it will not match the ZMK firmware file.

https://zmk.dev/docs/development/usb-logging/ might help with figuring out why the keyboard isn't outputting anything.

joelspadin avatar May 18 '22 18:05 joelspadin

Thanks for the info, I was kind of expecting for the uf2 diff to be meaningless.

I've successfully logged into the nice!nano's tty console with tio thanks to your link, but I can't figure out what to do with it. I've typed on the keeb equiped with the nice!nano, but it doesn't output anything in that console. I checked with c-t s: the nice!nano sent 0 bytes despited me doing all kinds of things with it.

What do you suggest I do now?

jwav avatar May 18 '22 18:05 jwav

Does it output anything at all when you connect? If not, logging might not be set up properly. If so, but it's just not logging anything when you press a key, either the firmware or the hardware isn't working. You could try to narrow it down by using something like tweezers to bridge a row pin and column pin (check the schematic or ZMK shield definition for your keyboard) to eliminate the PCB and switches as problems.

joelspadin avatar May 18 '22 22:05 joelspadin

Currently, no output is generated at any time, in the serial console or elsewhere.

I set up logging according to the official ZMK link you provided (https://zmk.dev/docs/development/usb-logging/). If I missed anything, it's not listed in there; but I don't think that's the problem.

It's not the PCB either. I've used this keyboard for a while with an Elite-C and also a previous firmware on that very same nice!nano, which was at that time working as a wired keyboard and outputting correct letters. Which also suggests that the nice!nano is not at fault either although I'll try a new one in the future.

BTW it's a Corne, but I don't think that's relevant.

jwav avatar May 19 '22 08:05 jwav

Running into something similar here – first flash of default keymap went fine, but after customizing the keymap and updating the configuration file, it builds just find via Github actions but reflashing using the new UF2 files results in no changes to the physical keymapping. Any idea what might be going on?

codeanpeace avatar Jun 03 '22 21:06 codeanpeace

@codeanpeace Looks like you are running into issue #1144 if you are working with https://github.com/codeanpeace/zmk-config. #1306 will fix it, but meanwhile you can rename your keymap and conf files to kyria.keymap and kyria.conf to get them picked up by the build.

caksoylar avatar Jun 03 '22 21:06 caksoylar

Thanks @caksoylar – impressed by the quick response! I managed to figure it out and saw your helpful comment moments after I pushed the file rename changes.

codeanpeace avatar Jun 03 '22 21:06 codeanpeace

@caksoylar > Good pointers, mate. Any idea on what I might try on my end?

jwav avatar Jun 04 '22 08:06 jwav

a previous firmware on that very same nice!nano, which was at that time working as a wired keyboard and outputting correct letters

Total shot in the dark, but maybe it has something to do with Output Selection?

codeanpeace avatar Jun 04 '22 08:06 codeanpeace

@codeanpeace > Fair guess. I'll try to check this out today.

jwav avatar Jun 04 '22 09:06 jwav

Just wanted to chime in here, I'm having the same issue.

I'm on macOS & when i copy the UF2 file, i get the "DIsk not ejected properly" message and the device can't be found until I click reset twice.

I deleted the Current.UF2 and see it replaced when I copy the new file so I assume something is happening

To add to this it looks like the left half will flash and work just fine, but the right half does not

EDIT: This was related to the left half of the keyboard having to be connected for the right to be detected. After flashing the left side everything is working as expected now for me.

billyjacoby avatar Aug 18 '22 00:08 billyjacoby

Just wanted to chime in here, I'm having the same issue.

I'm on macOS & when i copy the UF2 file, i get the "DIsk not ejected properly" message and the device can't be found until I click reset twice.

I deleted the Current.UF2 and see it replaced when I copy the new file so I assume something is happening

To add to this it looks like the left half will flash and work just fine, but the right half does not

From discord, I see this was some confusion about split peripheral behavior.

petejohanson avatar Aug 18 '22 02:08 petejohanson

Just wanted to chime in here, I'm having the same issue. I'm on macOS & when i copy the UF2 file, i get the "DIsk not ejected properly" message and the device can't be found until I click reset twice. I deleted the Current.UF2 and see it replaced when I copy the new file so I assume something is happening To add to this it looks like the left half will flash and work just fine, but the right half does not

From discord, I see this was some confusion about split peripheral behavior.

@petejohanson Have you found the solution for this? I have exactly the same issue.

edwin-koh avatar Nov 15 '23 13:11 edwin-koh

same here, is there an update?

auryn31 avatar May 20 '24 16:05 auryn31

There is no currently known issue about flashing failing, closing this. Above quoted symptom is documented in https://zmk.dev/docs/troubleshooting#file-transfer-error and is not a flashing issue.

caksoylar avatar May 20 '24 17:05 caksoylar

There is no currently known issue about flashing failing, closing this. Above quoted symptom is documented in https://zmk.dev/docs/troubleshooting#file-transfer-error and is not a flashing issue.

Thank you, found this as well :) And was on my side. But thank you for the comment!!

auryn31 avatar May 29 '24 12:05 auryn31