Bootloader Beta

Talk about YBoxen, widgets, Propeller hacking, etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Bootloader Beta

Post by darco »

I'm looking for a few brave souls to help me test the next version of the bootloader. The last thing I want to do is brick anyone's new ybox2, so I would really prefer it if only people who have prop-plugs (or have some other way to reflash their EEPROM if something goes wrong) try this. I've done some test upgrades myself and they went smoothly, but who knows what kind of bad things could happen? That's why a beta test is needed.

New Features:
  • • Ability to set a static IP address from the bootloader page
    • Much faster EEPROM reads and writes, which means faster boots and faster stage2 uploads!
    • Ability to mute the piezo (http://[IPADDRESS]/mute)
    • Correct LED colors
    • Ability to remove a password.
The big change here is the faster EEPROM reads and writes.

So, here is how to upgrade the bootloader (which is the most important part to test!):

First, upload the bootloader much like you would upload any other program. Then Boot into stage 2. Now you will be booted into the new bootloader, which should be in "bootloader upgrade mode". The LED should be white when it is ready. Then upload the new firmware to stage 2 again, just like you did the first time. It will beep twice--Once to indicate that the verification was good, and again to indicate when the bootloader write is complete. The time between the first chirp and the second chirp are critical---any interruption and you will corrupt the bootloader. It was for this reason that I wanted to re-write the EEPROM routines to be faster so as to minimize the chances of anything bad happening during that critical write. While it is updating the bootloader, the LED will pulse blue like it does when it first boots up.

Don't use a prop plug for your first upgrade if you can help it. I really need to test the normal upgrade path.

Again, this is important, if you don't have a prop-plug (or some other way to reflash the EEPROM) and the bootloader upload fails during that critical part I mentioned above then you have bricked your ybox2---at least until you get one of these.

Grab it here: Bootloader v1.1a806

Older previous builds: Feel free to add additional feature requests. Here are a few things that I intend to add at some point:
  • • Ability to pick a link-local IP address when DHCP fails
    • Support for more DHCP servers (like the Linksys WRT54GS)
    • In-browser firmware uploads
Last edited by darco on Tue Apr 28, 2009 9:56 pm, edited 4 times in total.

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Post by darco »

Um... Has anyone tried this yet? I was hoping for a little feedback by now.

Fuligin
 
Posts: 5
Joined: Mon Jul 07, 2008 7:26 pm

Post by Fuligin »

I can give it a shot when I get the prop plug.

User avatar
ex-h0trod
 
Posts: 22
Joined: Sun Jun 08, 2008 8:44 pm

Post by ex-h0trod »

wish i could. prop plug = busto.
darco wrote:Um... Has anyone tried this yet? I was hoping for a little feedback by now.

User avatar
klaser
 
Posts: 8
Joined: Mon Jul 14, 2008 1:55 pm

Post by klaser »

I'll try it, but the file is 404.

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Post by darco »

Oops, no wonder no one was trying it out. I gave ya the wrong URL!

http://www.deepdarc.com/bootloader_v788.binary

User avatar
klaser
 
Posts: 8
Joined: Mon Jul 14, 2008 1:55 pm

Post by klaser »

Is this the same as the one in the svn?

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Post by darco »

yes. Well, it should be. they should be pretty close. I'd use the binary above though.

middlerun
 
Posts: 8
Joined: Sun Jan 04, 2009 11:42 pm

Re: Bootloader Beta

Post by middlerun »

Hi! I just got my ybox2 for Christmas, and it's pretty awesome.

Anyway, I just updated to the new bootloader and it worked beautifully. It was a slightly tense moment because I don't have a prop-plug, but I went ahead with it anyway, because, you know... you only live once. :D It uploads widgets much faster now, it's great.

User avatar
daveparker
 
Posts: 10
Joined: Sat Jan 03, 2009 11:46 pm

Re: Bootloader Beta

Post by daveparker »

I updated to the 1.1a binary a few days back after I read about it on another discussion thread here.

My LED colors were still messed up, but I fixed them (at least according to how the webserver example widget works) with the LED Config
http://ybox2/ledconfig?0a0b0901

Also, before trying your binary I tried building the bootloader from SVN but ran into the I2C timing problem when trying to upload it.

I guess I should make a prop plug for when I do temp fate too much. I think I have a spare FTDI-based usb to serial cable + serial cable parts lying around.

No other issues with the 1.1a bootloader so far. The multi-stage update process was a good idea.

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Re: Bootloader Beta

Post by darco »

Yeah, I wanted the update process to exercise as much of the bootloader as possible before committing it to the EEPROM, so as to minimize the chances of brickage. It's still possible to brick though, so be careful.

It's even possible to brick a ybox2 with the new firmware if you use a bad LED config code! I have this fixed on SVN, but I haven't made a new bootloader binary with that fix yet. That being said, I'm glad I added the LED config code thing... I think the LEDs in some of the kits have different color ordering somehow.

User avatar
boerner
 
Posts: 44
Joined: Mon Dec 01, 2008 1:13 am

Re: Bootloader Beta

Post by boerner »

I can also report success with the bootloader upgrade. Since I recently bought a Meggy Jr. kit and a USB TTL cable that evidently could be hacked into a Prop Plug, I got really daring and did the update wirelessly. I used my Squeezebox in wireless bridge mode and everything worked ok.

Fairly uneventful except for one thing...

After the new bootloader was up and going I decided to set a password (which I had not before). When I went to re-upload the Alarm widget using curl on Mac OS X, not matter what command I tried I could not pass the username (admin) and the password.

Interestingly enough, it seems as if you cannot set the password to be blank after you have set it as it comes back as being too short. I did a complete reset and can upload widgets again. I might re-enable the password and play with it later.

In case anyone is wondering, this is the command I used:

curl http://192.168.1.126/stage2.eeprom -T alarmwidget.binary -u admin

Now if I can just finish the silly case for the thing...

User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 7:54 pm

Re: Bootloader Beta

Post by darco »

To get cURL to work with a ybox2 when a password is set, you need to add the command line option "--anyauth" because the ybox2 uses digest authentication. cURL will by default only use basic authentication unless you tell it to try otherwise. I use a command line something like this:

Code: Select all

curl --anyauth http://admin:[email protected]/stage2.eeprom -T mywidget.binary
As far as how to remove a password after setting one... Yep, removing (as opposed to simply changing) a password is something I hadn't thought of, and you can't currently do it without doing a reset. Oops. I knew I forgot something. :P

User avatar
boerner
 
Posts: 44
Joined: Mon Dec 01, 2008 1:13 am

Re: Bootloader Beta

Post by boerner »

Hi darco,

Thanks for setting me straight in regard to the proper curl command. I figured I was missing something simple.

Thanks for confirming I am not crazy with regard to the password setting :-)

I also tried uploading the twitter widget, and that seems broken (I think I remember ladyada addressing that earlier), and I still cannot seem to re-upload the original InfoWidget (like I mentioned in my original success post).

I will keep playing around. I still have to load Windows in a VM so I can try my hand at programming the thing. I want to make a widget that tracks packages and provides updates on the status.

Thanks again to everyone for their work on the project.

StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 4:36 am

Re: Bootloader Beta

Post by StephMo »

Hi Darco,

Works great for me. Simple to upgrade. Worked flawlessly.
Like the faster'ness! ;-)

My XBee equipped YBox2 is now sporting the new bootloader!

Stephen, KZ0Q

Locked
Please be positive and constructive with your questions and comments.

Return to “YBox2 (discontinued)”