by darco on Thu Jun 26, 2008 2:26 pm

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 8:56 pm, edited 4 times in total.
User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 6:54 pm
Location: Campbell, CA

by darco on Mon Jul 07, 2008 8:40 pm

Um... Has anyone tried this yet? I was hoping for a little feedback by now.
User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 6:54 pm
Location: Campbell, CA

by Fuligin on Tue Jul 08, 2008 4:42 pm

I can give it a shot when I get the prop plug.
Fuligin
 
Posts: 5
Joined: Mon Jul 07, 2008 6:26 pm

by ex-h0trod on Thu Jul 10, 2008 4:39 pm

wish i could. prop plug = busto.

darco wrote:Um... Has anyone tried this yet? I was hoping for a little feedback by now.
ex-h0trod
 
Posts: 22
Joined: Sun Jun 08, 2008 7:44 pm

by klaser on Sun Jul 20, 2008 12:48 pm

I'll try it, but the file is 404.
klaser
 
Posts: 8
Joined: Mon Jul 14, 2008 12:55 pm

by darco on Sun Jul 20, 2008 1:09 pm

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

http://www.deepdarc.com/bootloader_v788.binary
User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 6:54 pm
Location: Campbell, CA

by klaser on Sun Jul 20, 2008 1:12 pm

Is this the same as the one in the svn?
klaser
 
Posts: 8
Joined: Mon Jul 14, 2008 12:55 pm

by darco on Sun Jul 20, 2008 1:24 pm

yes. Well, it should be. they should be pretty close. I'd use the binary above though.
User avatar
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 6:54 pm
Location: Campbell, CA

by middlerun on Sun Jan 04, 2009 10:55 pm

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.
Leave no turn unstoned.
User avatar
middlerun
 
Posts: 8
Joined: Sun Jan 04, 2009 10:42 pm
Location: Sydney, Australia

by daveparker on Mon Jan 05, 2009 12:57 pm

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
daveparker
 
Posts: 9
Joined: Sat Jan 03, 2009 10:46 pm
Location: San Francisco

by darco on Mon Jan 05, 2009 4:11 pm

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
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 6:54 pm
Location: Campbell, CA

by boerner on Thu Jan 15, 2009 7:42 pm

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...
boerner
 
Posts: 41
Joined: Mon Dec 01, 2008 12:13 am
Location: Anchorage, AK USA

by darco on Thu Jan 15, 2009 8:46 pm

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:password@192.168.0.10/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
darco
 
Posts: 118
Joined: Wed Jun 04, 2008 6:54 pm
Location: Campbell, CA

by boerner on Thu Jan 15, 2009 9:40 pm

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.
boerner
 
Posts: 41
Joined: Mon Dec 01, 2008 12:13 am
Location: Anchorage, AK USA

by StephMo on Thu Jan 22, 2009 10:54 pm

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
User avatar
StephMo
 
Posts: 16
Joined: Wed Nov 12, 2008 3:36 am
Location: CO, USA