Vision: Developing code for connected devices should be substantially similar to the way we develop software for web pages. GitHub should be the primary mechanism by which code is versioned and deployed to connected devices, allowing developers to have the freedom to use the IDE or development environment of their choice. Furthermore, BLE is an ideal tool for interacting and configuring internet connected devices and reading sensors and should be the primary means of communicating and configuring such devices. Wi-Fi should be used for heavier tasks like deploying code via GitHub.
The core principal is to use BLE for most common development tasks and basic settings and sensor readings in an automatic fashion. Wi-Fi will be used to deploy and pull Node.js code from a GitHub repo we teach the Edison by writing to a characteristic over BLE during the boot phase. This may be best accomplished by using a simple mobile application with a “sheet” of entry fields.
The basics might run something like this:
- Intel Edison has an automatic BLE profile which exposes the following characteristics:
- Intel Edison Profile GATT service(s)
- Edison name (writeable)
- Edison password (optional, writeable)
- Edison Wi-Fi SSID (writeable)
- Edison Wi-Fi Password (writeable)
- Edison development Repo (GitHub) (writeable)
- Edison IP Address service (writeable)
- Edison available hard drive space (Readable)
- Edison is online / offline (Readable)
- Edison battery (Readable)
- Edison Sensor Services (w. characteristics) (A list of all sensors currently plugged into Edison and their values), perhaps this is just a list of pins and any value coming through the pins
- When I plug Edison in near my computer, I want to be able to scan for my Edison and then use a mobile app to teach it the Wi-Fi SSID and Password so Edison can jump online (or computer). This is all done using BLE.
- New users can automatically detect Edison with some mobile app and configure it for Internet right away
- The mobile app can, like Spark Core, help users read / write pins as needed
- Development workflow
- Once Edison is online, it can pull from a provided GitHub repo and then run the Node.js code in that Repo on demand, you just need to write a GitHub repo to the required characteristic. These actions are trigged by BLE commands sent from a mobile device.
- The mobile app (or desktop app) can be used to trigger “rebuild, install and run” actions via BLE to make Edison restart and run code on the device
- The following signals are supported:
- Install and rebuild / Clean Node.js
- Run Main.js service
- Stop Node service
- Get latest from GitHub
- Some type of scanner is running which detects whenever pin inputs have been modified and automatically rebuild Edison’s service characteristic listing
Thats it. There also likely needs to be some trickery around setting / resetting a password or auth token with the Edison. Much of the above information should also be available via REST API potentially.
Another important step will be to make it easy to trigger pins using BLE via a paired mobile device.