• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Reading voltage value from BTLE device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading voltage value from BTLE device


  • Subject: Reading voltage value from BTLE device
  • From: Constantijn Schepens <email@hidden>
  • Date: Wed, 07 Nov 2012 21:26:40 +0000

Hi there,

I am working with a custom bluetooth profile which is designed to store multiple voltage values in its GATT database.  (BLE112 using BGScript to be specific) This all works correctly. My iPhone connects correctly as well as finds characteristics correctly. My issue arises when I try to read the values of my characteristics. I just am not managing to read the value that is in the GATT database. It always comes out with really large (but consistently so) numbers, yet I cannot understand why because I feel I am reading the correctly number of bytes. The GATT database stores these values (coming from an ADC) in 4 bytes. The code I am currently trying to use(based on the TemperatureSensor example) is:

CGFloat result = NAN;
int32_t val = 0;

{sensorZeroCharacteristic.value getBytes:&val length:sizeof(val)];
result = (CGFloat)val;

Can anyone see what I might be doing wrong or just have a better(correct) way of doing this?

Thanks in advance!
Constantijn
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Reading voltage value from BTLE device
      • From: Etan Kissling <email@hidden>
    • Re: Reading voltage value from BTLE device
      • From: Louis Mamakos <email@hidden>
  • Prev by Date: RE: Resetting CentralManager to re-detect previously detected devices
  • Next by Date: Re: Reading voltage value from BTLE device
  • Previous by thread: Re: background thread delay
  • Next by thread: Re: Reading voltage value from BTLE device
  • Index(es):
    • Date
    • Thread