0

I use this sdk: http://altbeacon.github.io/android-beacon-library/samples.html My app already detect all beacons (AprilBeacons), I can get all info from beacon. BUT I should change major\minor, etc. fields and I don't know How to connect to beacon and save new data.

I create new beacon builder like:

Beacon changedBeac = new Beacon.Builder()
                         .setId1("2f234454-cf6d-4a0f-adf2-f4911ba9ffa6")
                         .setId2("1")
                         .setId3("2")
                         .setManufacturer(0x0118)
                        .setTxPower(-59)
                        .setDataFields(Arrays.asList(new Long[]{0l}))
                        .build();

So How to send new beacon information to selected beacon?

Matt
  • 5,315
  • 1
  • 30
  • 57
whack
  • 1
  • 4

2 Answers2

1

Unfortunately, the library will not work to do this.

The problem is that there is no standard for configuring identifiers of hardware beacons, only for detecting beacons and transmitting beacons. Every hardware beacon manufacturer has a different way of configuring beacon identifiers. Some manufacturers have an app that configures identifiers, some have a proprietary SDK. Some manufacturers do not allow it at all.

If you wish to configure an April Beacon, check with the manufacturer for instructions.

The APIs you mention above are designed to make an Android 5+ device transmit as a beacon. They do not configure external hardware beacons.

davidgyoung
  • 63,876
  • 14
  • 121
  • 204
0

If you are using CC2540 or CC2541 as beacon you can send AT commands to the device like

AT+MARJ0x1234 Set iBeacon Major number to 0x1234 (hexadecimal)

AT+MINO0xFA01 Set iBeacon Minor number to 0xFA01 (hexadecimal)

AT+ADVI5 Set advertising interval to 5 (546.25 milliseconds)

AT+NAMEYOURNAME Set HM-10 module name to YOURNAME. Make this unique.

AT+RESET Reboot over bluetooth from your phone in string format without any delimiter or line break i.e \n and make sure the device is in connectable mode or else it won't work

Manish Malviya
  • 546
  • 2
  • 15