Jim's Depository

this code is not yet written
 

My new Western Digital Green 2TB (WDC WD20 EARS-00MVWB0) drives have 4k sectors, but they report as 512 byte for compatibility.  Linux 2.6.32 and the fdisk on squeeze will do the wrong thing by default and place partitions on bad boundaries.

fdisk -b 4096 -u /dev/XXXX

… is the right command to force the proper sector size. It will then die with a floating point exception unless you type a ‘c’ to disable MS-DOS compatibility mode once you are in fdisk.

(If you are just going to use them with LVM, maybe skip the silly label anyway and use the whole disk for LVM. Be careful though, currently on squeeze the lvm scan does not happen after the USB scan, so they won’t be found at reboot unless you do another scan, like in rc.local.)

Today, my gift to you: After extensive research and testing, I have found a 3.5” SATA⇒USB enclosure that will work with smartmontools to allow you to monitor the S.M.A.R.T. data of your drive. This one may be unique in that I have an actual link you can click and buy the enclosure! 

You can get them from Amazon for \$30: Amazon.com: Sabrent eSATA to Serial ATA (SATA) and IDE(PATA) USB 2.0 3.5-Inch Aluminum Hard Drive Enclosure Case

Ugly Caveat: There are at least two different designs sold under the same model number. Some, possibly older ones though 2 of the 3 I got from Amazon today are this variant, have silver screws and absolutely awful power adapters with white labels. The part where the 120v cord enters is badly made and the cord will not make contact or make intermittent contact unless you cram it in very hard. The variant with black screws has a different model of power supply and seems to be ok. The box art work matches the unit inside. Both variants have the JMicron JM20337 chipset so all is good.

I’ve got a Western Digital Green 1TB (older model, 512 byte sectors) running in there and smartctl -d usbjmicron -a /dev/sdg is working perfectly on my Linux box.

(smartmontools 5.38 from Debian Lenny was not new enough. I think 5.39 would be, but I jumped straight to the dev edge.)

I couldn’t get S.M.A.R.T. to work with this drive on Mac OS X, same version of smartmontools, but it doesn’t want to talk to the drive.

I was experimenting with HTML-5 Web Storage when I realized Safari wasn’t showing me my storage use under the Safari⇒Preferences…⇒Security⇒Show Databases panel. A little find action shows that they live in databases named things like ~/Library/Safari/LocalStorage/http_SITENAME_0.localstorage, and good heavens there are a lot of them!

Most of them are for some sort personal information harvesting operation named loomia. They seem to be about personalized recommendations, but I don’t remember authorizing them to collect information on me, and I sure didn’t ask them to tag me with a tracking code tucked away in a location I can’t see that will survive cookie clearing.

Most of the rest are of the form IXAIInvited{number} = true. I have no idea what that is about, but the number isn’t long enough to be a unique identifier for me.

So Safari guys: I know you’ve been busy, but how about letting me see and manage my localStorage from the user interface?

(And while you’re at it, either make localStorage.setItem() work for objects, or update the documentation to mention that it is strings only. And give me my hour of debugging time back.)

If you are of a mood to see your own localStorage situation, you could:

for v in ~/Library/Safari/LocalStorage/* ;do 
echo "#### $v ####"
echo "select * from ItemTable;" | sqlite3 $v 
done

I ordered a pair of Kodak Pulse 7" wifi picture frames from Provantage about 90 days ago which was long enough to forget, so it was like a little surprise gift to myself.

I intend to rip them open and see if I can replace their firmware with something I can control, but I fired one up to see if it could be made to work as a remote webcam viewer with its intended firmware.

I have to say I am impressed. The picture quality is quite nice. The web site for controlling the content is very nice (except that their applet signature does not have a valid signature). You can feed it from a web page, email, facebook, or some Kodak online gallery.

But here is the thing that makes me feel best about it:

image

On the support system they have an actual, honest, system status display. Very classy.

The 30 minute hacking report is:

  • I don't think I can make it display a once/{timeunit} update of a webcam using the intended APIs. I could mail a new image to it regularly, but it doesn't display the latest one by preference. There is not a way to email a "delete". - It contacts Kodak home base (running on Amazon's EC2, S3, and CloudFront) once per minute where it does:
    1. Some secret SSL shrouded query that they don't let me see. 2. An NTP lookup from a random server on the planet. 3. An HTTP query to see if it needs an update, nice XML response. 4. If needed, the files are then requested by a UUID and come down by HTTP. - Blocking the SSL shrouded query stops the others, but I'm pretty sure I could make a proxy to replace the content with my own. This however only works for picture frames in my domains where I control the routers and can intercept. - I captured its firmware upgrade. The file will be useful.

Looking forward:

  • I need to look at Amazon data rates and see if it would be abusive to use their browser API to upload and delete pictures, say once a minute all day. I'm sure that's more traffic than they expect, but perhaps the total cost is small enough to be ethical. - I'm itching to pop apart the 2nd unit, but I will wait until I have time to photodocument to see what is on the inside of these things.

Attachments

kodak.gif 35361 bytes
Maybe http://www.noerenberg.de/hajo/pub/kodak-pulse-picture-frame-server.php.txt is interesting for you (Kodak Pulse picture frame protocol reverse engineered, and some documentation on how to set up your own picture frame server).

Have you found any recent information on how I can delete pictures by email or without using the Kodak pulse account? Is there an API for the Kodak pulse account or can it be made?
hey i just bought one of these and i found this sequence of events very interesting...

1. look on the outside of the box, the activation code for use on kodakpulse.com is there - interesting, right?

2. log into kodakpulse, make some fake account (disposable/verifiable email address

3. register units that are still on the shelf for sale, send pics to them

4. someone you don't even know buys the units and sees YOUR pictures that you chose for them to see

could be offensive, or a scam (go here to win big = virus), or just for pure fun, etc

what do you think?

Hi. Just came round searcing for info on the Kodak pulse frame. Any news about your webcam project? thanks. S.
Do you have any updates on your project?  I have a pulse frame, but would like to know how to setup my own server if the bankruptcy goes bad.
Hi! I am trying to do something similar with the photo frame, but I am not being able to install a new firmware on it. Any ideas? How did your project go? 

Anyone has the email address of the guy (Hajo Noerenberg) who actually hacked it? 

Notes on using the OpenWRT backfire 10.03 kernel to run Debian on a WRTSl54GS.

  1. Get backfire: svn co svn://svn.openwrt.org/openwrt/branches/backfire
  2. make … install missing build packages, make… (40 minutes elapse)
  3. Make a wee script to to the boot_wait kernel load for the wrtsl54gs

    #!/bin/sh                                                                                                             
    tftp 192.168.1.1 <<EOF
    binary
    rexmit=1
    trace
    put openwrt-wrtsl54gs-squashfs.bin
    EOF
    

    Note: tftp doesn’t like path names, that is a softlink to the real location.

  4. The new kernel fails, as expected since I don’t have a root, but also confirms that it doesn’t load USB and probe for storage. Those must have been built as modules. Time to make my own kernel config.

  5. It is not clear how I can customize the kernel configuration. At least make menuconfig isn’t being terribly helpful. A “diff” of the code it compiled and a clean kernel confirms that there is a lot of patching going on. I will try the EXTERNAL_KERNEL_TREE option using a copy of the tree that OpenWRT built, but with my own configuration. Build in SCSI device, SCSI disks, all the USB stuff for mass storage, and the Video USB capture while I’m here. Also kernel command line root=/dev/sda1 rootwait.

  6. Install debootstrap, build a root with debootstrap –arch=mipsel testing rootfs
    W: Failure trying to run: chroot /home/jim/wrtsl54gs/rootfs mount -t proc proc /proc
    Why they heck would it chroot to something in an incompatible architecture?

  7. Add --foreign (to fix problem) and --variant=minbase as long as I have a do-over.