Use Bosch XDK with IoTool in research and study projects
- IoTool Blog
- Read 2401 times
“I’m a prototyping platform for any Internet of Things use case that you can imagine, and more!” is written on the XDK website.
With XDK / IoTool this can be easily achieved. IoTool is a tool, a platform for fast making IOT solutions. XDK is only one of supported devices, but it is perfect for prototyping, testing, teaching and learning.
To get IoTool and Bosch XDK 110 service:
1. Check which sensors (beside IoTool Bosch XDK) you need (like internal Android sensors, Video camera or similar) - supported sensors
2. Register and Login to IoTool.io
3. Get Google Play links - main IoTool application and plugins
4. Install IoTool - user manual
To use Bosch XDK with IoTool using IoTool Sensor Service Bosch XDK, the correct firmware must first be uploaded to the device. This service uses the "Virtual XDK" demo application on XDK provided by Bosch. To upload the firmware to the device, Bosch XDK SDK must be installed beforehand, available here, this demo was compiled using SDK version 1.6.0.
Once the SDK is installed, the source code for the "Virtual SDK" demo application must be downloaded from here. After having downloaded the source code for the demo project, import it into the XDK IDE by navigating to the "File" menu and selecting "Import project". Import project using the project archive, by choosing the downloaded "Virtual SDK" demo sources archive. When the project is loaded successfully in to the IDE and Bosh XDK is connected to the computer via a USB cable, the device should be visible in the device manager. To upload the firmware to the device click on flash button in the device manager and wait for the firmware to be uploaded.
Although the device can now already be used with IoTool, there are a few essential changes that need to be made to the source code that improve device usability:
1. Bluetooth stack overflow fix: Current firmware does not assign enough memory to the Bluetooth LE stack, resulting in randomly occurring stack overflows. To fix this issue apply the following changes:
#define VXA_BLE_STACK_SIZE_FOR_TASK (configMINIMAL_STACK_SIZE + UINT8_C(10))
/* Change to */
#define VXA_BLE_STACK_SIZE_FOR_TASK (configMINIMAL_STACK_SIZE + UINT8_C(1024))
2. Change accelerometer and gyroscope modes from orientation to normal mode: By default these sensors are used for detecting orientation in demo application. If sensing of raw sensor values is desired apply the following changes:
/* Line 33 */ #define ORIENTATION_SENSOR_USED 1 /* Change to */ #define ORIENTATION_SENSOR_USED 0
/* Starting at line 167 */ sendBuffer = (uint8_t)gyroData.xData; sendBuffer = (uint8_t)(gyroData.xData >> 8); sendBuffer = (uint8_t)gyroData.yData; sendBuffer = (uint8_t)(gyroData.yData >> 8); sendBuffer = (uint8_t)gyroData.zData; sendBuffer = (uint8_t)(gyroData.zData >> 8); /* Change to */ sendBuffer = (uint8_t)gyroData.xAxisData; sendBuffer = (uint8_t)(gyroData.xAxisData >> 8); sendBuffer = (uint8_t)gyroData.yAxisData; sendBuffer = (uint8_t)(gyroData.yAxisData >> 8); sendBuffer = (uint8_t)gyroData.zAxisData; sendBuffer = (uint8_t)(gyroData.zAxisData >> 8);
3. Currently all sensors expect the sound pressure level sensors are working. There is no news on when support will be added. Although in the source code several functions that take care of this sensor are found, the driver itself is not yet implemented. It would be necessary to implement ADC for the device on channel 4 to get this sensor to work.