Wednesday, May 30, 2012

Gstreamer echoprint module

I've been planning on doing this for a long time already but got finally inspired to do it. An echoprint gstreamer module. It is not tested that much as I have a hard time getting anything recognized trough the API, using both my own code and the echoprint-codegen binary.
I've tried with many of the songs that they should have information about but no luck. The only song I got identified properly was "ABBA - Dancing queen" and only if I skip the first 20 seconds.

Any ideas ?

Oh, code is in git here.

Build, install and run a pipeline like:

gst-launch-0.10 -m filesrc location=some_song.mp3 ! \
 decodebin ! audioresample ! audioconvert ! \
 echoprint seconds=20 ! fakesink sync=0

echoprint will post a message with a code element, like this:
Got message #83 from element "echoprint0" (element): echoprint, code=(string)"eJzNl2uuHLkNhbekJ0UtR6LI.....

Wednesday, May 16, 2012

Resetting N9 Security code, part 2

Alright, now you should have a two big files, one is the firmware itself, the other one is the contents of the eMMC (basically the installed default apps). Like so (for northern Europe device model):
 
SizeFilename
1.6GDFL61_HARMATTAN_30.2012.07-1.NORTHERNEUROPE_EMMC_NORTHERNEUROPE.bin
1.2GDFL61_HARMATTAN_30.2012.07-1_PR_LEGACY_001-OEM1-958_ARM.bin

Next turn off the device and make sure it is not plugged into your computer. Then start the flasher:
$ sudo flasher -f \
 -F DFL61_HARMATTAN_30.2012.07-1_PR_LEGACY_001-OEM1-958_ARM.bin \
 -F DFL61_HARMATTAN_30.2012.07-1.NORTHERNEUROPE_EMMC_NORTHERNEUROPE.bin \
 --erase-user-data=secure

Note: For getting rid of the security code (that we don't know) the --erase-user-data=secure option is important, don't forget it.

Flasher should now output something like this:

flasher 3.12.1 (Oct  5 2011) Harmattan
WARNING: This tool is intended for professional use only. Using it may result
in permanently damaging your device or losing the warranty.

Suitable USB interface (bootloader/phonet) not found, waiting...

Flasher is now waiting for the device, so plug in the USB cable now. Flasher should now respond with:

USB device found at bus 001, device address 016.
Device identifier: xxx923xxx468xxx (SN: N/A)
Found device RM-696, hardware revision 1507
NOLO version 2.3.6
Version of 'sw-release': DFL61_HARMATTAN_30.2012.07-1_PR_001
Sending ape-algo image (7096 kB)...
100% (7096 of 7096 kB, avg. 11826 kB/s)
Suitable USB interface (phonet) not found, waiting...
USB device found at bus 001, device address 017.
Device identifier: xxx923xxx468xxx (SN: N/A)
Raw data transfer EP found at EP2.
Ping attempt 1 (250 ms)
Server application: 1.7.2
Found product RM-696 rev. 1507
Server implements softupd protocol version 1.8

Battery level 89 %, continuing.
Erasing, this may take a while.

It is now erasing the EMMC and as it says, can take a while. Took around 5-10 minutes for me. The white led should blink while it is doing it. After a successful erase operation, the flash should respond with this:

Erase done.
Image SW version DFL61_HARMATTAN_30.2012.07-1_PR_001
Image moslo not present
Image tar skipped
Image config skipped

Battery level 93 %, continuing.

And then continue to the real flashing part, something like this (sizes will vary with different image files):

    image        [state    progress         transfer     flash speed]
---------------------------------------------------------------------
[x] cert-sw      [finished   100 %       1 /       1 kB      NA     ]
[x] cmt-2nd      [finished   100 %      95 /      95 kB      NA     ]
[x] cmt-algo     [finished   100 %     789 /     789 kB      NA     ]
[x] cmt-mcusw    [finished   100 %    6050 /    6050 kB    3231 kB/s]
[x] xloader      [finished   100 %      23 /      23 kB      NA     ]
[x] secondary    [finished   100 %      94 /      94 kB      NA     ]
[x] kernel       [finished   100 %    2714 /    2714 kB       7 kB/s]
[x] rootfs       [finished   100 % 1163796 / 1163796 kB   10600 kB/s]
[x] mmc          [finished   100 % 1627169 / 1627169 kB   16524 kB/s]
Updating SW release
Success

Unplug the USB cable and your N9 should now reboot into a fresh install !

Fresh N9


Enjoy.

Resetting N9 Security code, part 1

My brother (used to) works at business sales, so obviously I asked him to get me a N9. In the meantime Gigantti had the nice 299€ discount on the N9 and I just had to get a pink N9 :) Anyway, my brother finally fixed a (used) black N9 for me, his wifes old phone. (she has switched to a Lumia,go figure)

Anyway, it had been unused for a while now, with a security code set. And guess if she remembers the security code.

After spending some time trying to guess at a code, I ditched that idea and started googling and finally found the instructions.

First: You do this at your own risk! Not my problem if your device is bricked.

What you need to do is flash the device with --erase-user-data=secure option, but unfortunately it requires a firmware image too and Nokia does not offer that in any easy download-here sort-of way. So you need to do it the complicated way instead.

So, what you need is:
  1. Flasher from http://tablets-dev.nokia.com/maemo-dev-env-downloads.php
  2. The firmware images, downloadable using NaviFirm or NaviFirmEx
I used NaviFirmEx as that works with wine under Linux.

Start the app and first select "Nokia care suite" server (With the default I didn't find the EMMC image). Then select the N9 from the device list and then the firmware version you would like to download. I recommend using the latest that contain the firmware for your device. After that you will be presented with a large list of devices with different specs and countries.

This was surprisingly easy, you can find the code on the tiny sticker on the SIM tray. My device has the code 059J1z8 just write your code in the search field above the list.
Select the correct firmware that match your code and click the "Add to download task" button and choose a location for the firmware files.

NaviFirmEx downloading firmware
So now you have to firmware, for flashing instructions go to Part 2.