The Beacon sample, called BLEBeaconScanner is not working with Tokyo. It will fail here:
The Beacon sample, called BLEBeaconScanner is not working with Tokyo. It will fail here:
BinToHex(@ScanResponse.Items[TScanResponseKey.ManufacturerSpecificData][BEACON_GUID_POSITION], PChar(LSTBuff), GUID_LENGTH);
On previous Delphi (Berlin) it worked. Error is:
[DCC Error] Unit4.pas(112): E2010 Incompatible types: 'System.TArray' and 'Pointer'
I tried to solved but of course I couldn't :)
BinToHex(@ScanResponse.Items[TScanResponseKey.ManufacturerSpecificData][BEACON_GUID_POSITION], PChar(LSTBuff), GUID_LENGTH);
On previous Delphi (Berlin) it worked. Error is:
[DCC Error] Unit4.pas(112): E2010 Incompatible types: 'System.TArray
I tried to solved but of course I couldn't :)
Just remove the local BinToHex procedure.
ReplyDeleteUwe Raabe Yes, but shouldn't be necessary? If I remove the local proc now we get: "There is no overloaded version of 'BinToHex' that can be called with these arguments" :(
ReplyDeleteThat specific issue can be solved with a hard cast.... as risky as it is. The demo should have been fixed, of course. Logged internally.
ReplyDeleteMarco Cantù Thank you Marco! I am adding iBeacon to my service app, I really would like this working, could you or someone else address how to cast that var?
ReplyDeleteMagno Lima, I know this is old now but since the sample hasn't been fixed yet, I stumbled on this one as well and managed to make it work with the following:
ReplyDeletefor i := 0 to GUID_LENGTH-1 do
LSTBuff := LSTBuff + IntToHex(ScanResponse.Items[TScanResponseKey.ManufacturerSpecificData][BEACON_GUID_POSITION+i],2);
Paschalis Tsepelidis Thank you very much!! I even had left aside using Delphi with beacons, now can give a try! Again, thank you very much!!
ReplyDelete