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 :)

Comments

  1. Just remove the local BinToHex procedure.

    ReplyDelete
  2. Uwe 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" :(

    ReplyDelete
  3. That specific issue can be solved with a hard cast.... as risky as it is. The demo should have been fixed, of course. Logged internally.

    ReplyDelete
  4. Marco 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?

    ReplyDelete
  5. Magno 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:
    for i := 0 to GUID_LENGTH-1 do
    LSTBuff := LSTBuff + IntToHex(ScanResponse.Items[TScanResponseKey.ManufacturerSpecificData][BEACON_GUID_POSITION+i],2);

    ReplyDelete
  6. 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

Post a Comment