NIO 12L Download Mode issues

Hello!

I’m trying flash my NIO 12L with an Ubuntu image but it seems that I cannot set it into Download Mode. After pressing the download button I can see that a USB ACM device gets created but then after 4-5 seconds it gets disconnected:

Jan 03 13:58:22 arcturus kernel: usb 7-2: new high-speed USB device number 10 using xhci_hcd
Jan 03 13:58:22 arcturus kernel: usb 7-2: New USB device found, idVendor=0e8d, idProduct=0003,  bcdDevice= 1.00
Jan 03 13:58:22 arcturus kernel: usb 7-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan 03 13:58:22 arcturus kernel: cdc_acm 7-2:1.0: ttyACM0: USB ACM device
Jan 03 13:58:22 arcturus mtp-probe[20422]: checking bus 7, device 10: "/sys/devices/pci0000:00/0000:00:08.1/0000:15:00.4/usb7/7-2"
Jan 03 13:58:22 arcturus mtp-probe[20422]: bus: 7, device: 10 was not an MTP device
Jan 03 13:58:22 arcturus snapd[1405]: hotplug.go:200: hotplug device add event ignored, enable experimental.hotplug
Jan 03 13:58:22 arcturus mtp-probe[20425]: checking bus 7, device 10: "/sys/devices/pci0000:00/0000:00:08.1/0000:15:00.4/usb7/7-2"
Jan 03 13:58:22 arcturus mtp-probe[20425]: bus: 7, device: 10 was not an MTP device
Jan 03 13:58:26 arcturus kernel: usb 7-2: USB disconnect, device number 10

The SP_Flash_Tool sees the device but ultimately fails to flash it (probably due to the fact that it goes away):

Search usb, timeout set as 3600000 ms
add@/devices/pci0000:00/0000:00:02.1/0000:03:00.0/0000:04:0c.0/0000:12:00.0/usb3/3-1
add@/devices/pci0000:00/0000:00:02.1/0000:03:00.0/0000:04:0c.0/0000:12:00.0/usb3/3-1/3-1:1.0

add@/devices/pci0000:00/0000:00:02.1/0000:03:00.0/0000:04:0c.0/0000:12:00.0/usb3/3-1/3- 1:1.0/tty/ttyACM0

vid is 0e8d

device vid = 0e8d

pid is 0003

device pid = 0003

com portName is: /dev/ttyACM0

Total wait time = -1735908101.000000
USB port is obtained. path name(/dev/ttyACM0), port name(/dev/ttyACM0)
USB port detected: /dev/ttyACM0
Connect BROM failed: STATUS_ERR(-1073676287)
Disconnect!
Exception: err_code[-1073676287], err_msg[ ERROR : STATUS_ERR (-1073676287) , MSP ERROE 
CODE : 0x00. 


[HINT]:
]

Logger deinited.%   

The device boots into the pre-installed Yocto image so I’m sure it’s not entirely bricked. I’ve tried multiple cables and host computers (linux) with the same result. Does anyone have any ideas of how to proceed?

Update:

I was able to erase and flash the device using windows tools (:expressionless:). I can now boot the Radaxa Ubuntu image, however I can’t seem to get any HDMI output. Serial console / ssh works though.

I encountered this issue on my AM4 based PC. Those have a hardware USB flaw. Is yours host also AMD based? I’d recommend using a different host and genio-flash under linux (ubuntu jammy or Debian 12)

I encountered this issue on my AM4 based PC. Those have a hardware USB flaw. Is yours host also AMD based? I’d recommend using a different host and genio-flash under linux (ubuntu jammy or Debian 12)

I tried 4 different hosts, only one was AM4 based. OS selection was Ubuntu 22.04, 24.04 and Debian 12. Not sure if it’s a factor but all Linux hosts had kernel >= 6.1. I’ll investigate this further when I have time over :slight_smile:.

Luckily I had one laptop with a Windows / Ubuntu 24.04 dual-boot setup that I could use for flashing. I doubt that it is a hardware flaw since I was able to flash from Windows but not Ubuntu running on the same hardware.

Hello all,

I am having the exact same issue. I am not able to enter in download mode.
/dev/ttyACM0 get created but then after few secs, get disconnected.
No matter what I do. I followed all instructions of online docs.
I also tried several hosts in my lab.
All of them installed fresh just for this job, Ubuntu 20 and 22.
Packages requirements satisfied. Tried with good quality usb-c cables.
Connected USB serial monitor to 40-pins male header.
The serial output continue cycling, after u-boot, kernel booting but then reboot.
Download mode is skipped. Board hardware is fine, it is a software problem.

I searched a lot online and it looks like this is a common problem with Mediatek hardware, sometime it is related to ModemManger assuming the control of /dev/ttyACM0. At Radxa, why did you recommend to install it? Many says to disable it or to remove it, which I did but the issue persisted.
Further about your instructions, they are not clear about the timing of pressing down the download button. Looks like it works once but then you say to press it a second time which doesn’t do anything.
I tried hundreds of combinations but no solution.
I suspect there are more than one software problem.

Radxa, I have also a doubt about the external USB-C wall power supply but I need you confirm this.
Could you confirm that we don’t need the power supply at the type-c connector at the corner?
You do not mention to connect the power supply and it shouldn’t be required right?
Without it the board boots, the host is powering the board via the middle OTG usb type-c connector. I tried with the external wall power supply connected and without. If power supply is connected the board boot normally even if I try to put it in download mode. Without power supply the LED is blinking green, with it is steady green during booting.

I already spent 3 days attempting to solve this issue.
This issue prevents me to install any images.
I don’t use any windows crap since 2001.

Clearly the online instructions are not enough.

Does anybody from Radxa could assist us?
How do you enter in download mode from Ubuntu?
Could we have a step by step procedure other than the one published on your documentation site?

These are not working:

https://docs.radxa.com/en/nio/nio12l/installation/format-ufs
https://docs.radxa.com/en/nio/nio12l/installation/install-yocto-image-on-linux-pc

Thank you so much.

Hello,

Radxa is there any update on this issue? Today is already the 7th day of fight.
I continue to see in terminal the same error code of the other user, no matter what I do:

+++

com portName is: /dev/ttyACM0

Total wait time = -1736247003.000000
USB port is obtained. path name(/dev/ttyACM0), port name(/dev/ttyACM0)
USB port detected: /dev/ttyACM0
Connect BROM failed: STATUS_ERR(-1073676287)
Disconnect!
Exception: err_code[-1073676287], err_msg[ ERROR : STATUS_ERR (-1073676287) , MSP ERROE CODE : 0x00.
+++

further debugging:

I tried to enable logging inside file format.xml to have some debugging but inserting a real fullpath directory doesn’t have any effect because logging is still not working. Logging would be very useful. I suspect the error originate inside the SP flash tool because I tried everything possible imaginable at Linux side.

What I tried:

  • journalctl debugging of udev rules and apparently everything looks fine
  • debugging the permissions of port, everything ok, genio-config reports:
    +++
    fastboot: OK
    udev rules: OK (md5: a3b2767b42ee01d7c62bf394400528ae)
    Serial device write access: OK
    +++
  • running the flash tool as root and normal user, just in case…
  • used several usb-c cables
  • used several Linux hosts with fresh install of Ubuntu 20 and 22
  • with and without ModemManager
  • blocking and not MTP probe of Ubuntu
  • blacklisting and not any other Linux modules that use USB

The board boots fine normally, I can see the serial monitor connected to the 40-pins male header.

A reason of the issue could be the DA agent distributed with the sp_flash_tool is not compatible anymore with the MT8395. So it generates an authentication error and it doesn’t connect.

Radxa could you confirm this?

On Radxa documentation website, you published another version of the tool, down into “resource download” section. Apparently is the same tool but version 5.2152 instead of 5.2120 adding also the undocumented protocol V6? There is no documentation about how to use it and if V5 or V6.
Also what is “tool selector”?
It asks for xml file, tried to use format.xml but it says to use another xml with a strange path and a filename that doesn’t exist anywhere.

Radxa, do you want us to use this other tool at:

instead the other you say to use at:

https://docs.radxa.com/en/nio/nio12l/installation/format-ufs

?

Please advise.

Thank you so much.

@pon1980

Hello, how did you do to format the UFS under Windows?
Apparently it is only possible under Linux.
Could you confirm please?
Did you flash without formatting?

Thank you so much.

@seaman

It’s a hack really so I don’t know if it has any nasty side effects. It did seem to work for me though. This is what I did:

  1. Download the windows flashtool SP_Flash_Tool.
  2. Download the android image (it contains a scatter xml that the flash tool selector needs).
  3. Open the flash tool selector and use the scatter xml from the androide image zip.
  4. Select the format tab and proceed with formatting the UFS from there.
  5. Follow the steps in the Guide for flashing the device with the Ubuntu image.

sp_select_scatter_file

1 Like

Hello,

I will try your procedure, I appreciate your help.
I didn’t imagine to use any Android image files from a Windows machine to be allowed to format UFS and maybe later install a Linux image, it is a bit twisted, we are designing a product and it doesn’t look like feasible during the massive production. But this at least could save my prototyping days here. Thank you so much @pon1980

Radxa could you confirm that we are not destroying anything with this procedure?

Anyway, the second step will be still flashing the image after formatting UFS. Running genio-flash in Linux, I get the same error output code above so this second step needs to be guessed as you did, it wil be also a bit twisted to get working.

I think that Radxa should step in to provide a revised procedure to format and install the images, these Mediatek SOC based boards are not cheap. A bit of after-sale support would be greatly appreciated. There should be a way for Radxa to do the things in their labs, it is just a matter of updating the documentation.

I still think that the DA file provided into the packages still needs to be updated in order to recognize the attached board via USB-C. Does anybody else has the same problem? If you succeeded, what did you do? what is your setup environment? what did you use?

Radxa could you help?

Thank you all.

I will try your procedure, I appreciate your help. I didn’t imagine to use any Android image files from a Windows machine to be allowed to format UFS and maybe later install a Linux image, it is a bit twisted, we are designing a product and it doesn’t look like feasible during the massive production. But this at least could save my prototyping days here. Thank you so much @pon1980

Totally agree that the procedure is twisted. I discovered the formatting option when playing with the windows flashtool and thought I could give it a shot since I ordered multiple boards and could sacrifice one in case it would brick the device.

Just to clarify: to flash the device with the Ubuntu image I followed the windows procedure and did not attempt to flash it using the genio tools on Linux.

That said I definitely prefer to use Linux hosts for flashing.

1 Like

UPDATE and good news:

Hello,

following the instructions provided by @pon1980 above, I was able to flash Yocto from a temporary windows machine looking also at the Radxa steps documented for the Ubuntu installation. The procedure provided by Radxa for to flash Yocto from Linux is not working. The same procedure should also works to flash Ubuntu images from windows.

Apparently, there is also no need of formatting the UFS partition before flashing, so you can avoid using the SP flash tool at all. Instead you can do everything running genio-flash. I will report here if in the future I discover any hidden issues. During the flashing, genio-flash seems taking care of erasing the UFS before flashing, you can see it into the output of terminal window following the operations performed.
Then, I was able to boot my custom built Yocto image after power cycling with the power button.

The procedure documented at the Radxa doc website, for to flash from Linux, is not working but it is probably due because a problem of the Mediatek SP flash tool. It is not a friend of the USB subsystem of Linux. This looks like a Mediatek software problem and not Radxa problem. Radxa could be able to get a direct contact with Mediatek engineers to talk with them to ask what they do internally to flash the images from Linux. Then please Radxa, if you have any news, please update the online docs with procedures.

Problem hunt:

I will try to use another Linux distribution without systemd because I suspect it is also involved with the dealing of ttyACM0 device and the poor implemented Mediatek flash tool.
The problems could be with auto probing of MTP device and with ModemManager, these are not confirmed but they come out during the debugging of the handshacking. Other users from other forums reported online having the same problems. Linux logs are not very useful even with all debug enabled.
SP flash tool doesn’t produce any logging even if enabled into format.xml file.
Ubuntu, Debian, Arch Linux are all using systemd so they are not good candidates for further debugging. This issue is so popular online, there are countless posts about it. There should be a solution, the problem is hidden somewhere and I need to find it in order to make our future product suitable for massive production.

There is hope because Canonical is actively involved with Mediatek, they are developing Ubuntu support for the Mediatek Genius 1200 evk, so somebody out there got it working somehow, I don’t think Canonical uses windows machines to flash what they are coding and testing:

This improvement of flashing procedure opens the business again for us because we are developing and prototyping a custom product based on Yocto with the Nio 12L board.

Thank you everybody

1 Like