Skip to main content
Topic: firmware update fail: PGND and PGC not connected (Read 466 times) previous topic - next topic

firmware update fail: PGND and PGC not connected

I have placed my 3.6 board into bootloader mode (version 4.4) like:

Code: [Select]
HiZ>$
Are you sure? y
BOOTLOADER
BL4+

but my pirate-loader_lnx --hello fails like:

Code: [Select]
sudo ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hello
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.2  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Opening serial device /dev/ttyUSB0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...ERROR
No reply from the bootloader, or invalid reply received: 0
Please make sure that PGND and PGC are connected, replug the devide and try again
When I try to update the firmware it has the same error. I jumpered the PGD and PGC pins together, should I be doing something else? I thought the jumpers were only needed on older hardware which doesn't have the command line method implemented yet? I tried it without jumpers first.

Re: firmware update fail: PGND and PGC not connected

Reply #1
Both methods should work. Jumper method is for older boards that don't have the command line option.

When you get into bootloader mode, can you press some keys a few times? This should print out "BL4+", it seems like either this is not the case or pirate loader is not picking it up.

Re: firmware update fail: PGND and PGC not connected

Reply #2
Yes, when I hit a few different keystrokes, I get:

Code: [Select]
Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on May  6 2018, 08:02:47.
Port /dev/ttyUSB0, 15:41:05

Press CTRL-A Z for help on special keys

HiZ>$
Are you sure? y
BOOTLOADER
BL4+BL4+BL4+BL4+BL4+BL4+BL4+BL4+BL4+BL4+BL4+�K
But when I try the --hello in another browser tab with /dev/ttyUSB0, I still get the same error. Weirdly enough, I have two identical BP's and both do the same thing:
Code: [Select]
sudo ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hello
[sudo] password for user:
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.2  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Opening serial device /dev/ttyUSB0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...ERROR
No reply from the bootloader, or invalid reply received: 0
Please make sure that PGND and PGC are connected, replug the devide and try again
I've also tried from another Linux laptop and got the same results, which are the same on both the board with the soldered jumper, and the one without.

Re: firmware update fail: PGND and PGC not connected

Reply #3
Are you by any chance connected to BP via Minicom while trying to use pirate-loader? I would expect that to fail at opening serial device part but still sth to look at.

Both BP's doing the same thing is highly suspicious. Can you just short PGC and PGD, plug it in and then try running pirate-loader?

Re: firmware update fail: PGND and PGC not connected

Reply #4
could you provide the current bootloader and the current Firmware you have on your BP(s)?

you can display that information while in high impedance mode,

Code: [Select]
HiZ>i

Also, I haven't used minicom in a while, but me personally I'd use GNU screen to connect to your BP if you can. I use the below command to connect to my BP

Code: [Select]
screen /dev/tty.usbserial-A700dzDq 115200

Generally you just have to specify the hardware device your BP is listed as on your file system for my case it is the /dev/tty.usbserial-** device, the A700dzDq refers to the BP serial number specific to my device, and you're going to want to specify the baudrate for connecting to the device, and if your connection goes well, then you should see the high impedance prompt,

NOTE: you may to press enter after running the above screen command to enter the high impedance mode, ie. just press enter twice.

Code: [Select]
HiZ>

if you want  to exit out from the session, just unplug your BP and your screen session should terminate, or you can use

Code: [Select]
Control+A followed by k, then press y to terminate the screen session

and you can use the above steps to reconnect to the pirate.
also known as ipatch on these forums, account got locked out during the upgrade 🤷‍♂️
...shit happens

Re: firmware update fail: PGND and PGC not connected

Reply #5
Screen worked :) Sort of...well, I got further:

Code: [Select]
screen /dev/ttyUSB0 115200
HiZ>i
Bus Pirate v3b
Firmware v5.10 (r559)  Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com
HiZ>$
Are you sure? y
BOOTLOADER
BL4+BL4+BL4+
and then
Code: [Select]
sudo ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hello
[sudo] password for user:
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.2  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Opening serial device /dev/ttyUSB0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK

Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
Now I try to update firmware like:
Code: [Select]
Bus_Pirate/package/BPv3-firmware$ sudo ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hex=BPv3-firmware-v6.3-r2151.hex
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.2  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [BPv3-firmware-v6.3-r2151.hex]
Found 21502 words (64506 bytes)
Fixing bootloader/userprogram jumps
Opening serial device /dev/ttyUSB0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...ERROR
No reply from the bootloader, or invalid reply received: 0
Please make sure that PGND and PGC are connected, replug the devide and try again
So I tried it again, and got further:
Code: [Select]
user:~/Downloads/Bus_Pirate/package/BPv3-firmware$ sudo ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hex=BPv3-firmware-v6.3-r2151.hex
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.2  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [BPv3-firmware-v6.3-r2151.hex]
Found 21502 words (64506 bytes)
Fixing bootloader/userprogram jumps
Opening serial device /dev/ttyUSB0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK

Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
Erasing page 0, 0000...OK
Writing page 0 row 0, 0000...OK
Writing page 0 row 1, 0080...OK
Writing page 0 row 2, 0100...OK
Writing page 0 row 3, 0180...OK
Writing page 0 row 4, 0200...ERROR

Error updating firmware :(
user@:> /BPv3-firmware$ sudo ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hex=BPv3-firmware-v6.3-r2151.hex
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.2  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [BPv3-firmware-v6.3-r2151.hex]
Found 21502 words (64506 bytes)
Fixing bootloader/userprogram jumps
Opening serial device /dev/ttyUSB0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK

Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
Erasing page 0, 0000...OK
Writing page 0 row 0, 0000...ERROR

Error updating firmware :(

So is my communication somehow becoming corrupt, or corrupt firmware or?

Re: firmware update fail: PGND and PGC not connected

Reply #6
Somehow communication getting corrupted. With both Bus Pirates showing the same symptoms I'll suggest changing USB cables and trying a different USB port. If you are using a USB hub in between, try to eliminate that.

Re: firmware update fail: PGND and PGC not connected

Reply #7
I tried again, but now the unit is unresponsive, can't get a prompt with either screen or minicom. I plugged in the other unit with the same setup and got a command prompt. How do I unbrick these devices? Also, how do I get the other one out of bootloader mode?

Re: firmware update fail: PGND and PGC not connected

Reply #8
read the output of your log statements.

did you place a jumper between PGC & PGD ?

you need to do that in order to update the firmware.
also known as ipatch on these forums, account got locked out during the upgrade 🤷‍♂️
...shit happens

Re: firmware update fail: PGND and PGC not connected

Reply #9
I tried to do a firmware update with the other board (the one with the jumpers), it did the same thing, failed midway through update. How do I get the unit out of bootloader mode now? I don't want to power it off in case it does the same thing as the other one and bricks.

Code: [Select]
sudo ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hex=BPv3-firmware-v6.3-r2151.hex
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.2  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [BPv3-firmware-v6.3-r2151.hex]
Found 21502 words (64506 bytes)
Fixing bootloader/userprogram jumps
Opening serial device /dev/ttyUSB0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK

Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
Erasing page 0, 0000...OK
Writing page 0 row 0, 0000...OK
Writing page 0 row 1, 0080...ERROR

Error updating firmware :(

I waited a minute and then did it failed farther along:

Code: [Select]
sudo ./pirate-loader_lnx --dev=/dev/ttyUSB0 --hex=BPv3-firmware-v6.3-r2151.hex
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+ 
  Loader version: 1.0.2  OS: Linux
+++++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [BPv3-firmware-v6.3-r2151.hex]
Found 21502 words (64506 bytes)
Fixing bootloader/userprogram jumps
Opening serial device /dev/ttyUSB0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK

Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
Erasing page 0, 0000...OK
Writing page 0 row 0, 0000...OK
Writing page 0 row 1, 0080...OK
Writing page 0 row 2, 0100...OK
Writing page 0 row 3, 0180...OK
Writing page 0 row 4, 0200...OK
Writing page 0 row 5, 0280...OK
Writing page 0 row 6, 0300...OK
Writing page 0 row 7, 0380...OK
Erasing page 1, 0400...OK
Writing page 1 row 8, 0400...OK
Writing page 1 row 9, 0480...OK
Writing page 1 row 10, 0500...OK
Writing page 1 row 11, 0580...OK
Writing page 1 row 12, 0600...OK
Writing page 1 row 13, 0680...OK
Writing page 1 row 14, 0700...OK
Writing page 1 row 15, 0780...OK
Erasing page 2, 0800...OK
Writing page 2 row 16, 0800...OK
Writing page 2 row 17, 0880...OK
Writing page 2 row 18, 0900...OK
Writing page 2 row 19, 0980...OK
Writing page 2 row 20, 0a00...OK
Writing page 2 row 21, 0a80...OK
Writing page 2 row 22, 0b00...OK
Writing page 2 row 23, 0b80...OK
Erasing page 3, 0c00...OK
Writing page 3 row 24, 0c00...OK
Writing page 3 row 25, 0c80...OK
Writing page 3 row 26, 0d00...OK
Writing page 3 row 27, 0d80...OK
Writing page 3 row 28, 0e00...OK
Writing page 3 row 29, 0e80...OK
Writing page 3 row 30, 0f00...OK
Writing page 3 row 31, 0f80...OK
Erasing page 4, 1000...OK
Writing page 4 row 32, 1000...OK
Writing page 4 row 33, 1080...OK
Writing page 4 row 34, 1100...OK
Writing page 4 row 35, 1180...OK
Writing page 4 row 36, 1200...OK
Writing page 4 row 37, 1280...OK
Writing page 4 row 38, 1300...ERROR

Error updating firmware :(

Re: firmware update fail: PGND and PGC not connected

Reply #10
Failed firmware update will not overwrite the bootloader, you can remove them. You can jumper PGC and PGD and then plug it in and it will come up in bootloader mode.

Did you try changing USB cables or switching ports as I suggested? Also where did you get your Bus Pirates from?

 

Re: firmware update fail: PGND and PGC not connected

Reply #11
I tried swapping cables, changing laptops and running both mincom and screen, but it still fails partway (random) through the write process.

I bought one board from Seeed, but then bought another one from Amazon because the other one was going to take a long time to get here. Both of them do the same thing.

Is the baud rate too high?