Using Wine to update Sony NEX camera firmware

Sony currently only supplies its NEX cameras with .exe binary firmware updates. Prior to purchasing the camera, I installed Wine and was able to execute the .exe. Of course, that doesn’t guarantee that it’ll work. Now, with the camera in hand, I actually tried to update the firmware. It didn’t work. I tried using Wine 1.1.28 and 1.3.3 and even the cloned the Wine repository with git and compiling Wine with USB patches I found here:

ftp://ftp.etersoft.ru/pub/people/amorozov/usb/1.3.3/

(Wine git, compile and install found here: USB - The Official Wine Wiki)

With the camera connected, I was able to use “wineconsole cmd” to open a dos shell. In the shell, I was able to see that the D: drive (which I assigned to /media/disk) was correctly accessing the camera as a mass storage device. I can only conclude that USB support works. However, it doesn’t appear to work for updating the firmware. :frowning:

The firmware program from Sony searches for about a minute and doesn’t find the camera.

When I run the firmware updater with Wine, Wine produces these files:

FirmwareUpdater.exe
Resource/
  FirmwareData_user_20.10.03.2010062822_205_02_loader.dat                         
  FirmwareUpdaterImg.dll
  MFC90U.DLL
  Microsoft.VC90.CRT.manifest
  Microsoft.VC90.MFC.manifest
  msvcp90.dll
  msvcr90.dll
  SPUFirmwareUpdater.exe*
  StrCS.dll
  StrCT.dll
  StrDE.dll
  StrES.dll
  StrFR.dll
  StrIT.dll
  StrJP.dll
  StrKR.dll
  StrNL.dll
  StrPL.dll
  StrPTBR.dll
  StrRU.dll
  StrSE.dll
  StrUS.dll
  XpStorageDevice_WinXp2k.dll

The .dat file looks most likely to be the data I want to dump to the camera, but how? (I’ve done some research and have read that the data is probably encrypted.)

Any ideas on how to proceed? I would really like to update via GNU/Linux.

Would it help you if you could boot to DOS without a floppy, or is the FirmwareUpdater.exe program an MS-Windows program and not a Linux program ?

Please check out this temporary wiki to see if it helps:
User : Oldcpu/Boot DOS without Floppy - openSUSE
This wiki was moved during the wiki update process, and I still have not got around to moving it back to its new location and asking the wiki team to bless it.

From Sony’s site, the program is listed to be compatible with Windows 2000, XP, Vista, and 7. When I run the program in Wine, it does bring up a GUI.

linuxvinh wrote:
> Any ideas on how to proceed? I would really like to update via
> GNU/Linux.

you may, of course, do it the way you want to try…but, having
owned/used nothing but Linux since about 2002 i have on several
occasions gone to a friends house to use their Windows to set up
external hardware like phones/cameras and etc…

my GUESS is the way you are trying to use WINE might succeed in
turning your camera into a brick!

luckly, i’ve not yet been faced with an unavoidable need to (say)
flash my computers bios with an exe…(i sure try to buy very carefully
to not get into a must-have-Windows situation)…and, when faced with
a situation such as yours i try to stay well clear of experiments
which might permanently lock up expensive hardware…

ymmv


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
When it comes to chocolate, resistance is futile.

I try to avoid “must-have-Windows” situations too. I definitely don’t want to brick my new camera. I would like to make attempts at using GNU/Linux to update the camera while it’s still under warranty; that way, should I brick it, I can tell Sony that all I wanted to do was update the firmware.

linuxvinh wrote:
> should I brick it, I can tell Sony that all I wanted to do was
> update the firmware.

oh! :slight_smile:


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
When it comes to chocolate, resistance is futile.

It might be a safer idea to install a trial of VMWare Workstation and install Windows XP on it, that way you will be able to update your cameras firmware and knowing that it will have been updated correctly as even if you brick your camera by trying to update it using an unsupported OS could void the warrenty as using Linux and wine is an unsupported way to update the camera, where as using Virtualization Software and Windows XP would technically be supported as you would be updating your camera in Windows XP.

Roland

I do have a Windows 7 license that came with my netbook. At worse, I can install that onto my netbook and be on my way. However, I’d like to give GNU/Linux a shot while the camera is under warranty.

Side question: Would I be able to install VirtualBox onto openSUSE and use the Windows 7 that came with my netbook? Or is that copy somehow locked to my netbook? (The netbook originally came with Vista, but I received a upgrade DVD with 7 about two months later. Sorry if this licensing question is naive. I’ve never had a Windows box.)

linuxvinh wrote:

>
> I do have a Windows 7 license that came with my netbook. At worse, I
> can install that onto my netbook and be on my way. However, I’d like to
> give GNU/Linux a shot while the camera is under warranty.
>
> Side question: Would I be able to install VirtualBox onto openSUSE and
> use the Windows 7 that came with my netbook? Or is that copy somehow
> locked to my netbook? (The netbook originally came with Vista, but I
> received a upgrade DVD with 7 about two months later. Sorry if this
> licensing question is naive. I’ve never had a Windows box.)

I haven’t been able to fake out either the media or the self-made ‘backup’
versions of the recovery files work nor can I use the upgrade media with
anything but the original system installed. Both approaches are tied
closely to the original hardware and appear to do extensive checks to keep
you from installing on anything but the original hardware. I got an XP
recovery to start in Virtualbox but it lacked the drivers for anything
except the original hardware and crapped out.

OTOH, I’ve used an XP virtual machine for a number of firmware updates to
external equipment with good results - but that’s no guarantee.


Will Honea

On 2010-10-05 01:06, linuxvinh wrote:
>
> I do have a Windows 7 license that came with my netbook. At worse, I
> can install that onto my netbook and be on my way. However, I’d like to
> give GNU/Linux a shot while the camera is under warranty.
>
> Side question: Would I be able to install VirtualBox onto openSUSE and
> use the Windows 7 that came with my netbook? Or is that copy somehow
> locked to my netbook? (The netbook originally came with Vista, but I
> received a upgrade DVD with 7 about two months later. Sorry if this
> licensing question is naive. I’ve never had a Windows box.)

I managed to do this sort of thing once, but not using the install cd (it detects the wrong
hardware), but by cloning the already installed HD using something like ghost, and then restore the
image into a virtual machine. When windows boots, there is no control by the manufacturer program,
so windows works - however, it starts detecting “new” hardware and asks for the controllers, which
you might not have. I was fortunate to have them, so I got away with it. As for the license, it is
running actually in the same machine where I bought it, so no problem, I guess. Only that I do not
need to stop linux and reboot :slight_smile:

I haven’t attempted this with W7, the partition image I have is way to big (120 GB).


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

I guess at this junction in development, I will be installing Windows 7 with openSUSE on my netbook as dual-boot. I posted my question to WineHQ and the response was that Wine currently only supports direct communications to USB serial devices:

WineHQ Forums View topic - Firmware update via USB to Sony NEX camera

I just wanted to close out this thread with a firm answer (at least for now).

Thanks all!

For my netbook, an Acer 1410, the Windows 7 upgrade came on two DVD’s. The first was an Acer Upgrade Kit DVD that included an “upgrade wizard” that needed to be executed before the Windows 7 DVD “could be” install (according to the instructions). My first struggles were to copy the contents of the DVD’s onto USB sticks, as the Acer 1410 doesn’t have an optical drive. It was here that I learned a lot about cluster sizes and how formatting the NTFS with a large cluster size (similar size to a hard drive, 4096 bytes) would make the 4 GB contents of a DVD into something larger than 8 GB! Once I set the cluster size to 512 bytes, I finally managed to fit the 4 GB’s into 6 GB’s. All this was done in preparation to set up my netbook as a dual-boot openSUSE and Windows 7 system. The next hassles would be to reduce the openSUSE partition to free up space for Windows 7. After that, I would need to re-install GRUB and configure it for the dual-boot. However, in the midst of this research, I stumbled upon VirtualBox, formerly from Sun, now an Oracle product. The commercial version of VirtualBox (free for personal use), unlike the open source version that comes with openSUSE, has full USB support, which is what I need for the Sony NEX camera firmware update.

What I discovered was that once I got VirtualBox installed, I could use the second DVD (with Windows 7 and no Acer specific drivers) to create a functioning Windows 7 system in VirtualBox. The second DVD needed to be an .iso file first, so I created one after searching for “DVD to iso linux” for instructions. (This involves a very simple dd command.) With Windows 7 installed, I created another .iso with just the Sony firmware upgrade program. I executed it and my camera successfully upgraded to the new firmware! (The Sony upgrade process involves mounting the camera as a mass storage device, verifying the firmware version, having the user unmount the camera (in Windows speak “safely disconnect the device” but leave the cable connected), and downloading the firmware to the camera (which took about 5 minutes, so make sure the battery is charged!).

Lessons I learned:

  1. Cluster sizes will determine whether the contents of one drive will fit on another.
  2. VirtualBox is a great alternative to a dual-booting system. (Actually, I think it’s better because you can still access the GNU/Linux side at the same time!)
  3. Make sure the company you buy hardware from has GNU/Linux firmware upgrade support or you’re going to lose your weekend!

One question for those of you familiar with Windows 7 licenses: It says I must register the copy within 30 days. If I do this for running it in VirtualBox, would this prevent me from installing/registering it as the primary OS later on? (If one day I should sell this netbook, I may need to install Windows 7 on it as the primary OS. The copy will still be running on the same machine, just virtually now and on real hardware later.)

Thanks!

On 2010-10-18 11:06, linuxvinh wrote:

> Lessons I learned:
>
> 1. Cluster sizes will determine whether the contents of one drive will
> fit on another.

Yep.

I knew of one tar archive, relatively small, that when expanded took many gigabytes, to the point of
filling partitions. It had thousands of many small files. Worse, it took hours to expand. But, if
the tar archive was expanded to a reiserfs, it used a small size and copied in minutes.

> 2. VirtualBox is a great alternative to a dual-booting system.
> (Actually, I think it’s better because you can still access the
> GNU/Linux side at the same time!)

Correct. I use vmware, but it is the same principle.

> 3. Make sure the company you buy hardware from has GNU/Linux firmware
> upgrade support or you’re going to lose your weekend!

Often there is no choice.

Me, I have a Nokia cellular phone and a Tom-Tom car navigator. Both require windows for updates,
although Linux sees both devices and can read/write to them (files). And the worst is that the
tom-tom is a Linux embedded machine.

> One question for those of you familiar with Windows 7 licenses: It
> says I must register the copy within 30 days. If I do this for running
> it in VirtualBox, would this prevent me from installing/registering it
> as the primary OS later on? (If one day I should sell this netbook, I
> may need to install Windows 7 on it as the primary OS. The copy will
> still be running on the same machine, just virtually now and on real
> hardware later.)

It might work registering the same license, uninstalling the virtual machine. It would register as a
hardware change. I’m unsure about legalities.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

If it is an OEM disk legally you can not install on a different machine. VM’s are kinda of a no mans land and various MS agreements differ depending on versions. I’m pretty sure the home editions are not legal on VM’s. But you really need an army of lawyers to even have an idea and they won’t all agree :slight_smile:

The Sony NEX cameras run on embedded GNU/Linux too! Source:

Sony Global - Linux Source Code Download page

How do people normally move a license? Is there an unregistering then re-registering process?

The Acer Upgrade Kit seemed to have the bulk of the files (BIOS, device drivers, etc.), taking up about 4 GB’s on the DVD. The Windows 7 DVD weighed in at a mere 2.5 GB’s, which had enough to install Windows 7 onto VirtualBox. Of course, I’m just running a firmware update tool, so I have no idea what other Windows 7 bits and bobs I may be missing for a fully functioning Windows 7 system.