Skip to main content
Topic: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux (Read 4246 times) previous topic - next topic

Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Hi guys, Ian redirected me to the forum.
Maybe here will be more easy to get to the point and solve this.
I have a BPv3:
Firmware v2.4-Seeed
DEVID:0×0447 REVID:0×3003 (A3)

I can use it without a problem. But there is no way to update bootloader or anything.
I’ve used P24qp of v2tov41-bootloader-update-va3 package with all versions of python that are avalaible on Debian (2.1, 2.2, 2.3, 2.4, 2.5), and always got this:

Using Serial Port /dev/ttyUSB1 @ 9600
Reading 4 bytes from address 0×00FF0000
RX Error: 0 bytes received
Error reading from device!
Device with ID: 65535 not listed in the config file!

The port is there, the user have access, I can conect to de BP with any terminal, but looks like the pyton updater even doesn’t see the port.

Of course I have jumped the PGC and PGD pins before connect the BP, and it powerup with mode led light.
The port shows up on /dev as /dev/ttyUSB0 and the ownership and access are:
crw-rw---- 1 root dialout 188, 0 ene 28 19:30 /dev/ttyUSB0
My user is in the dialout group (yes, years ago before last reset).
I've tried linux version of ds30 client, even compiled just in case.
But looks like  no one of the upgrade programs, python or binary see the port.
I have a USBtiny from ladyada if it will help in case of bricking the BP.
Thx in advance.

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #1
This is a wierd problem because it seems like you can't even connect to the PIC, even though it's in bootloader mode (MODE LED on).

Do you have the pyserial module installed? It's required for the python updater.

Do you have access to a windows PC to try the 'official' p24qp.exe programmer from Microchip? If you could report the errors from that it might be helpful.

Did you try to bootload the v4.1 firmware with p24qp.py before you used the updater? That will erase the config words and block any further writes.

The ds30 Loader is not compatible with the upgrade, so that might have caused a problem depending on what version you used and what happened.

Unfortunately the Bus Pirate uses a PIC, the USBtiny can't program it.

I'll try to think of some other causes, maybe someone else has suggestions too.
Got a question? Please ask in the forum for the fastest answers.

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #2
Yes Ian, i have installed pyserial module. Even I've downloaded and installed the last versión from their svn.
I will try to install a windows in a virtual machine.
Thanks again, I really like BP ;).

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #3
I'm reading your post, and I dunno if it is a typo but you use the /dev/ttyUSB1 with the pq24 script and later on you say the BP is connected (show up) as /dev/ttyUSB0, also you provide a ls of /dev with also ttyUSB0 (so I think you didn't make one)

Make sure you use the same port as when you connect to the BP with your  favorite terminal program.

Please don't upload v4+ firmware with PQ24 as ian says, first use the upgrader!

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #4
Sorry to ask about the basic stuff, I'm just throwing everything out that I can think of. It could be bad configuration bits, it happens.

Please let us know how the windows tests goes, upload any error.txt file that's created.

If that fails, let's re-flash the chip. I have someone close to you who can reprogram the chip and have it back in a few days.
Got a question? Please ask in the forum for the fastest answers.

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #5
@Sjaak
You are correct, it's a typo.
I've been plugging and unplugging BP while check the upgrade process. While I'm in writing the post, the port has changed between plugs. As I'm copy/pasting the command line to avoid mistakes, I've pasted different device names.
But I assure you that every time I've used the correct device name in each case.
Don't worry about bricking BP,  in the case I get it working under Windows, I will check every step against the docs (multiple times). If needed,  I can take a protoboard and solder any pic programmer needed.
Thanks for the shot ;).

@Ian
Don't hesitate about asking basic stuff.
Today I was all day out of home and can't  check the procedure in Windows. Tomorrow I will have plenty time and try.
I will keep you up to date, thanks again.

P.S.
Excuse my "English".

Update.
I've finally successful updated boot-loader and firmware.
HiZ>I
Bus Pirate v3
Firmware v4.1 Bootloader v4.1
DEVID:0x0447 REVID:0x3003 (A3)
http://dangerousprototypes.com

I had to install Windows, and the process was smooth.
Now with last firmware,  ds30client_linux can access to BP. So I think there is some buggy code accessing some BP bootloader versions.
P24qp.py can't  read yet a single bit from BP.
This can be my fault because I'm using Debian Sid (unstable branch). Though I don't have any problem with other python programs, this is the only one I've that make uses of pyserial.
With the next python update, will try again against the last P24qp and keep you informed.
Thanks for the help.

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #6
cheers ;)

if you got some time:

could  you perhaps try some other python script which uses pyserial? Perhaps there is an issue with pyserial? You could try some python scripts from the svn to read an eeprom for examples

http://code.google.com/p/the-bus-pirate ... e%3Dclosed

I don't have much (as in none) experience with python though.

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #7
Hi Ian.
I've downloaded the terminal example from http://pyserial.sourceforge.net/examples.html#miniterm, and used it without a problem to comunicate with BP.
So I must think that the problem it's not in my python or pyserial module.
I've some skills as developer , so I will look for some spare days to learn python and check thoroughly the update script.
Will notice you any progress in this matter.
Thanks again.

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #8
Sjaak you mean? :P

But still a weird problem. You did use the latest version of pyserial and python? Or some special version? You did also  test some other speeds btw?

or is 2.6 not available for debian?

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #9
Sorry Sjaak , my fault.
I tried the last version of pyserial too, without much success.
I have available  from Debian repositories python 2.1 to 2.6.
I've installed and tried everyone, except 2.6.
Tested bitrates 9600-115200 (bitrateindex 4-8).
BTW now every time I do: ./P24qp.py -s /dev/ttyUSB0 -i  the BP lights up the Mode led.
I'm fighting with ft232 kernel driver.
More to come....

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #10
Quote
I've some skills as developer , so I will look for some spare days to learn python and check thoroughly the update script.

The script has been used thousands of times, I don't think there's a bug. It's deprecated now too, so no reason to spend time on it.

Quote
I had to install Windows, and the process was smooth.
Now with last firmware,  ds30client_linux can access to BP. So I think there is some buggy code accessing some BP bootloader versions.
P24qp.py can't  read yet a single bit from BP...
With the next python update, will try again against the last P24qp and keep you informed.
Thanks for the help.

P24QP is only for the v2 bootloader, ds30 Loader (and Pirate loader) are only for v4 bootloader. After the upgrade to v4, you can't use p24qp again.
Got a question? Please ask in the forum for the fastest answers.

 

Re: Unable tu upgrade bootloader of v2.4-Seeed BPv3 on Linux

Reply #11
You could try the miniterm applet (on the pyserial sf page) to connect the bp. If that works it is the loader script, if not it is your hardware, OS or python.

But as ian says this is the old depreciated way, so don't spend a lot of time here.