Create a VM that transmits as a proximity beacon with AltBeacon technology and scans for other nearby beacons with the AltBeacon specification.
If you receive an error message like the one below trying to capture your bluetooth device, a quick solution to this problem is outlined in a section below.
Now you can use the Virtual AltBeacon manually by calling the altbeacon scripts in the command prompt and pressing enter.
altbeacon_transmit
altbeacon_stop
altbeacon_receive
Out of the box, the Virtual AltBeacon sends out an advertisement once per second with null ID1 (00000000-0000-0000-0000-000000000000), ID2 of 1, and ID3 of 1. Visit the AltBeacon examples page for tools to detect the Virtual AltBeacon and confirm it is transmitting.
You can set the three broadcast identifiers (ID1, ID2, ID3) by editing the altbeacon.conf
file. Note that these identifiers must be entered as individual hexadecimal bytes separated by spaces. For ID1, this means you don’t type any dashes and put a space between each set of two characters. For ID2 and ID3, numbers must be entered as two byte hexadecimal numbers, the most significant byte first.
If you don’t know hex, you can use this site to convert numbers for you. Just know that you need to take the result and turn it into two bytes separated by spaces. So for a decimal value of 12, you put the “C” hex result into the config file as “00 0C”. For the decimal value of 12345, you put the “3039” result into the config file as “30 39”.
You can also set the Reference_RSSI measurement in the config file. This is the calibrated Transmitter power, and the value you set is specific to your Bluetooth LE dongle. Setting this is optional (a default value has been programmed), but if you don’t configure it for your BLE device, you may get less accurate distance measurements. Calibration involves using the AltBeacon Locate (Android) calibration feature to measure the average RSSI of the beacon when the phone is held one meter away. The resulting value is a negative number that must be encoded as hex. You can do the hex encoding using the same converter as above, but in this case you use only the last two characters of the hex value. So if the calibrated Tx Power is -98 RSSI, the converted hex value is “FFFFFFFFFFFFFF9E” and you would enter “9E” into the config file for Reference RSSI.
For a BLE Device to work with the Virtual AltBeacon, it must have low level USB compatibility with your host computer as well as compatibility with the Linux BlueZ Bluetooth stack. A full list of devices known to work and not work are shown below. Please send us reports of other working hardware to support at radiusnetworks dot com.
###Known to work:
###Reported to work with modifications:
###Known not to work:
Below is an outline for a fix to the common error where the host machine captures the bluetooth dongle before it can be captured by the virtual machine:
hciconfig
into the command line and you should see a hci0
device listed.altbeacon_transmit
to begin broadcasting as an AltBeacon.If this doesn’t work, you can also try another fix (for OS X) found here
Contact support at radiusnetworks dot com if you have any questions or need more information.
Note: These modifications have been reported by end-users and have not been verified by Radius Networks.
Inspect /var/adm/kernel.log you will find something similar to
P: Vendor=0489 ProdID=e031 Rev=01.12
S: Manufacturer=Broadcom Corp
S: Product=BCM20702A0
S: SerialNumber=3859F9CD2AEE
Execute the following:
$ modprobe btusb
$ echo "0489 e031" >> /sys/bus/usb/drivers/btusb/new_id
Adjust the values in quotes above to match the Vendor and ProdID you find in the log file.