Adding LED Matrix device on iOS client causes IoT Framework to terminate
I attempted to add LED Matrix on the iOS client with LED Matrix connected to the RPi board. However, the IoT framework signaled an error and terminated process.
pi@rpi2:~/tigase-iot-framework-2.0.0-SNAPSHOT-b65 $ ./bin/tigase-iot-framework 2018-04-20 00:09:40.077 [pool-2-thread-6] ConnectionErrorReporter.handleDisconnected() INFO: Disconnected from Tigase IoT Hub as 053563a3-7671-4fed-935c-bf4b401c4189 2018-04-20 00:09:48.090 [pool-2-thread-9] ConnectionErrorReporter.handleConnected() INFO: Connected to Tigase IoT Hub as 053563a3-7671-4fed-935c-bf4b401c4189 2018-04-20 00:09:48.246 [pool-2-thread-16] ConnectionErrorReporter.handleAccountStateChanged() WARNING: Account for this devices 053563a3-7671-4fed-935c-bf4b401c4189 is awaiting acceptance. If you want to enable it please use your IoT client and enabled it in 'Manage devices'. Until then it will not be possible to use this device. 2018-04-20 00:10:18.128 [pool-2-thread-3] ConnectionErrorReporter.handleAccountStateChanged() INFO: Account for this devices 053563a3-7671-4fed-935c-bf4b401c4189 is now active. 2018-04-20 00:10:18.128 [pool-2-thread-5] ConnectionErrorReporter.handleConnected() INFO: Connected to Tigase IoT Hub as 053563a3-7671-4fed-935c-bf4b401c4189 Unable to open SPI device: No such file or directory
#2 Updated by Artur Hefczyc 10 months ago
- Due date set to 2018-04-23
- Assignee changed from Andrzej Wójcik to Daniel Wisnewski
Ok, found a solution.
It is worth to mention that I use the latest raspbian lite, and some things might be different from the previous raspbian.
As mentioned, the pi user is already in the SPI group (and other groups like i2c and gpio as well). The problem was actually SPI was not activated on the OS level, that is kernel modules for SPI were not loaded and apparently they are not loaded by default.
To activate the SPI you have to run:
$ sudo raspi-config
Then find "Interfacing Options" item, enter there and there you have all the interfaces you can/should activate: SPI, I2C and others. After activating SPI and loading kernel module for it. The IoT Framework no longer complains and fails when I try to activate LED matrix.
Daniel, please incorporate this information to your Getting Started guide.