vhiribarren / beacon-simulator-android

Bluetooth Low Energy Beacon simulator for Android
Other
65 stars 20 forks source link

Beacon Simulator

  1. About this project
  2. Configure and build the project
  3. Removal of iBeacon support
  4. License
  5. Contributing

About this project

This is the repository for the Android Beacon Simulator project. It is currently published on the Play Store at https://play.google.com/store/apps/details?id=net.alea.beaconsimulator

This app transforms your Android device into a virtual BLE beacon advertiser and transmitter. You can create your own collection of beacon configurations and use them anytime, anywhere, to emulate a physical beacon.

Its purpose is essentially to help developers working on beacon software with more flexibility than with some real beacons.

Current features:

Android limitations:

Other limitations:

Permissions are for:

Configure and build the project

As compared with the project published on the PlayStore, the "community" prefix is added to avoid app collisions on devices.

Some files need to be added / modified after a clone of the project.

API Keys

Add a app/src/main/res/values/api_keys.xml file containing API keys:

Removal of iBeacon support

The support of iBeacon is removed from this open source code.

Reason

The Apple iBeacon license states:

Licensee will not, without Apple's express prior written consent:

(i) incorporate, combine, or distribute any Licensed Technology, or any derivative thereof, with any Public Software,

or

(ii) use any Public Software in the development of Licensed Products,

in such a way that would cause the Licensed Technology, or any derivative thereof, to be subject to all or part of the license obligations or other intellectual property related terms with respect to such Public Software. As used in this subsection, "Public Software" means any software that, as a condition of use, copying, modification or redistribution, (a) requires attribution, (b) requires such software and derivative works thereof to be disclosed or distributed in source code form, or (c) requires such software to be licensed for the purpose of making derivative works, or to be redistributed free of charge, commonly referred to as free or open source software, including but not limited to software licensed under the GNU General Public License, Lesser/Library GPL, Affero GPL, Mozilla Public License, Common Public License, Common Development and Distribution License, Apache, MIT, or BSD license.

In order to comply with those requirements, the iBeacon Bluetooth low energy advertise data packet format is removed from this source code.

The code may still contains some strings or data format referring to it (e.g. UUID, major, and minor numbers) since there are part of public interfaces and knowledge for developers.

Adding iBeacon support

Do not write me about the missing code, I will not answer.

If you agree with Apple iBeacon license and want to add iBeacon support, here are some clues where to add the code. You can do so and publish your work without having to distribute the iBeacon advertise format, since the license of Beacon Simulator allows this case.

For broadcast:

For scan in order to recognize iBeacon:

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Linking Beacon Simulator statically or dynamically with other modules is making a combined work based on Beacon Simulator. Thus, the terms and conditions of the GNU General Public License cover the whole combination.

As a special exception, the copyright holders of Beacon Simulator give you permission to combine Beacon Simulator program with free software programs or libraries that are released under the GNU LGPL and with independent modules that communicate with Beacon Simulator solely through the net.alea.beaconsimulator.bluetooth.AdvertiseDataGenerator and the net.alea.beaconsimulator.bluetooth.AdvertiseDataParser interfaces. You may copy and distribute such a system following the terms of the GNU GPL for Beacon Simulator and the licenses of the other code concerned, provided that you include the source code of that other code when and as the GNU GPL requires distribution of source code and provided that you do not modify the net.alea.beaconsimulator.bluetooth.AdvertiseDataGenerator and the net.alea.beaconsimulator.bluetooth.AdvertiseDataParser interfaces.

The intent of this license exception and interface is to allow Bluetooth low energy closed or proprietary advertise data packet structures and contents to be sensibly kept closed, while ensuring the GPL is applied. This is done by using an interface which only purpose is to generate android.bluetooth.le.AdvertiseData objects.

This exception is an additional permission under section 7 of the GNU General Public License, version 3 (“GPLv3”).

Some consequences are:

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Contributing

For app publication

This is a beacon simulator, not a scanner or can-do-anything tool.

I do not personally to make it evolute so much, so maintenance contributions are welcomed. If your goal is your contribution to be integrated in the current Beacon Simulator app on the Play Store, you should contact me before writing some codes and do a pull request. I will not automatically accept all pull requests.

You also have to accept the current software license, meaning you accept I can publish the contributed code on the Play Store without me having to give back the code to generate iBeacon advertise data packets.

If you add or modify a substantial part of the code, do not forget to add yoursef to the copyright notices at the top of the involved files.

TODO

Known bugs:

Features:

Code refactoring / enhancement: