Open Bug 521902 Opened 15 years ago Updated 2 years ago

Implement accelerometer support for a few Toshiba laptops models on Windows

Categories

(Core :: Widget: Win32, enhancement)

x86
Windows Vista
enhancement

Tracking

()

People

(Reporter: helder.magalhaes, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20091010 Minefield/3.7a1pre (.NET CLR 3.5.30729)

Few Toshiba laptop models seem to hold accelerometer support, used for a feature known as "THP", short for "(Toshiba) HDD Protection". 

As of this writing, the known series/models which support this feature [1] are:
 * Satellite Pro S3000 (see [2] for a closely related link);
 * Tecra A10, M10, R10;
 * Protégé A600, M700M, M750, R500, R600.

According to available documentation [3], the accelerometer support seems to reside in the motherboard, which makes me assume a single implementation should be able to work across the whole set (of models which support the feature).

The default pre-installed software comes with the "HDD Protection" bundle (located in '%ProgramFiles%\TOSHIBA\HDD Protection'), which contains the "Toshiba HDD Protection - 3D Viewer" ('Thp3dv.exe'), utility which allows seeing the accelerometers in action.

Just to make clear, I currently don't have the expertize to conduct an implementation myself, although I'm creating this issue to act both as a placeholder for ideas/patches and for an easier retrieval of a related issue for someone seeking for related material (reason why I've also included the list of supported models); nevertheless, I'll be happy to help testing any tentative implementation (I currently have access to a Tecra A10, by the way). :-)

Finally, although I'm created this issue with a Windows flavor (somehow taking bug 513233 as a template), the fact that the accelerometer is located in the motherboard makes me wonder if a cross-OS implementation would be possible/feasible. Likewise, I also wonder if an implementation *not* based in the pre-installed "THP" driver will be feasible: wouldn't it then require administrative privileges in order to perform the hardware access?


[1] http://www.toshiba.co.uk/easyguard/protection.aspx
[2] http://stackoverflow.com/questions/1106042/accessing-a-toshiba-laptop-accelerometer-device-driver
[3] http://eu.computers.toshiba-europe.com/Contents/Toshiba_teg/EU/WHITEPAPER/files/2007-03-3D-Accelerometer_EN.pdf

Reproducible: Always
(Adding a dependency on bug 485943 in order to ease retrieval/improve organization, hope this makes sense.)
Depends on: DeviceOrientation
A few comments:
a) I'd rather see us use the Windows 7 Sensor APIs rather than essentially write our own "drivers" for each driver.
b) I don't know what the value of accelerometer support is on laptops anyways (namely: how would Firefox make use of it?). I'm pretty sure we can get screen orientation information through some new Vista APIs due to the new video driver model they required.
(In reply to comment #2)
> A few comments:
> a) I'd rather see us use the Windows 7 Sensor APIs rather than essentially
> write our own "drivers" for each driver.

I agree with you if we are only interested in getting display orientation. From a comment in Doug Turner's blog [1] (and his reply [2]), it sounded like just knowing about the display orientation wasn't interesting enough.


> b) I don't know what the value of accelerometer support is on laptops anyways
> (namely: how would Firefox make use of it?). I'm pretty sure we can get screen
> orientation information through some new Vista APIs due to the new video driver
> model they required.

Having accelerometer data available could/would enable a set of innovative interfaces and/or Web applications (some neat ideas already available within the stated post [3]).


I'm not interested in turning this bug report into a debate, this is probably best done elsewhere. ;-) What I primarily meant was creating an issue for a know caveat which I took a bit to figure out (having hardware support but no software access on Firefox nightly builds), so anyone with similar hardware may more easily find a place where to share information.

If the project drivers feel like display orientation (portrait/landscape/more?) is enough from a framework/browser point of view, than probably this issue should be marked invalid and the newly available APIs used for the purpose.


[1] http://dougt.org/wordpress/2009/08/orientation/comment-page-1/#comment-1260
[2] http://dougt.org/wordpress/2009/08/orientation/comment-page-1/#comment-1265
[3] http://dougt.org/wordpress/2009/08/orientation/comment-page-1/#comment-1247
(In reply to comment #0)
> The default pre-installed software comes with the "HDD Protection" bundle
> (located in '%ProgramFiles%\TOSHIBA\HDD Protection'), which contains the
> "Toshiba HDD Protection - 3D Viewer" ('Thp3dv.exe'), utility which allows
> seeing the accelerometers in action.

I just noticed the "TOSHIBA PC Health Monitor" utility (located in '%ProgramFiles%\TOSHIBA\TPHM') also comes with a viewer ('TPCHViewer.exe') which displays real-time accelerometer state (in a wire-frame globe, displayed in the middle of the window). A crawl through the DLL libraries used by the utility showed a pair of interesting entries in 'TPCHCTL.dll':
 * GetAcceleratorInfo
 * SetSamplingRate
Unfortunately, this DLL is only available in the utility's directory, which hints towards it just being a wrapper to the accelerometer's interface(s).

Further investigation shows that both this utility and the already stated "HDD Protection" use the "Shock Sensor Driver" ('thpevm.sys'), through a low-level service "TOSHIBA HDD Protection - Shock Sensor Driver" ('Thpevm'): this will probably be the best way (at least in Windows) to query for accelerometer information (assuming the driver is installed, of course). :-)


(In reply to comment #0)
> Finally, although I'm created this issue with a Windows flavor (somehow taking
> bug 513233 as a template), the fact that the accelerometer is located in the
> motherboard makes me wonder if a cross-OS implementation would be
> possible/feasible. Likewise, I also wonder if an implementation *not* based in
> the pre-installed "THP" driver will be feasible: wouldn't it then require
> administrative privileges in order to perform the hardware access?

Comment no. 6 and no. 26 of Ubuntu issue no. 116045 [1] state that the chip is a "ST Microelectronics LIS3L02AQ" [2], which may become useful. Still, I doubt about the feasibility of a hardware-based implementation in a user-space application: Mozilla won't be shipping drivers for hardware access right? Or am I missing something? ;-)


[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/116045
[2] http://www.st.com/stonline/products/literature/od/9321.htm
Confirming that, although no work has yet been done in this regard, the "lack" of functionality (it's actually a feature request) is present.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.