Quick Start
Exploring the mobile example application demo
Clone the following repository, of the Golain Mobile SDK.
git clone https://github.com/golain-io/flutter-platform-shell.git
Execute the following command to download and install flutter packages as dependencies.
flutter pub get
Execute the makefile in the terminal to fetch submodules
make fetch-submodules
Go to the example directory and execute the following command to run the application on your device.
cd example
flutter run
Walkthrough of the Application
Once you run the application, you will be greeted with the following screen.
On opening the application, there would be 3 buttons visible,
- Bluetooth permissions
- Load/Reset a mesh network
- Scan for unprovisioned devices
![null][./getting-started/mobile/scanned.jpeg]
The Bluetooth permissions button would ask for the user's permission to turn on the bluetooth, its only configured once.
Load/Mesh network
- This button would setup a functional mesh network where devices can be configured and can be provisioned.
Scan for unprovisioned devices
- This button would scan for unprovisioned devices and would display the devices in a list view.
Provisioning a device
- Once, devices are scanned, they'll appear below.
- On clicking on any of the devices, they'll get provisioned and you'll get redirected to the provisioned devices screen.
Scan for provisioned devices
- This button would scan for provisioned devices and would display the devices in a list view.
Connect to a device
- Once, devices are scanned, they'll appear below.
- On clicking on any of the devices, they'll get connected and you'll get redirected to the connected devices screen.
Send and recieve data to and from devices using the custom Golain Vendor model.
- The Data plane GET requires an element address, displayed in the debug console, once, the data is appropiatly decoded using the Protobuf defined, the data is obtained.
- The Control plane SET requires the same element address, and it redirects to the control section, for taking the user inputs for sending data to the device, its encoded using the protobuf dart object and the byte array is being sent.
- The Control plane GET recieves the byte array data from the devices connected.
Deprovisioning the node
- Once the element address is entered, the device gets deprovisioned.