SensorLib: a peek at the future

So, we all know many new devices have much of the same sensors: GSensor, Compass, Light Sensor, Proximity Sensor, etc.

The problem is no common APIs exist, and most dev's only support HTC and occasionally Samsung (usually through SDK). As I am now working on some cool things that will make use of these sensors, I have started an effort to make a library that supports all of them through a common interface. While of course there is Koushik Dutta's awesome C# project supporting various HTC and Samsung sensors, this was not enough to my liking as I don't believe in managed code for "base" libraries nor do I think it supports enough brands / models.

Luckily WM7 is rumored to bring a true unified sensor API, but until that time...

Currently my library only supports GSensor and Compass, but I am working on the other sensors!

GSensor support:
- HTC
- Samsung SDK 2.x
- Samsung SDK 1.x
- Samsung < 2009 raw
- Samsung >= 2009 raw
- E-Ten/Acer
- Toshiba
- LG

As far as I know it is the only software not licensed by LG that can actually use the LG GSensor, and it is definitely the only library that supports as many different brands and sensor models!

Compass support:
- HTC
- Samsung SDK 2.x

Planned light sensor support:
- HTC
- Samsung SDK 2.x
- Samsung SDK 1.x
- LG

Planned proximity sensor support:
- HTC
- Samsung SDK 2.x
- LG

GSensor and Compass (if available) have so far been tested on the following devices (Samsung's using various APIs):

- HTC Touch Diamond
- HTC Touch Pro
- HTC Touch HD
- HTC Touch Diamond 2
- HTC Touch Pro 2
- HTC HD2
- Samsung Omnia I900
- Samsung Omnia II I8000
- Samsung Omnia II I920 tested by surgex
- Samsung Omnia Pro B7610
- Samsung Giorgio Armani II B7620
- Acer M900 tested by hdubli
- Acer F900 tested by hdubli
- Acer F1 / neoTouch S200 tested by hdubli
- Toshiba TG-01 tested by Paul Diston (SmartMobileDevice)
- LG Expo / IQ / Monaco tested by Jug6ernaut

All devices tested by myself unless stated otherwise. I hope to add more sensors and devices soon!

Also, at the time of writing, all sensors work on all devices in unattended mode (!!) except for the original Samsung Omnia.

EDIT#1: Seems LG Expo GSensor really doesn't work in unattended mode for the moment. Under investigation!
EDIT#2: OK LG Expo GSensor does work in unattended mode with my mods, jug6ernaut just made a mistake with testing.

Comments

Posted by Frank Razenberg on 08-01-2010 at 01:41:15
Very nice, I hope you'll manage to successfully reverse engineer the HTC proximity sensor. Looking forward for more.
Posted by Pascal on 08-01-2010 at 20:06:37
Hi Chainfire,

Where is the download link?
Posted by Chainfire on 09-01-2010 at 17:19:12
The library is still under development, it's not public yet. Hence the 'peek' in the title!
Posted by pauloke on 10-01-2010 at 13:38:28
Keep up the good job. Maybe I can update the Touch Diamond VR Hologram to support more phones when this is available.
Posted by Jinjav on 10-01-2010 at 17:06:34
That's indeed something that I was looking for... Keep up with the job...
Posted by Chainfire on 14-01-2010 at 16:07:55
SensorLib now fully supports HTC and Samsung proximity sensors. LG proximity sensor only supported while the screen is on.

HTC requires runtime patch, Samsung and LG work out-of-the-box. Still working on supporting LG proximity sensor from unattended mode, but it does not look promising.

As for Acer (F1), I've failed so far to figure out how the proximity sensor works on this device.

Stylus sensors have been added as well.

As for light sensor, it seems again Acer will be the odd one left out, as also for this it seems the sensor is hard to figure out.
Posted by TheYllib on 18-01-2010 at 01:56:40
How long until i can expect to get my hands on this? I have an LG eXpo(I would do testing for you if you like), and am anxious to get access to the gsensor with various applications.
Posted by TheYllib on 18-01-2010 at 02:13:29
Sorry for double post, but i would even be willing to pay for a simple patch for the expo to be able to use the gsensor =P
Posted by joe on 18-01-2010 at 21:05:01
chainfire, what is your timeframe for this. I may consider providing support for your SensorLib on our platform, but would like to reach you to discuss this.
Posted by Chainfire on 19-01-2010 at 01:20:34
I don't really have a set timeframe, I'm actually developing this as part of an application I am making, and thought it'd be useful for others. There's some work to be done before it can be published.

I am hoping for a beta-release soon, though I am always working on 10 different projects at the same time with varying priority.

As for contacting me, you can mail me at chainfire at chainfire dot eu
Posted by michael on 22-01-2010 at 05:40:13
Brilliant work as always! Can't wait to see the beta-release!
Posted by GHK on 30-01-2010 at 08:39:05
Great news indeed.
We are tired of searching for something to activate the g-sensor at our LG Eigen WM phones (GM 730 series 730f, 735 etc).
Keep it up.
Thank you.
Posted by Chainfire on 30-01-2010 at 19:12:08
GHK, I have no idea of the LG Monaco (Expo, IQ) GSensor code is compatible with the GM73x series. However I will release a test tool soon. Feel free to mail so we can do some tests.
Posted by l3v5y on 31-01-2010 at 22:33:03
I at one point made a wrapper for Samsung and HTC GSensors (C++ obviously) but this seems a much better project and I hope it works well! :)
Posted by Fadi on 08-02-2010 at 13:15:13
I Can't wait for the link to be posted!
Thank you chainfire
Posted by ttca on 09-02-2010 at 00:49:29
Would be nice to see support also for the LG GM750 which uses WM6.5.

If I understand you right, your lib is a api wrapper so that all currently availabe htc applications will work with all phones ?
Posted by GHK on 09-02-2010 at 13:28:08
iamspv at xda-developers worked out a sensors.dll which can now trigger the g-sensors at LG-GM73X and GM750.

You may want to have a look.
http://forum.xda-developers.com/showthread.php?t=471591&page=1

how can we mail you for testing ?
Posted by Chainfire on 09-02-2010 at 14:23:35
I have read that thread, I will try implementing it soon :)
Posted by Chainfire on 17-02-2010 at 14:36:41
SensorLib has been cancelled

While I got most of it working, I've stated before that I was developing it for my needs for an application I was building.

I wanted to get all this stuff done right before releasing anything. However now it seems that not only has somebody else released a shoddy beta version of the same thing, but also for free and open source.

Since there is no competing with that, I have no further need of SensorLib development and thus I won't spend more time on it.
Posted by Michael on 22-02-2010 at 01:27:22
I am very sorry to hear that you won't be finishing the project. I know alot of us were looking forward to your release. Your work is always quality and you have a large number of fans.

Could you point us to the open source project you are referring to?
Posted by Chainfire on 23-02-2010 at 15:59:13
The project is SleepSense, you can find it on XDA. It doesn't support all the sensors like SensorLib does, though.

I might be releasing fragments of code for using for example the LG Expo G-Sensor for developers, not sure about that yet.
Posted by killerskincanoe on 01-03-2010 at 17:08:19
very upsetting indeed to be reading this was canceled.. as i was greatly lookin forward to the LG expo info :(
Posted by Chainfire on 01-03-2010 at 19:36:15
You might be in luck, jug6ernaut's excessive nagging about the LG Expo GSensor is making me consider releasing an HTC-compatible DLL to enable the Expo's GSensor to work with a lot of applications (though not all)






You may use tags like [b], [u], [i], [url], [quote], [code], [pre], etc