We live in an increasingly rushed world were every minute counts. We "fast forward" in the "road" of life using more and more services to improve our efficiency at work, our success in sports or our overall enjoyment of life.
It comes as no surprise that smartphones increasingly capture our attention and are becoming the "natural" way of interacting with services. We use them for checking the weather, calling a cab/Uber, communicating with our loved ones and for so many other things.
So, why not use it to pay for public transportation? Well... there are already plenty of applications allowing paying transports via Smartphone App. Numerous cities and public transportation companies have adopted some variation of electronic payment, e.g., using QR codes, Bluetooth beacons, or embedded NFC communications. So, where is the challenge?
"The difficult is what takes a little time; the impossible is what takes a little longer" - Fridtjof Nansen
Actually, there are two key challenges:
- Existing systems are not transparent, i.e., the user is required to explicitly interact with the transport payment system (e.g., read a QR code, access an App or show the smartphone screen to some reader). In busy transports, having to spend time in this process can congest the access and significantly degrade the user experience.
- Existing systems rely on bank transactions for rapid payments, which encompass non-negligible costs. If the payments are conducted using pre-charged credit, the user is putting forward his/her money in benefit of the operator without having consumed any service. Conversely, if the payment is done after the service provision in a regular basis, the operator has to support the upfront costs and charge only after a (typically) long period of service use (e.g., monthly).
The idea is simple: install Bluetooth (IOTA) Beacons in public transports and use them together with a smartphone App on the passenger's smartphone to detect their entry/exit, and automatically pay for the trip.
This project provides a proof-of-concept of the idea by implementing both the smartphone (Andoid) App and a Beacon simulator. The App "sees" all the advertising beacons installed in the public transports and can fetch specific information from them, namely the associated transaction hash, which stores relevant information in the Tangle (e.g., fee, bus zone, address to pay).
Currently, as a demonstration, the payment process in the Andoid App is done manually, initiated when the user selects an IOTA beacon followed by tapping the IOTABeacon BLE characteristic.
The Android App was developed in Android Studio using the programming language Kotlin. The app source code is a modified project taken from the base project:
https://github.com/objectsyndicate/Kotlin-BluetoothLeGatt
The
IOTA API library used in the app is the IOTA's JOTA Java library 1.0.0-beta1
.
The beacon itself is implemented on Node.js using the Bleno library. The source code is a modified version of Bleno's "echo" example:
https://github.com/noble/bleno/tree/master/examples/echo
It only advertises the transaction hash containing the payment information. The code
To run the beacon node, Bluetooth must be on, Node.js installed and root permissions must be granted to the node. To run the node:
sudo node main.js
The beacon only advertises a transaction hash which contains the payment data. In our example, the data is stored in:9GQPJQWSIRCKQZG9VGXMPVYVSWUDEIULRQPIHHQSBHXTSQTSFCKYPD9EWFQKMGOGUVJXBIYRXBBUA9999
The app reads the transaction hash and fetches the payment data from the Tangle. If there are any changes that need to be made to the payment data, the operator issues another transactions and changes the transaction hash that the beacons emit.
* In our app, currently, the payment is done only through a dummy transaction, no actual exchange of IOTAs is made. A transaction is added to the Tangle under the address stored in the data of the advertised transaction.
Comments