HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Sun Jan 18, 2009 4:54 pm

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 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Sun Jan 25, 2009 2:50 pm

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 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Sat Jan 31, 2009 5:34 pm

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 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Sun Feb 01, 2009 12:30 pm

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 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Tue Feb 03, 2009 5:08 pm

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 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Thu Feb 05, 2009 5:39 am

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.
Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by molotov on Wed Feb 11, 2009 4:29 pm

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
molotov
 
Posts: 3
Joined: Wed Feb 11, 2009 4:23 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Mon Feb 16, 2009 8:19 am

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
Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by molotov on Tue Feb 17, 2009 3:46 pm

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!
molotov
 
Posts: 3
Joined: Wed Feb 11, 2009 4:23 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Thu Feb 19, 2009 3:47 am

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.
Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by molotov on Thu Feb 19, 2009 8:53 am

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?
molotov
 
Posts: 3
Joined: Wed Feb 11, 2009 4:23 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

by Sokkan on Sun Feb 22, 2009 12:12 pm

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.
Sokkan
 
Posts: 240
Joined: Sat Sep 01, 2007 11:56 am
Location: Stockholm

Re: HowTo: Upload the x0xb0x firmware in OSX

by marcovitch on Thu Jun 11, 2009 11:22 pm

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

PS : I'm on MAC OS 10.5.7
marcovitch
 
Posts: 14
Joined: Thu Jun 11, 2009 11:19 pm

Re: HowTo: Upload the x0xb0x firmware in OSX

by leelinn on Fri Oct 02, 2009 5:50 am

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
Jomox Xbase 09, Korg Er-1 mkII, TR 707, TR 606, Roland SH 101, DSI Evolver desktop, Microkorg, Korg Kaoss Pad II, RME Fireface 400, Gameboy+LSDJ&Nanoloop, x0xb0x (???)
leelinn
 
Posts: 19
Joined: Wed Feb 06, 2008 8:07 am
Location: Italy

Re: HowTo: Upload the x0xb0x firmware in OSX

by Luap on Fri Oct 02, 2009 11:16 am

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:
Luap
 
Posts: 354
Joined: Wed Jul 08, 2009 6:10 pm
Location: London'ish. UK