koush / vysor.io

Vysor - Mirror and Control your Phone
https://vysor.io
1.56k stars 291 forks source link

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

Open georgala opened 9 months ago

georgala commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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:

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 commented 8 months ago

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

caizelin commented 8 months ago

@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 commented 8 months ago

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 commented 8 months ago

@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 commented 8 months ago

@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 commented 8 months ago

@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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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

robertr64 commented 8 months ago

Thanks, are any of those in straight dongle form? The ones I saw had a bunch of pin connections, and I’m visually impaired so not too good with hardware connections. ESPTOOL does look pretty easy, though.

Bob Rodriguez @.***

On Nov 27, 2023, at 11:45 AM, Koushik Dutta @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/koush/vysor.io/issues/1340#issuecomment-1828221462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETTZZFJ3VERKVUWOD7Y7ADYGS7UFAVCNFSM6AAAAAA6MIPUH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYGIZDCNBWGI. You are receiving this because you commented.

koush commented 8 months ago

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

georgala commented 8 months ago

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 commented 8 months ago

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: @.***>

caizelin commented 8 months ago

@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 commented 8 months ago

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 commented 8 months ago

@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 commented 8 months ago

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 commented 8 months ago

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 commented 7 months ago

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 commented 7 months ago

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 https://github.com/koush/vysor.io/issues/1340#issuecomment-1830384682?

@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 commented 7 months ago

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 commented 6 months ago

@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: https://github.com/koush/vysor.io/issues/1157 @koush we are looking forward to resolving it please.

vozer commented 5 months ago

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 commented 5 months ago

@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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

It was Windows 11 with both an Iphone 12 Pro on IOS 17 and an Ipad. I did have a glitch with the ipad where it was only able to access half of the screen, but the iphone worked well.

Bob Rodriguez @.***

On Apr 23, 2024, at 8:24 AM, Lin Zehui @.***> wrote:

Hi @robertr64 https://github.com/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, Could you please tell me what desktop OS you are using and iOS device? Thanks in advance!

— Reply to this email directly, view it on GitHub https://github.com/koush/vysor.io/issues/1340#issuecomment-2072163086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETTZZDBIZSPWYUSNMIO7T3Y6ZHHHAVCNFSM6AAAAAA6MIPUH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZSGE3DGMBYGY. You are receiving this because you were mentioned.