jmgasper / bleconfd

Bluetooth Configuration Manager
0 stars 5 forks source link

Add functionality for reading and writing GLib INI files #9

Closed jmgasper closed 5 years ago

jmgasper commented 5 years ago

Recently, we implemented code for both the bleconfd server (running on the rPi 3 B+), and the Android app client, to set wifi settings via BLE.

The client has asked us to extend the functionality available in the bleconfd server to include modifying .ini files on the rPi using JSON RPC calls over BLE. We are going to target GLib for this functionality.

https://developer.gnome.org/glib/stable/glib-Key-value-file-parser.html

We want to be able to:

Communication

All communication will be done over BLE, from the Android app to the rPi 3 B+, and vice versa. Keep in mind that we recently tweaked the communication a bit so that there's no more header, and messages are delineated with an ASCII character 30. (https://github.com/jmgasper/bleconfd/issues/7)

Target rPi

We are going to target the rPi 3 B+ specifically. Note that we will not support the B, just the B+. We will target the latest version of Raspbian as the deployment OS on the rPi.

We can target whatever version of GLib comes standard with Raspbian.

The path to the .ini file should be configurable, but having it just default to ./bleconfd.ini is fine.

We will add new code to the bleconfd app to support JSON RPC messages that will allow us to manipulate the key/value pairs and groups.

Target Android

For the Android app, please target Android 8+. The existing app is available in the Git repo, in the AndroidClientApp folder. We will expand on that app for this challenge.

For the Android app, we will add a new option to the UI to allow for modifying the INI file. Please use a standard side menu or tabbed interface, to now have two options:

The UI doesn't have to be fancy, but it should work as expected. The wifi functionality that exists should still remain in the app and work as expected.

The key/value pairs should be:

The user should be able to:

All changes should be automatically persisted back to the rPi as the updates happen in the app.

Validation

Because the .ini file modified by GLib should be human-readable, we can validate by:

Please ensure your validation document covers this clearly.