Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nRF52840 MDK USB Dongle not working after flashing it with zephyr.uf2 file #1340

Open
georgala opened this issue Oct 23, 2023 · 33 comments
Open

Comments

@georgala
Copy link

Hello,

I want to remotely control an iPhone 12 through a mac mini M2 pc using Vysor (Vysor Pro Version 5.0.46) for macOS (Ventura 13.5.2).
I have purchased the nRF52840 MDK USB Dongle and i flashed it with your zephyr.uf2 image file (408KB filesize) but its not working.
I talked with Makerdiary support and they told me that the file got corrupted somehow.
Could you please check that this file is correct and compatible with the respective dongle??
Note that the dongle which flashed the corrupted firmware becomes bricked and now i have to re-program it.
Thank you in advance.

@IllusionVK
Copy link

Hey @georgala I also had the same issue.

Also @georgala could you share how is it possible to re-program the dongle ? for now my device is bricked

@koush appreciate you are busy, but wondering if you have ideas on what the problem could be?

@georgala
Copy link
Author

Hi @IllusionVK
Regarding Makerdiary's wiki page, there are 2 ways of fresh installation. The first requires a 2nd nRF52840 MDK USB Dongle and the second requires a debug prob. Check this link: https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/programming/uf2boot/#installing-uf2-bootloader-using-an-external-debugger
Otherwise im not sure if you can do it by using a development board that supports DAPLink firmware. I have to investigate more about this solution.

@koush Could you please check it by priority? There are urgents needs from this solution. Thanks in advance.

@patterson-g
Copy link

I've now purchased 2 makerdiary USB dongles and both are bricked following the instructions here and downloading the zephyr.uf2 image linked. I copy the zephyr.uf2 images to the drive and then the LED flashes red indicating it's flashing then the UF2BOOT volume disconnects. At this point the LED never comes on and I can't recover as the Zephyr images doesn't load and I can no longer access UF2BOOT.

@michmill1970
Copy link

michmill1970 commented Nov 1, 2023

I've now bricked 3 USB Dongles the same way. Google searches haven't turned up any solutions that worked. At the moment, I can't find any way to recover them. $75 wasted. Awesome.

@koush
Copy link
Owner

koush commented Nov 1, 2023

It seems makerdiary has changed their original hardware recently and it now ships with a new bootloader (July 2023).
I highly doubt these things are actually bricked.
https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/programming/uf2boot/

You might be able to recover by checking their sites. But it's possible the original flashing file is not compatible with the new boot loader.

@IllusionVK
Copy link

IllusionVK commented Nov 2, 2023

Hey @koush thanks for the reply!

So you could be right that the device may be recoverable, but the problem is that after the device becomes bricked/unresponsive:

  • Both Mac and Windows don't allow the device to be shown as a drive in explorer/finder
    • even when holding the physical button on the device on insert
      • even when following the extra instructions of clicking it twice within 500ms to enter DFU mode ,

Which means its not possible to copy a new bootloader.

Additionally, both Windows and Mac device managers don't recognise that there is a usb device on the USB bus. That is when using:

so thats why I would use the term 'bricked'. It has happened to 2 makerdevice devices for me. Initially after flashing (using instructions from here https://github.com/koush/vysor.io/wiki/Vysor-Dongle#makerdiary-dongle) everything was recognised by Vysor, but I was getting inconsistent results, so I disconnected the USB to allow me to start the process over to help troubleshoot and after reinserting the device was dead.

So I really appreciate that you are likely busy, but is there anything we can do to help you to help us resolve this ? For example i'm in Australia but I could ship you one of the bricked devices if you think that would help for you to identify what the issue could be etc. Any help appreciated to try and identify how this could be happening.

Edit: I also remembered that I also tried to use nordic semiconductors software to recover the devices (as I understand that MakerDiary use nordic chips) but that didn't see the device at all.

@michmill1970
Copy link

I was wondering and hoping there might be an update on this issue? Is there any way to recover the dongles?

@caizelin
Copy link

caizelin commented Nov 9, 2023

@koush I confirm that no hardware changes on nRF52840 MDK USB Dongle, just upgrade the UF2 Bootloader to 0.7.1. I think the Vysor dongle firmware is running ZephyrOS. So if the source code is available, I can fix this firmware issue.

@tiny1990
Copy link

It seems makerdiary has changed their original hardware recently and it now ships with a new bootloader (July 2023). I highly doubt these things are actually bricked. https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/programming/uf2boot/

You might be able to recover by checking their sites. But it's possible the original flashing file is not compatible with the new boot loader.

so which version is compatible?

@koush
Copy link
Owner

koush commented Nov 16, 2023

@koush I confirm that no hardware changes on nRF52840 MDK USB Dongle, just upgrade the UF2 Bootloader to 0.7.1. I think the Vysor dongle firmware is running ZephyrOS. So if the source code is available, I can fix this firmware issue.

Are you saying a rebuild with a newer version of zephyr will fix this? @caizelin

@caizelin
Copy link

@koush To work better with UF2 Bootloader, we should use the correct flash partition table. Here is the flash partition table compatible with UF2 bootloader:
https://github.com/makerdiary/ncs-playground/blob/main/boards/arm/dongle_nrf52840/fstab-uf2-bootloader.dts

@tiny1990
Copy link

@koush To work better with UF2 Bootloader, we should use the correct flash partition table. Here is the flash partition table compatible with UF2 bootloader: https://github.com/makerdiary/ncs-playground/blob/main/boards/arm/dongle_nrf52840/fstab-uf2-bootloader.dts

hope to fix it

@robertr64
Copy link

I bought a MakerDiary dongle to work with Vysor on the Iphone a few days ago from Amazon, and am experiencing the same problem with a bricked USB device after flashing the OS. It sees the dongle once, then never again, and won't respond to the white button after the flash. I'm visually impaired, so not too good with jumper cables, etc. Sent one device back and had the same problem with the second one. Is there a work-around, or will the other brand of dongle solve the issue?

@robertr64
Copy link

Will the Adafruit or Seeed dongles on Amazon work ok with Vysor and IOS, or has anyone had success flashing a recent Nordic model? I'm not ready to try the ESP32, as the connections seem a bit more complicated.

@koush
Copy link
Owner

koush commented Nov 27, 2023

ESP32 is very easy to flash and 100% reliable. They haven't changed in ages.

@robertr64
Copy link

robertr64 commented Nov 27, 2023 via email

@koush
Copy link
Owner

koush commented Nov 27, 2023

the gpio pins are not used. they're microusb typically

@georgala
Copy link
Author

georgala commented Nov 28, 2023

Hi @robertr64
I tried with the next nrf52840 recommended dongle: https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle
and it worked successfully. Its easy to program and vysor recognized it immediately.

@robertr64
Copy link

robertr64 commented Nov 28, 2023 via email

@caizelin
Copy link

@georgala I just converted firmware works on nrf52840-dongle and it also work well on nRF52840 MDK USB Dongle. Here is the working uf2 firmware:
zephyr_vysor.uf2.zip

Just unzip it and copy the .uf2 file to the UF2BOOT drive.

@georgala
Copy link
Author

georgala commented Nov 28, 2023

Hi @caizelin,

Thanks for sharing this. I cant try it now because i haven't recovered the bricked nRF52840 MDK USB Dongle yet, but since you tried it successfully then @koush can include it officially on his flashing instructions for MakerDiary dongle.

@tiny1990
Copy link

@georgala I just converted firmware works on nrf52840-dongle and it also work well on nRF52840 MDK USB Dongle. Here is the working uf2 firmware: zephyr_vysor.uf2.zip

Just unzip it and copy the .uf2 file to the UF2BOOT drive.

makerdiary on the way, Can you explain how to use it?

@Zshay2203
Copy link

ESP32 is very easy to flash and 100% reliable. They haven't changed in ages.

I did try flashing Visor's software on a non-official ESP32 card, which has ESP32-WROOM32, but unfortunately it failed to run.
Is there anyone who had better experience than mine?
Thanks

@Zshay2203
Copy link

Ok, thanks, I’ll try that one.Bob RodriguezOn Nov 28, 2023, at 10:56 AM, georgala @.> wrote: Hi @robertr64 I tried with the next nrf52840 recommended dongle: https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle and it worked successfully. Its easy to program and vysor recognised it immediately. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

Hi,
I also managed to successfully flash the dongle, and it functioned very good with the iPhone and Vysor's software.
Unfortunately, after disconnecting it and reconnecting it to the USB port, the dongle turned into a Brick. it is no longer recognizable by the Mac so there's no way to use it.
Is there anyone who had managed to turn the bricked dongle into a functioning USB device?
Thanks

@mdavidi-mono
Copy link

Hello,

i am stuck on the same point
I've purchased makerdiary USB dongles and I followed the instructions here and downloaded the zephyr.uf2 image linked. I copy the zephyr.uf2 images to the drive and then the LED flashes red indicating it's flashing then the UF2BOOT volume disconnects. At this point the LED never comes on and I can't recover as the Zephyr images doesn't load and I can no longer access UF2BOOT.

can someone help to roll back from this point to CURRENT.uf2 file or delete the zephyr.uf2 from makerdiary USB dongles?

Thanks

@wingy3181
Copy link

wingy3181 commented Dec 29, 2023

This just happened to me as well.......

Now my device is also bricked and just reading this thread and the following sites to debug in external mode to try and recover by re-installing the bootloader?

However, i don't have a second device nor a Pitaya-Link debug probe to try this

Anyhow, is it worth updating the wiki about this issue to avoid people running into this issue? @koush
or update the working uf2 firmware as per #1340 (comment)?

@georgala I guess you didn't try the external debugger and instead decided to purchase the next dongle (https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle) as per your comment

@wingy3181
Copy link

wingy3181 commented Dec 29, 2023

Hello,

i am stuck on the same point I've purchased makerdiary USB dongles and I followed the instructions here and downloaded the zephyr.uf2 image linked. I copy the zephyr.uf2 images to the drive and then the LED flashes red indicating it's flashing then the UF2BOOT volume disconnects. At this point the LED never comes on and I can't recover as the Zephyr images doesn't load and I can no longer access UF2BOOT.

can someone help to roll back from this point to CURRENT.uf2 file or delete the zephyr.uf2 from makerdiary USB dongles?

Thanks

Follow either instructions:

UPDATE

Can confirm I was able to unbrick my dongle following instructions using https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/programming/daplink/ and using pyOCD with firmware (https://github.com/makerdiary/nrf52840-mdk-usb-dongle/blob/main/firmware/uf2_bootloader/0.7.1/uf2_bootloader-nrf52840_mdk_usb_dongle-0.7.1-nosd.hex)

Also test it loading loading the bluetooth connectivity firmware from https://github.com/makerdiary/nrf52840-mdk-usb-dongle/blob/main/firmware/ble_connectivity/connectivity_4.1.4_usb_with_s132_5.1.0.hex and following the quickstart guide and it also worked.
See below for pyocd commands that I ran

user@machine: ~/tmp
$ pyocd list 
  #   Probe/Board              Unique ID                                          Target           
---------------------------------------------------------------------------------------------------
  0   Arm NRF52840 CMSIS-DAP   123456789012345678901234567890123456789012345   ✖︎ nrf52840_xxaa  
      Makerdiary               nRF52840-MDK-USB-Dongle                                             

user@machine: ~/tmp
$ pyocd erase -t nrf52840 --chip

user@machine: ~/tmp
$ pyocd load -t nrf52840 uf2_bootloader-nrf52840_mdk_usb_dongle-0.7.1-nosd.hex 
0000450 I Loading /Users/username/tmp/uf2_bootloader-nrf52840_mdk_usb_dongle-0.7.1-nosd.hex [load_cmd]
[==================================================] 100%
0003618 I Erased 46080 bytes (12 sectors), programmed 46080 bytes (12 pages), skipped 0 bytes (0 pages) at 14.30 kB/s [loader]

user@machine: ~/tmp
$ pyocd load -t nrf52840 connectivity_4.1.4_usb_with_s132_5.1.0.hex 
0000585 I Loading /Users/username/tmp/connectivity_4.1.4_usb_with_s132_5.1.0.hex [load_cmd]
[==================================================] 100%
0011978 I Erased 208896 bytes (51 sectors), programmed 208896 bytes (51 pages), skipped 0 bytes (0 pages) at 18.11 kB/s [loader]

Can also confirm this version of the vyysor firmware works as well

@georgala I just converted firmware works on nrf52840-dongle and it also work well on nRF52840 MDK USB Dongle. Here is the working uf2 firmware: zephyr_vysor.uf2.zip

Just unzip it and copy the .uf2 file to the UF2BOOT drive.

@halls
Copy link

halls commented Jan 16, 2024

@georgala I just converted firmware works on nrf52840-dongle and it also work well on nRF52840 MDK USB Dongle. Here is the working uf2 firmware: zephyr_vysor.uf2.zip

Just unzip it and copy the .uf2 file to the UF2BOOT drive.

I have the second Makerdiary just arrived, the first one was bricked as described in the initial post here.
I've copied .uf2 file from the link above, it looks alive this time and Vysor recognizes it but none of my devices can connect to it (various models and iOS versions):
photo_2024-01-15_22-30-46

Such prompt appears for a second and then disappears, no luck.

I also have nrf52840 from Nordic and it behaves the same way as already described here: #1157
@koush we are looking forward to resolving it please.

@vozer
Copy link

vozer commented Feb 5, 2024

I also just bricked my dongle and i don't have the money to just buy another one and try rewiring.
This could have been easily avoidable, @koush you need to please update your documentation! At least take off the link to the firmware and give a warning note.

@SotoiGhost
Copy link

@halls The code appears on Vysor when you try to connect.

I've tried the fixed zephyr_vysor.uf2.zip from @caizelin's comment and it's working perfectly! Thank you!

@itelo
Copy link

itelo commented Apr 16, 2024

I just bricked my dongle. I don't understand why @koush couldn't update the link. It's just a markdown file. I won't buy another dongle after this experience, so Vysor lost a client.

@linzehui
Copy link

linzehui commented Apr 23, 2024

Hi @robertr64 I tried with the next nrf52840 recommended dongle: https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle and it worked successfully. Its easy to program and vysor recognized it immediately.

Hi @georgala ,
Could you please tell me what desktop OS you are using and iOS device? Thanks in advance!

@robertr64
Copy link

robertr64 commented Apr 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests