Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 2.18 KB

README.md

File metadata and controls

49 lines (33 loc) · 2.18 KB

wifi-commissioning-gatt-service

Product page: https://www.omnect.io/home

This service is intended to run on a device that is delivered to an end-user without a preset configuration for its wifi settings. It allows a bluetooth client (like a Chrome browser running on a PC or smartphone) to make the appropriate settings to connect the device to an existing wlan access point.

Usage

This service uses the following command line options:

  • -b, --ble-secret <BLE_SECRET>
    • secret shared between client and server used for BLE communication
  • -i, --interface <INTERFACE>
    • (wireless) network interface name [optional, default: wlan0]

systemd integration

The crate wifi-commissioning-gatt-service has the optional feature systemd.
If you enable systemd it notifies systemd that the startup is finished.

The systemd service file systemd/[email protected] is using the script omnect_get_deviceid.sh (see -b option), in order to supply the device ID. In the case the service is not used in combination with the meta-omnect layer, it has to be adapted accordingly.

Test

There is the web based bluetooth client client/web_ble.html, which can be used to configure the wifi of the device using bluetooth. The web browser has to support the bluetooth API; e.g., the Chrome browser. The BLE_SECRET variable in client/web_ble.js has to be set to the shared secret, in order to authorize the bluetooth connection.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


copyright (c) 2021 conplement AG
Content published under the Apache License Version 2.0 or MIT license, are marked as such. They may be used in accordance with the stated license conditions.