i use this code to send beacon data
this line
bb.Append(Array As Byte(0, 9, 0, 6, 0xb5))
write Major and minor values
first two bytes are first and second byte of Major
my question is how to convert int value to present first and second byte
in other way if i want to send major value 300 what i should write
B4X:
Dim bb As B4XBytesBuilder 'B4XCollections
bb.Initialize
bb.Append(Array As Byte(0x02, 0x15))
Dim bc As ByteConverter
bb.Append(bc.HexToBytes("0CF052C297CA407C84F8B62AAC4E9020"))
bb.Append(Array As Byte(0, 9, 0, 6, 0xb5))
Dim b() As Byte = bb.ToArray
peripheral.ManufacturerData = CreateMap(76: b )
this line
bb.Append(Array As Byte(0, 9, 0, 6, 0xb5))
write Major and minor values
first two bytes are first and second byte of Major
my question is how to convert int value to present first and second byte
in other way if i want to send major value 300 what i should write