HowTo: Upload the x0xb0x firmware in OSX

x0x0x0x0x0x

Moderators: altitude, adafruit_support_bill, adafruit, phono, hamburgers

Please be positive and constructive with your questions and comments.
Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

Well, this might be a bit anticlimactic, but the only way I have so far managed to do it is like this:

Install Suns VirtualBox
Install Win2000 SP4 in the VirtualBox
Proceed with the instructions in the construction manual for windows...

It actually worked right away, this is of course good, but it is not so good that you need to install another OS to get it to work.

Is there anyone out there who actually managed to set things up directly in OSX?

Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

I just made another attempt at flashing my x0xb0x from 10.5, this is what I found out:

1. You need to use the 64-bit rxtx-API since java in 10.5 is 64-bit only. This is available in the latest binary package.
2. Using rxtx means that you need to edit the java source files in JAvrProg that uses the comm API and recompile everything.

Doing this I still didn't seem to get contact with the x0xb0x, so I added some debug output into the app and explicitly tried to read exactly 7 bytes. This made the x0xb0x answer with:

xb0x1x0

instead of x0xb0x1. So obviously there is something wrong with the byte order or UNIX-NIXU-XINU thingie or something completely different...

If anyone cares to have a look themselves I can explain more thorough how I set things up, but it should be fairly obvious knowing the above.


NOTE: I know nothing about serial ports and how they are supposed to work. It might be fairly obvious why I get my bytes in the wrong order for someone more into that kind of stuff. Please explain it to me then! :)

Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

I just had a look at this again and I can now upload the firmware with JAvrProg directly from OSX(10.5.6). The RXTX-library seems a bit buggy so I had to comment out some fancy stuff from the original code and do things a bit differently.

Anyway, I'll do some tests and then I will post some instructions(you just need to install the 64-bit RXTX-library) and the updated pack with JAvrProg with all of the souce files of course. Hopefully I'll find some time tomorrow.


So, just c0ntr0l left now, I have fixes for the worst bugs, I just need to figure out how to pack everything into a self contained package on Windows and OSX. :)

Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

I just got c0ntr0l working in OSX too. I'll see if I can apply the fixes some other people have made to the app and post it tonight. It will upload new firmware at least for now. It seems to be standalone too, in any case you get python with OSX so there should be no problems.

Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

I anyone is brave enough to try them out I now have both JAvrProg and c0ntr0l up and running in OSX. NOTE: Only tested in 10.5.

Please let me know of any bugs with flashing the x0xb0x or saving/loading patterns from c0ntr0l. This is _not_ a fix for all of the problems with c0ntr0l, they will most likely never be fixed! Use it for flashing the x0xb0x and saving patterns to your computer, everything else is just not working.

First you need to install the USB->serial driver from FTDI:

http://www.ftdichip.com/Drivers/VCP.htm

Then download the c0ntr0l package I made from here:

http://x0xb0x.co.uk/Sokkan/files/c0ntr0l.app.dmg.zip

(the source is here: http://x0xb0x.co.uk/Sokkan/files/bkup2.zip)

Unzip, doubleclick the disk image and drag the application to a convenient location and doubleclick it.


For JAvrProg you also need to install the 64-bit RXTX 2.2 prerelease binary package from here:

http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre1-bins.zip

There is some install instructions in there for 10.5.

Then download the hacked JAvrProg I made here:

http://x0xb0x.co.uk/Sokkan/files/JAvrProg.zip

Unzip it and type "java -jar JAvrProg.jar" on the command line in that directory.


IMPORTANT NOTE: They do work for me on my machine, but there is always a risk you end up with a x0xb0x that you need to flash with new firmware from a known working system.

Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

Note, the c0ntr0l package does not work in 10.4. I tried to make a separate 10.4 c0ntr0l app yesterday but py2app refused to pack the serial extensions into the package. If you desperately need to use c0ntr0l under 10.4 you need to download the source and run it on the command line. You also need to upgrade the antique python that comes preinstalled and you also need to install a bunch of extensions for python, pyserial and wx among others.

molotov
 
Posts: 3
Joined: Wed Feb 11, 2009 5:23 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by molotov »

hello, i've got c0ntr0l up and running on my ppc 10.5.6

seems to connect to the x0xbox and receives tempo info and eeprom backups..

however it wont allow me to upload firmware while xox is connected, so when i disconnect xox and try and upload firmware it gives the error message "Firmware Programming Error... 'The x0xb0x did not resond. Check to be sure that the x0xb0x is in the Bootload mode'

I did notice that light 15 on the xox goes out when this happens.

I also got JAvrProg running and seems to run through the ports but not connect, the light on the xox also goes out when attempting this..

Any ideas?

I would be so pleased to get this running :)

Many thanks

Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

It is unclear whether or not you actually performed all of the steps nescesarry for a succesful FW flash. If you did everything in this list in this order and it still fails, please come back.

1. shut down x0xb0x
2. connect x0xb0x to computer
3. turn knob to bootload mode
4. turn on x0xb0x (some random LEDs might light up)
5. wait a couple of seconds
6. start your bootloading program(JAVRProg or c0ntr0l)
7. flash it
8. disconnect x0xb0x
9. shut down x0xb0x
10. turn knob into any other position
11. turn on x0xb0x

molotov
 
Posts: 3
Joined: Wed Feb 11, 2009 5:23 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by molotov »

Thanks for the reply,

using c0ntr0l, I get as far as '7. Flash it.'

when sending the sokkos.hex file, c0ntr0l gives me the error message:

"Firmware Programming Error... 'The x0xb0x did not respond. Check to be sure that the x0xb0x is in the Bootload mode"

Although, I can connect to the x0xb0x using c0ntr0l and backup, clear eeprom etc etc.

It just won't allow me to send the .hex files..


Any suggestions gratefully received as I'd love to try out the improved firmware!

Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

When you turn on your x0xb0x in bootload mode, how does it respond? You might have some problems with the encoder and you actually never end up in bootload mode. Usually you get random LEDs turning on and thats it. Sometimes all of them light up, sometimes none, usually a bunch lights up. It also changes if you power cycle the machines a few times.

molotov
 
Posts: 3
Joined: Wed Feb 11, 2009 5:23 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by molotov »

Sokkan wrote:When you turn on your x0xb0x in bootload mode, how does it respond? You might have some problems with the encoder and you actually never end up in bootload mode. Usually you get random LEDs turning on and thats it. Sometimes all of them light up, sometimes none, usually a bunch lights up. It also changes if you power cycle the machines a few times.
Ah well, every time I turn on the x0xb0x into bootload mode the tempo light breifly flashes then light no.15 stays illuminated. No other lights flash and this happens the same every time I turn it off and on..

All of the other positions in the encoder seem to correspond to their relevant settings, for instance pattern sync, track sync etc etc all work as they should..

Is there any way of updating the OS through midi or something instead?

Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 12:56 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Sokkan »

molotov wrote: Ah well, every time I turn on the x0xb0x into bootload mode the tempo light breifly flashes then light no.15 stays illuminated. No other lights flash and this happens the same every time I turn it off and on..

Is there any way of updating the OS through midi or something instead?
If you always get the same behavior when you turn it on in bootload mode you probably do not have a bootloader.
If you had a bootloader you would get some random LEDs turned on and they would be different ones every time you re-connect the power with the knob turned to bootload.

I know of two more ways to update the firmware in the x0xb0x.

1. Flash it in a friends known to work b0x by doing a brain transplant of the AVR.
2. Flash it in a AVR compatible development board.

marcovitch
 
Posts: 14
Joined: Fri Jun 12, 2009 12:19 am

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by marcovitch »

Thanks Sokkan !!!
Everything went just fine for me :D

PS : I'm on MAC OS 10.5.7

leelinn
 
Posts: 19
Joined: Wed Feb 06, 2008 9:07 am

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by leelinn »

any idea how to fix c0ntr0l on mc os x 10.6.1?
this is the error message i get:

ImportError: dlopen(/Applications/c0ntr0l.app/Contents/Resources/lib/python2.5/lib-dynload/wx/_core_.so, 2): Symbol not found: __ZN15wxPoint2DDouble14SetVectorAngleEe
Referenced from: /Applications/c0ntr0l.app/Contents/Resources/lib/python2.5/lib-dynload/wx/_core_.so
Expected in: /usr/lib/libwx_macud-2.8.0.dylib

Luap
 
Posts: 363
Joined: Wed Jul 08, 2009 7:10 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

Post by Luap »

Unusually for OS X, I found trying to update my x0xb0x firmware way too much of a pain in the ass. This Control software for OS X clearly isn't even remotely finished. And im not going to go to collage for months to get a degree in Python/Java/Cocoa/Unix/Basic/MachineCode/Binary/Hexadecimal programming in order to be able to use the damn thing first.
In fairness, this is not a fault of OS X. Its just that no one has made practical x0xb0x software for OS X yet.

Yes, im a typical Mac using bum, and I expect it all to be easy :lol:

The Control software for Windows isn't exactly great either. But at least it boots in the normal way (double click the icon!) and by & large, it works. I don't have to compile anything or fiddle about with obscure and dorky files first. I had to install the ftdi usb driver thing in XP, update my Java doobery, and that was it. It pretty much all just worked from there.

Fortunately I have an Intel Mac and keep a small partition on it for a Windows XP install, which comes in handy from time to time for odd jobs like this.

I think anyone that manages to successfully update their x0x firmware via OS X should win a free Adafruit mug or something :mrgreen:

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

Return to “General x0xing”