HTCSensors library for HTC Diamond

Standa

Member
Licensed User
Longtime User
Anybody successfully tried this library on HTC Advantage? I had error messages about missing libraries, so I downloaded htcapi.dll and htcsensorsdk.dll into program folder. Errors are disappeared, but app shows me just zeros, nothing useable...
 

gronostaj

New Member
Licensed User
Hi agraham,

I'm pda.pl editor and I'm writing article series about Basic4ppc. I'd like to write something about G-Sensor and ByteConverter libraries, but people who don't have licenses wouldn't be able to download DLLs. So I'm asking for your permission: would you allow me to publish these DLLs on external server?
 

kemet

New Member
Licensed User
Longtime User
Will this library work with an HTC HD2?

I compiled the sample file and tried the .exe on a HD2. You need HTCAPI.dll in your .exe folder or your windows folder.
Obviously, there is no stylus sensor nor a Nav Control on this phone so you'll get data only for the light sensor and the G-sensor.
I haven played around with it yet but so far the orientation property seems to only return "2"

Great library though
 
Last edited:

ahkub

New Member
Licensed User
Hi Kemet,
which HTCAPI.DLL do you use in your windows folder?
I have tried 2 versions I found on the internet, one is 5 kB, one is 4kB, but HTCSensorsDemo.sbp keeps telling me: Data()=Gsensor.GetRawSensorData Error description: Array types do not match.

Regards,
ahkub
 

ahkub

New Member
Licensed User
Accelerometer/G sensor and GPS

Hi agraham,
Yes, that seems to have solved the issue. Much appreciated!

Let me pick your brain a little, if that's OK:
- Would you know if the magnetic sensor values (HTC HD2) can also be pulled from your fantastic Sensor library?

- HTC use SirfStarIII GPS chipsets in their HD2 (probably also in their aother phones). Usually, you can switch the output of the SIRF chips between NMEA (ASCII output) and SIRF-specific binary output. The Sirf-specific output is very valuable because it contains many nice things which are not part of the NMEA message. However, I have not succeeded to switch from NMEA to SIRF protocol.
Would you know if HTC has purposely locked this feature?

Best regards,
Alf
(HTC HD2, Basic4PPC 6.9)
 

ahkub

New Member
Licensed User
HTC HD2 compass

Dear agraham,
If I'm not mistaken, your HTCSensors.dll from HTCSensors1.0.zip receives the g-sensor data from HTCSensorSDK.dll.
MilanCzeque succeeded to extract the compass data ([REF] Compass api on HTC LEO - xda-developers), I guess he pulls them from a different dll: HTCSensorService.dll. (I see this dll in his code.)

Now my question would be: Would you know what would be the next steps to make use of his great work and turn it into a dll which can be used in B4PPC?:sign0085:

Regards,
ahkub
 

agraham

Expert
Licensed User
Longtime User
Would you know what would be the next steps to make use of his great work and turn it into a dll which can be used in B4PPC
Yes, compile it into a library that B4PPC can access. No, I'm not going to offer to do it as I am busy on Android at the moment and anyway don't have a compatible device for testing.
 

ahkub

New Member
Licensed User
HTC HD2 compass

Hi agraham,
No, I did not expect you to do it. I was hoping you would point me in the right direction which steps I had to take to compile it into a library that B4PPC can access.
Your advise is much appreciated.

Best regards,
ahkub
 

MM2forever

Active Member
Licensed User
Longtime User
do I need the HTCAPI.DLL for proper copiling? Where do I get it from can someone supply a link please I searched the NET but couldn't find it.

I got an HD2 btw (since last friday :sign0060:) and i wanted to code something for the g sensor...
 
Top