Log in

No account? Create an account


Andrew de Quincey's livejournal

Previous Entry Share Next Entry
Sony Ericsson LiveView hacking: complete
I've just checked in the final piece of the LiveView protocol. If you look here, you'll find a complete re-implementation of the LiveView protocol in Python, allowing it to be completely controlled from a PC.

It shouldn't be hard to port this to Java and completely replace the Android LiveView application with something else entirely if so desired; the protocol itself is fairly simple.

Using the python library does seem to be a bit more reliable than the Android app, but the device does still have some strange dis/connection issues now and then.

  • 1

so, how does it work?

I still haven´t got my LiveView, hopefully tomorrow.
The only other hack I've seen is a modified liveView apk which actually changes the icons shown on the watch.
So if I understand correctly, is the liveView just a simple terminal? Everything shown on the screen is sent from the phone?
even the animations?
That would be really cool.

Re: so, how does it work?

Yeah, its completely controlled from the phone. It has a few different modes of operation (menus, complete screen control, and a sort of input mode)

Thanks to your protocol analysis I was able to implement some of the protocol in Objective C on my Mac. I now have a tiny Mail.app icon on my LiveView. I was worried it wasn't going to like my PNGs - my first attempt used a PNG with a transparent background, but I reduced it to 256 colour indexed and put a black background in and it worked fine.

Just have to give it enough information now to stop it from going back to the clock showing 00:00 AM ---- -- -- all the time. I see the menu appear briefly when I press the right button but then it tries to sync again.

The long term plan is to have a module that can be added to a lockscreen/springboard replacement app in Cydia. I have a busy day job though so that's likely to be a month or two away.


Sounds like you're not replying to the GetTime message the liveview sends?

I'm not seeing that message at all. I wonder if because the pairing was done in OSX and OSX "created a serial connection" for it that it isn't immediately saying hi on the channel I expect. I am going to change my code so that it listens for ANY RFComm connection. Given that whenever you power on, it is reset to 00:00 I expect it is trying to call out before I see anything from it.

OK, so LiveView doesn't necessarily look for a service named "LiveView". It appears to connect back on the first RFComm port it finds. In my case on a mac it's "Bluetooth-PDA-Sync". It still doesn't seem to go from powered off to anything better than 0:00AM ---- -- -- without a press of the right button.

The other thing I was missing was the Ack Message. I've started to make it a self contained LiveView object which communicates back using delegates.

Pressing the right button now brings up the menu and leaves the menu there to scroll by touching left and right of the screen. The computer isn't rudely disconnected at the end either and I continue to get status updates.

I've checked it into github: https://github.com/fayep/GrowLView
This is my first for-real Mac program :) It tells a lot more via Console than via the TextView at the moment.

The aim is to have it so that you interact with the LiveView as an object and it interacts back via Delegates, just like other Cocoa objects.

Re: Getting there

Right, sorry I'd forgotten to mention about requiring the ACKs; it seems to be really picky!

And yeah, its quite annoying about the first-RFComm port thing, seems a bit shortsighted, since there's no reason you couldn't have other ports on an android phone (e.g. for serial bluetooth keyboards).

iOS integration


maybe, one day it can be implemented into btstack... but the rfcomm support is not yet complete.

best regards,

Curious if the device has any concept of timezones. The GetTimeResponse doesn't seem to include a timezone encoding. I have it setting the time now (just send a response without being asked) - I guess you send a time() with the adjustment already made if necessary and the device will show the wrong time until you sync next. Device still doesn't let me get into the menu however, preferring instead to ask for the object stream again.

Yeah, I just send the localtime output from time(); it doesn't have any concept of timezones that I could see. I couldn't figure out a way to force the device to a new time either; e.g. as you say if you change timezone you'd likely need to reset the device :(

Do you mean when you click on a menu item, it asks for the menu stream? Check out what STATUS code you're returning; it reacts different to a CANCEL than an OK and so on.

Lib in C#

thanks a lot for the protocoll reverse engineering.
Is it possible that you supply an C# version?

I tried to convert it, but i've big problems!


Hmm, I don't really have the time to do that, sorry.

Hi there,
your hacking saved my day - or my entire month :)

I bough a LiveView two days ago. Since the original software is completely broken, I found it hard to decide whether to return it, or try to reverse engineer the protocol. Now I don't have to do any of that and can start coding.

Since I plan to use the LiveView with my Android Phone, and the SE software is still completely useless, I'm gonna reimplement it in Java. There's still a week of work to be done before I can start that project, but then nothing can stop me.

I already update my LiveView Firmware, and I hope that the protocol has remained compatible. Also, I wonder if the device might support additional features that weren't there when you analysed it. We'll see.

Just out of couriosity, I'd like to know how much time it took you to do this. (Then I can multiply this by 10 and have an idea of how much time I would have spent...)

Thanks again for sharing your insights,

Cool, I'm glad its been useful to people. I've not tried the new firmware yet.

It only took a couple of days really; the bluetooth protocol dumping tool made it fairly straightforward.

fw upgrade

hi all, after the firmware upgrade, the device is more stable \o/

i do some tests on nokia n900 and n810, and it run with python 2.5.4 (smartphone an pda who run under maemo, a debian modified for smartphone)

for french timezone (dst+1) i do this :
clientSocket.send(LiveViewMessages.EncodeGetTimeResponse(3600+time.time(), is24HourClock))

is someone do something more user friendly in python ? i would like but i know nothing in python....

thank you Andrew for your job! :-)

import bluetooth

Has anyone gotten this to work on a mac?
I get an error importing bluetooth library.
I tried Pro:lightblue but it had an XCode error at the end of setup.py xcodebuild: Error: the directory /Users/.../lightblue-0.4/src/mac/LightAquaBlue does not contain an Xcode project.

Can you tell us what software you need to run this, Python version, libraries drivers...


Re: import bluetooth

I suspect the killer will be the bluetooth library as you say.

Under linux, I just installed "pybluez", no idea under the mac, sorry.

Thanks for your work! I was planning to attempt this exact same thing, but you made my life a lot easier.

I wrote an iPhone implementation of the LiveVIew server a few months ago, but I'm just lacking a little piece: how the heck do you process an alert? What I mean is, for example, when the Android implementation receives a text message, the device's screen turns on, and displays a text message icon.

I cannot for the life of me figure out how this works, it seems to be missing from your protocol implementation. When I use the SetStatusBar command (or whatever it's actually called), it has the desired effect, but only if the screen is already on (i.e. you pressed a button on the deivce), and I can't figure out how to turn the screen on from my code other than in SetMenuSize(0) mode, when SetStatusBar does not work at all.

Any advice?

Great work!

I'm very impressed in your work! Thank you very much!

  • 1