PINE64
Fail safe way to update ANX7688 firmware - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122)
+--- Thread: Fail safe way to update ANX7688 firmware (/showthread.php?tid=13001)

Pages: 1 2 3


RE: Fail safe way to update ANX7688 firmware - z3dd1cu55 - 02-17-2021

sorry for the maybe dumb question. But what's a "serial debug cable"


RE: Fail safe way to update ANX7688 firmware - LazLong - 02-17-2021

(02-17-2021, 01:54 PM)z3dd1cu55 Wrote: sorry for the maybe dumb question. But what's a "serial debug cable"
No dumb questions.

It is a 'usb to serial' adapter/cable device used to commmunicate and monitor/debug the boot up and system processes in single board computers and other devices.

Check out the wiki: https://wiki.pine64.org/wiki/PinePhone#Serial_console

Note that a search in the forum with keywords such as 'Serial Console", "Serial Debug" "Serial Cable" will retrieve multiple discussions including a 3.3V/5V controversy regarding the PINEBOOK(Pro)/PINEPHONE/PINETAB SERIAL CONSOLE offered for $6.99 in the Pine Store

Various serial console debug devices are available from other retailers.  They may be either based on the CH340 or the FTDI TTL-232R chipset.  I have a FTDI.

Others may have words of wisdom.  Welcome and good luck.


RE: Fail safe way to update ANX7688 firmware - z3dd1cu55 - 02-18-2021

(02-17-2021, 03:38 PM)LazLong Wrote:
(02-17-2021, 01:54 PM)z3dd1cu55 Wrote: sorry for the maybe dumb question. But what's a "serial debug cable"
No dumb questions.

It is a 'usb to serial' adapter/cable device used to commmunicate and monitor/debug the boot up and system processes in single board computers and other devices.

Check out the wiki: https://wiki.pine64.org/wiki/PinePhone#Serial_console

Note that a search in the forum with keywords such as 'Serial Console", "Serial Debug" "Serial Cable" will retrieve multiple discussions including a 3.3V/5V controversy regarding the PINEBOOK(Pro)/PINEPHONE/PINETAB SERIAL CONSOLE offered for $6.99 in the Pine Store

Various serial console debug devices are available from other retailers.  They may be either based on the CH340 or the FTDI TTL-232R chipset.  I have a FTDI.

Others may have words of wisdom.  Welcome and good luck.

Thanks for the answere.

So if I already have USB <-> D-Sub 9 adapter. Would it work to make a D-Sub 9 to headphone adapter by using one of each splicing the cables and connect the cables with the right pin order?

And if I had a working serial debug cable, when would I log in to set the bit for eeprom flash? Anytime after the normal boot? Or do I need to stop the bootloader from booting the kernel?
Do I need this serial debug cable or can I set the bit from userland?

Any feedback is appreciated Smile


RE: Fail safe way to update ANX7688 firmware - zborgerd - 02-18-2021

(02-18-2021, 02:08 PM)z3dd1cu55 Wrote: Thanks for the answere.

So if I already have USB <-> D-Sub 9 adapter. Would it work to make a D-Sub 9 to headphone adapter by using one of each splicing the cables and connect the cables with the right pin order?

And if I had a working serial debug cable, when would I log in to set the bit for eeprom flash? Anytime after the normal boot? Or do I need to stop the bootloader from booting the kernel?
Do I need this serial debug cable or can I set the bit from userland?

Any feedback is appreciated Smile


Technically yes. But It's out of spec for RS-232 being that it's only 3.3v, so I wouldn't personally recommend plugging in a real USB RS-232 device. If it's got a 9 pin D-sub, it's probably RS-232. Something that's a 3.3V UART is a better choice (no RS-232 level shifting) like the CP2102. I don't like any CH340s. They are cheap junk. FTDI or CP2102 only.

If you're just flashing the ANX chip, you don't need to use this. I did it over Ethernet just fine. You probably could also just connect USB directly and log in via the USB LAN if you enable SSH on your device, but it depends upon the distribution that you are using. Yes, you can and would do it during normal operation while the OS is running as normal. I accomplished this on Mobian even on 5.10 kernel contrary to claims that claim that you cannot.

To be honest, you can and should be doing almost anything over SSH if you need to do it from a desktop computer. I don't know why anyone would want to use the "serial console" feature of the PinePhone unless they were making something silly like an IR emitter or very basic communication to an external microcontroller.


RE: Fail safe way to update ANX7688 firmware - wibble - 02-19-2021

The serial console is useful for debugging boot issues, and for when you can't connect to the phone any other way. It's not something you'd want to use every day, but occasionally it's the only option.


RE: Fail safe way to update ANX7688 firmware - scholbert - 02-21-2021

Hey,

you definitely should make sure that you use TTL-levels of 3.3V for the serial cable.
Please do not use true RS232 cables as they might damage the logic inside the pinephone.
BTW i use this type of cable:
https://ftdichip.com/products/ttl-232r-3v3-aj/

Regards,
scholbert


RE: Fail safe way to update ANX7688 firmware - MtnSk8 - 02-28-2021

Hi, is the serial cable the only way into the pmos test image? I booted it, and it loaded the test utility and the automatic test bricked my modem after hanging on the "Upgrading EG25" (no idea why it was not just a "test" like the button I clicked suggested Smile .  Anyway my modem is not detected by any os and I don't have a serial cable. OP says "easiest way" but is it the only way? can I use a keyboard?

Thanks.


RE: Fail safe way to update ANX7688 firmware - scholbert - 03-01-2021

(02-28-2021, 10:03 AM)MtnSk8 Wrote: Hi, is the serial cable the only way into the pmos test image? I booted it, and it loaded the test utility and the automatic test bricked my modem after hanging on the "Upgrading EG25" (no idea why it was not just a "test" like the button I clicked suggested Smile .  Anyway my modem is not detected by any os and I don't have a serial cable. OP says "easiest way" but is it the only way? can I use a keyboard?

Thanks.

Hi MtnSk8,
i'm sorry but i can't help you out on this issue.
I guess you'll have to find out, how the pmos test images are build and how to add some kind of console access... maybe using USB cable.
I choosed this image, because it was just enough to start with and it is a fixed environment.
Though the serial cable is little bit special it just works (BTW, you'll have to switch of headphones with the kill switch).

For the bricked modem, it may help to find what the test initates when pressing the button.
Hopefully you're able to revive the modem part.

Regards,
scholbert


RE: Fail safe way to update ANX7688 firmware - Artturin - 03-03-2021

(02-09-2021, 02:33 PM)AndrewBlackmiller Wrote: Hi,

If I try to do an:

Code:
echo 1 > /sys/class/typec/port0/device/flash_eeprom

I get an error message:

Code:
bash: echo: write error: Argument list too long

Would anybody be so kind to help me out pls!

Many thanks!
Andrew >:o)

if you used wget then did you wget https://xff.cz/git/linux-firmware/tree/anx7688-fw.bin or https://xff.cz/git/linux-firmware/plain/anx7688-fw.bin

you need to use the plain url or click the plain link on the webpage


RE: Fail safe way to update ANX7688 firmware - Artturin - 03-03-2021

Remember to not have a dock plugged in while doing this because when I ran the command the kernel panicked and i couldn't boot without having the dock plugged in.
might be the same thing with a charger too

I fixed it by booting with the dock plugged in then and then replugging it so that the anx7688 kernel module loads, after that i flashed it again and now it boots without the dock.

also remember to reboot without a charger or a dock installed

I used the manjaro kde factory image it has 5.9