Jump to content


Photo

Firmware Updater for Linux / Mac / Windows


  • Please log in to reply
51 replies to this topic

#1 OFFLINE   Rakashazi

Rakashazi

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • Local time: 10:24 AM
  • LocationWashington DC, USA

Posted 03 March 2011 - 05:14 AM

Here's a firmware updater I wrote that connects to the iCP directly via Bluetooth without having to deal with serial/COM ports. It should compile/run on any modern Linux distro with Bluetooth support (Mac/Windows makefiles are included as well). By default it scans for and flashes the first iControlPad found with "icp_firmware.enc". To use another firmware file, pass it via the command line. You can also specify a device name with -n <name> or a specific bluetooth address with -a <address> in XX:XX:XX:XX:XX:XX format.

Update: Version 1.1 has Mac support
Update: Version 1.2 has Windows support and runs on older versions of MacOS

Included in the archive is the source code, pre-compiled binaries, and the current 1.0.1a iCP firmware. Most users can just run one of the included "icp-flash" executables without any parameters and use auto-detection. Your iCP should be in firmware upgrade mode beforehand.

Linux Notes: Use your favorite terminal app to run. Depending on your desktop environment, you'll have to pair the iCP at least once to enter its pin code, use 1234 when prompted. On my GNOME install, the Bluetooth applet pops up a message requesting the pin code when the updater begins connecting and prints "Error connecting socket" if the pin isn't provided.

Mac Notes: Use Terminal.app to run (pre-built version is named icp-flash-osx-x86). Make sure to acknowledge any pairing requests from the OS while connecting and use pin 1234 if prompted. In case of "Error opening channel" you need to make your Mac "forget" the iCP. Open your Bluetooth menu and select "Set Up Bluetooth Device", then your iCP, and have the OS re-pair with it.

Windows Notes: Run icp-flash.exe. To set up your iCP for flashing, use the Windows Bluetooth applet to pair in SPP or firmware update mode and provide 1234 as the pin (remove the device if previously paired in a different mode). You'll know it's correct if Windows reports creating new COM ports when completed.

Download here. I've tested a couple flashes but let me know if you encounter any issues.

#2 OFFLINE   leathco

leathco

    Advanced Member

  • Members
  • PipPipPip
  • 292 posts
  • Local time: 08:24 AM

Posted 03 March 2011 - 05:23 AM

Will this work if I put it on a USB drive and boot with a LiveCD?

#3 OFFLINE   Rakashazi

Rakashazi

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • Local time: 10:24 AM
  • LocationWashington DC, USA

Posted 03 March 2011 - 05:29 AM

Will this work if I put it on a USB drive and boot with a LiveCD?

It should, as long as it has bluetooth support

#4 OFFLINE   Gadgetoid

Gadgetoid

    Gadgetoid.com

  • Moderators
  • 1822 posts
  • Local time: 03:24 PM
  • LocationNorwich, UK

Posted 03 March 2011 - 10:01 PM

Thanks for the effort. But it doesn't work for me:

iControlPad firmware updater 1.0 by Robert Broglia
Loaded 18696 byte firmware...
Starting Bluetooth scan...
Found 3 device(s)
#0 name: iControlPad-A484
Using this device...
Connecting to 00:06:66:42:A4:84...
Error connecting socket

I might give it a shot in Windoze.

Gadgetoid.com - Tech reviews 'n' stuff!


#5 OFFLINE   Rakashazi

Rakashazi

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • Local time: 10:24 AM
  • LocationWashington DC, USA

Posted 03 March 2011 - 10:20 PM

"Error connecting socket" means the OS was unable to establish a connection to the iCP. Try turning it on and off a few times, I got that error once during testing but the next time it worked. Another thing to try is updating your kernel and/or BlueZ libraries in case that's the cause. I'm currently using Linux 2.6.37 with BlueZ 4.89.

#6 OFFLINE   zoopster

zoopster

    Newbie

  • Members
  • Pip
  • 6 posts
  • Local time: 02:24 PM

Posted 05 March 2011 - 06:13 PM

Hi,

Just got the iControlPad and working through the firmware updater using Ubuntu 10.10 64 bit. My problem is I can't get icp-flash to execute. When I try "./icp-flash" I then get "cannot execute binary file". Any ideas what the problem may be?

Thanks John

#7 OFFLINE   Gadgetoid

Gadgetoid

    Gadgetoid.com

  • Moderators
  • 1822 posts
  • Local time: 03:24 PM
  • LocationNorwich, UK

Posted 05 March 2011 - 07:02 PM

Hi,

Just got the iControlPad and working through the firmware updater using Ubuntu 10.10 64 bit. My problem is I can't get icp-flash to execute. When I try "./icp-flash" I then get "cannot execute binary file". Any ideas what the problem may be?

Thanks John


Download bluetooth-dev (I think that's what it is) and recompile the flasher from source. I had to do this on my Ubuntu 10.10, which may or may not have been 64 bit. It's easy enough.

Just do: apt-cache search bluetooth

And download anything with bluetooth and dev in the name ;) Then you should be able to recompile no problem.


Edit: Just booting my netbook into Ubuntu, I'll post up the binary I compiled just in case these vague instructions go over your head.


Edit: Of all forums, this one should really allow binary attachments :D Anyway: http://www.gadgetoid...ra/icp-flash.gz for Ubuntu 10.10

Gadgetoid.com - Tech reviews 'n' stuff!


#8 OFFLINE   zoopster

zoopster

    Newbie

  • Members
  • Pip
  • 6 posts
  • Local time: 02:24 PM

Posted 05 March 2011 - 09:19 PM


Hi,

Just got the iControlPad and working through the firmware updater using Ubuntu 10.10 64 bit. My problem is I can't get icp-flash to execute. When I try "./icp-flash" I then get "cannot execute binary file". Any ideas what the problem may be?

Thanks John


Download bluetooth-dev (I think that's what it is) and recompile the flasher from source. I had to do this on my Ubuntu 10.10, which may or may not have been 64 bit. It's easy enough.

Just do: apt-cache search bluetooth

And download anything with bluetooth and dev in the name ;) Then you should be able to recompile no problem.


Edit: Just booting my netbook into Ubuntu, I'll post up the binary I compiled just in case these vague instructions go over your head.


Edit: Of all forums, this one should really allow binary attachments :D Anyway: http://www.gadgetoid...ra/icp-flash.gz for Ubuntu 10.10


Perfect. Changed the permissions and it worked a treat. Now rocking PC Engine (my favourite of the two) and NES! Sir you are a gentleman :)

#9 OFFLINE   pasc

pasc

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts
  • Local time: 02:24 PM
  • LocationGermany

Posted 07 March 2011 - 10:41 AM

Thanks for that Ubuntu file :).

However, I can't seem to get it to work...

I use a bluetooth 2$ dirt cheap dongle I got from dealextreme (If I power the iCP on the normal way I can find it).

I do the following:
  • Plug in USB bluetooth connector to PC
  • Open Terminal and cd to the directory of the extracted flasher files
  • change the permissions of them all to 777
  • on the iCP Side: Hold Select, then press start, wait for the LED to flash once and then it stays lit for 60 second
  • then on terminal I type "./icp-flash"

Then I get the following (similar, sometimes two and other times only one device)

Loaded 18696 byte firmware...
Starting Bluetooth scan...
Found 2 device(s)
Skipping device 0 due to class C0:5:0
Skipping device 1 due to class 4:2:52
Error, device name iControlPad- not found


Any Ideas why my iCP is not found ?
(Remainder: I can find it usign Linux normal Bluetooth -> Configure BT Device, when I turn the iCP on the normal way (non flashing))

EDIT:

Nevermind, I got the iCP updated using windows.

But it in "Default as shipped mode", paired with windows, set key as 1234.

Then put in flash mode

and executed the bat on com 3 (since that is what Windows told me my iCP had).

all ok :)

#10 OFFLINE   Rakashazi

Rakashazi

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • Local time: 10:24 AM
  • LocationWashington DC, USA

Posted 21 March 2011 - 02:48 AM

New version 1.1 is out, adding Mac support, pre-compiled 32-bit versions, and iCP firmware 1.0.1a. See the edited original post for full info :)

#11 OFFLINE   mrat93

mrat93

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts

Posted 21 March 2011 - 03:06 AM

New version 1.1 is out, adding Mac support, pre-compiled 32-bit versions, and iCP firmware 1.0.1a. See the edited original post for full info :)


Sweet! However, I'm having a problem using the Mac version.

When I open icp-flash-osx-x86, I get this:

/Users/admin/Downloads/iCP\ Flasher/icp-flash-osx-x86 ; exit;
My-iMac:~ admin$ /Users/admin/Downloads/iCP\ Flasher/icp-flash-osx-x86 ; exit;
iControlPad firmware updater 1.1 by Robert Broglia
Error opening firmware file: icp_firmware.enc
logout

[Process completed]


Sorry if it's just me being dumb. I have no command line experience whatsoever. I have it in the mode the firmware flashing guide says to be in (hold SELECT and START.)

#12 OFFLINE   Rakashazi

Rakashazi

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • Local time: 10:24 AM
  • LocationWashington DC, USA

Posted 21 March 2011 - 03:16 AM

Sweet! However, I'm having a problem using the Mac version.

When I open icp-flash-osx-x86, I get this:

/Users/admin/Downloads/iCP\ Flasher/icp-flash-osx-x86 ; exit;
My-iMac:~ admin$ /Users/admin/Downloads/iCP\ Flasher/icp-flash-osx-x86 ; exit;
iControlPad firmware updater 1.1 by Robert Broglia
Error opening firmware file: icp_firmware.enc
logout

[Process completed]

If you double-click the executable, the app starts in your home directory and won't find the firmware file. Either copy icp_firmware.enc to the home directory or navigate to the app's directory with Terminal.app.

#13 OFFLINE   mrat93

mrat93

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts

Posted 21 March 2011 - 03:29 AM

If you double-click the executable, the app starts in your home directory and won't find the firmware file. Either copy icp_firmware.enc to the home directory or navigate to the app's directory with Terminal.app.


iControlPad firmware updater 1.1 by Robert Broglia
Loaded 18696 byte firmware...
Starting Bluetooth scan...
#1: skipping device due to class 0x380104
No usuable devices found
logout


I have the iCP paired using the mode I described above. Sorry for being difficult. At least I bought nes.emu! :P

#14 OFFLINE   Rakashazi

Rakashazi

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • Local time: 10:24 AM
  • LocationWashington DC, USA

Posted 21 March 2011 - 03:50 AM

iControlPad firmware updater 1.1 by Robert Broglia
Loaded 18696 byte firmware...
Starting Bluetooth scan...
#1: skipping device due to class 0x380104
No usuable devices found
logout

Hmm, try turning off the iCP, then turn it on holding Y to force SPP mode, turn it off again once it starts flashing, finally turn it on again in firmware update mode (select + start). Does the updater give you the same error?

#15 OFFLINE   mrat93

mrat93

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts

Posted 21 March 2011 - 04:03 AM

Hmm, try turning off the iCP, then turn it on holding Y to force SPP mode, turn it off again once it starts flashing, finally turn it on again in firmware update mode (select + start). Does the updater give you the same error?


Here's what I just did:

1. Turned on iCP in SPP mode.
2. Paired with Mac.
3. Turned off iCP.
4. Turned on iCP in update mode. It automatically connected.
5. Ran icp-flash-osx-x86.
6.

iControlPad firmware updater 1.1 by Robert Broglia
Loaded 18696 byte firmware...
Starting Bluetooth scan...
No usuable devices found
logout



#16 OFFLINE   Rakashazi

Rakashazi

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • Local time: 10:24 AM
  • LocationWashington DC, USA

Posted 21 March 2011 - 04:30 AM

Ok, just did another test run on my laptop to make sure it's working correctly. Here's exactly what I did (was previously using the iCP in SPP mode by holding Y at startup)

1. Turn on iCP in firmware update mode (start + select)
2. Under the Bluetooth menu, select Set Up Bluetooth Device. The iCP should be listed with type Unknown
3. Select it and click continue, if you get a popup saying the computer is already paired, select OK
4. After waiting a bit, it lists "Pairing was completed successfully" and "A computer serial port was created", select quit
5. If your iCP has powered itself off at this point, turn it back on in firmware update mode.
6. Run the updater and it should find the device and upload the firmware

#17 OFFLINE   mrat93

mrat93

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts

Posted 21 March 2011 - 04:46 AM

Ok, just did another test run on my laptop to make sure it's working correctly. Here's exactly what I did (was previously using the iCP in SPP mode by holding Y at startup)

1. Turn on iCP in firmware update mode (start + select)
2. Under the Bluetooth menu, select Set Up Bluetooth Device. The iCP should be listed with type Unknown
3. Select it and click continue, if you get a popup saying the computer is already paired, select OK
4. After waiting a bit, it lists "Pairing was completed successfully" and "A computer serial port was created", select quit
5. If your iCP has powered itself off at this point, turn it back on in firmware update mode.
6. Run the updater and it should find the device and upload the firmware


Was it paired in SPP mode before you did this process? I paired it in SPP mode, then tried the process you said, but when I try to set it up in firmware update mode, it shows type "Combo." It pairs, but in terminal it says "No usuable devices found."

#18 OFFLINE   MWeston

MWeston

    Advanced Member

  • Members
  • PipPipPip
  • 298 posts
  • Local time: 08:24 AM

Posted 21 March 2011 - 04:53 AM

0. Switch the modes in several power cycles from SPP-->HID Joystick-->HID keyboard--->SPP
1. Turn on iCP in firmware update mode (start + select)
2. Under the Bluetooth menu, select Set Up Bluetooth Device. The iCP should be listed with type Unknown
3. Select it and click continue, if you get a popup saying the computer is already paired, select OK
4. After waiting a bit, it lists "Pairing was completed successfully" and "A computer serial port was created", select quit
5. If your iCP has powered itself off at this point, turn it back on in firmware update mode.
6. Run the updater and it should find the device and upload the firmware

mrat93, can you add a step zero to this procedure and let me know if it works? There does appear to be a bug in the BT module's firmware and a solution is being worked on but step zero seems to be a temporary fix that works and will be the solution for many people struggling with this. Make sure your Mac does not make a connection to the iCP while cycling through any of these modes and you should clear out any history of the iCP your Mac has stored before starting this. I don't know how or if you can do that though since I don't own a Mac but it should be possible.

#19 OFFLINE   mrat93

mrat93

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts

Posted 21 March 2011 - 11:32 AM


0. Switch the modes in several power cycles from SPP-->HID Joystick-->HID keyboard--->SPP
1. Turn on iCP in firmware update mode (start + select)
2. Under the Bluetooth menu, select Set Up Bluetooth Device. The iCP should be listed with type Unknown
3. Select it and click continue, if you get a popup saying the computer is already paired, select OK
4. After waiting a bit, it lists "Pairing was completed successfully" and "A computer serial port was created", select quit
5. If your iCP has powered itself off at this point, turn it back on in firmware update mode.
6. Run the updater and it should find the device and upload the firmware

mrat93, can you add a step zero to this procedure and let me know if it works? There does appear to be a bug in the BT module's firmware and a solution is being worked on but step zero seems to be a temporary fix that works and will be the solution for many people struggling with this. Make sure your Mac does not make a connection to the iCP while cycling through any of these modes and you should clear out any history of the iCP your Mac has stored before starting this. I don't know how or if you can do that though since I don't own a Mac but it should be possible.


SUCCESS! Thank you so much!

#20 OFFLINE   Gadgetoid

Gadgetoid

    Gadgetoid.com

  • Moderators
  • 1822 posts
  • Local time: 03:24 PM
  • LocationNorwich, UK

Posted 21 March 2011 - 11:41 AM

Ahoy folks.

Rakashazi- If you're not on OpenPandora's payroll, you should be. You've basically made the iCP worth having many weeks before I thought anything that fully supported it would exist. Thank you for your work on the emulators, and for your work on these flashers.

I've Wiki'd this thread, and the steps (including step zero) required to update on the Mac. If anyone has time to flesh out the Linux section, please go ahead. I'll get Windows sorted as soon as I can.

Is an iOS/Android flasher in the works? If we could establish a URL on the iControlPad site which would always host the latest firmware, we could make part of this process that little bit easier and have the flasher auto-download the latest. Hell, it could even scan a simple file and present versions- although I'm not sure why anyone would want to downgrade.

MWeston- thanks for taking an active interest in iCP. To see the ball really rolling on ironing out these minor glitches is refreshing- I'm pretty used to waiting forever and a day for new software releases.

Now I'm somewhat afraid that my Pandora wont have a place to fill once it finally turns up!

Gadgetoid.com - Tech reviews 'n' stuff!



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users