On this page
XdkExtensionPort
This example demonstrates the capabilities when using the extension bus of the XDK. It provides the possibility to communicate with external attached devices over UART, SPI, I2C or simply over GPIO. Furthermore, the example is configurable to use only one of the previously mentioned communication modules or all at once.
Programming
Find the files placed under AwsSendDataOverMQTT (4 files)
Modify the config.txt with ssid, password, serverurl, brokerurl and broker port as shown below in config.txt. picture.
Go to “IoT Core” available under “Services”, after logging into http://console.aws.amazon.com/. If you don’t have an existing account you have to create a new AWS account. Afterwards The Home page will open as shown below
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Available wireless network
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
BoschXDKCloudConnectivity
exampleFrom the Project Explorer, expand the project and then open the
AppController.h
fileEdit the
WLAN_SSID_DEFAULT
field to match the available networks nameEdit the
WLAN_PASSWORD_DEFAULT
field to match the available networks passwordClean and Build the project
Flash the project to your XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Available wireless network
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
HttpExampleClient
exampleFrom the Project Explorer, expand the project, open the source folder and then open the
AppController.h
file.Edit the
WLAN_SSID
field to match the available networks nameEdit the
WLAN_PSK
field to match the available networks passwordSave the file
Clean and build the project
Flash the project to the XDK
Push Button 1 Pressed
- Red LED State - ON
- Orange LED State - OFF
- Yellow LED State - ON
Push Button 1 Released
- Red LED State - OFF
- Orange LED State - ON
- Yellow LED State - OFF
Push Button 2 Pressed
- Red LED State - ON
- Orange LED State - ON
- Yellow LED State - OFF
Push Button 2 Released
- Red LED State - OFF
- Orange LED State - OFF
- Yellow LED State - ON
XDK
USB cable (USB A to USB micro)
Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
Connect the XDK to the PC via USB cable
Open XDK-Workbench
From the Welcome Screen, open the
LedsAndButtons
exampleClean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 and later installed
- Available wireless network
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
Lwm2mExampleClient
exampleFrom the Project Explorer, expand the project, open the source folder and then open the
AppController.h
fileEdit the
WLAN_SSID
field to match the available networks nameEdit the
WLAN_PSK
field to match the available networks passwordClean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Available wireless network
Connect the XDK to the PC via a USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
PpmpUnide
exampleFrom the Project Explorer, expand the project, open the source folder and then open the
AppController.h
fileEdit the
WLAN_SSID
field to match the available networks nameEdit the
WLAN_PSK
field to match the available networks passwordEdit the
SNTP_SERVER_URL
field to match the available SNTP server addressEdit the
PPMP_SERVER_URL
field to match the available PPMP server addressEdit the
PPMP_POST_URL_MESSAGE
field to match the URI where the message payload should be sent toEdit the
PPMP_POST_URL_MEASUREMENT
field to match the URI where the measurement payload should be sent toEdit the
APP_PPMP_DEVICE_ID
field to set the unique XDK PPMP nodeSave the file
Clean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Micro SD card (formatted to FAT/FAT32 with a data size of 32 GB or less)
Insert the Micro SD card into the XDK
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
SdCardExample
exampleInsert the stop timer with the following line as shown in the screenshot below
xTimerStop(sdCardWriteReadHandle, WRITEREAD_BLOCK_TIME);
Clean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Mobile Android/iOS device with Bluetooth Low Energy (BLE) and the BLE scanner application
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
SendAccelerometerDataOverUdpAndBle
exampleClean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Mobile Android/iOS device with Bluetooth Low Energy (BLE) and the BLE scanner application
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
SendAccelerometerDataOverBle
exampleClean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Available wireless network and an own UDP server
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
SendDataOverMQTT
exampleFrom the Project Explorer, expand the project, click at the source folder and open the
AppController.h
fileEdit the
WLAN_SSID
field to match the available networks nameEdit the
WLAN_PSK
field to match the available networks passwordEdit the
SNTP_SERVER_URL
field to match the URL the XDK will get its SNTP timestampEdit the
APP_MQTT_BROKER_HOST_URL
field to match the URL of the destination MQTT brokerEdit the
APP_MQTT_BROKER_HOST_PORT
field to match the MQTT broker port number on which the destination MQTT broker will listenEdit the
APP_MQTT_CLIENT_ID
field to match your client ID, which will be used to identify the XDK as publishing and subscribing MQTT clientEdit the
APP_MQTT_TOPIC
field to match the topic, the XDK will publish data to and subscribe fromClean and Build the project
Flash the project to your XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Available wireless network and an own UDP server
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
SendDataOverUdp
exampleFrom the Project Explorer, expand the project, open the source folder and then open the
AppController.h
fileEdit the
WLAN_SSID
field to match the available networks nameEdit the
WLAN_PSK
field to match the available networks passwordEdit the
DEST_SERVER_IP
field to match the IP address of the destination serverEdit the
DEST_SERVER_PORT
field to match the server port number on which the destination server will listenClean and Build the project
Flash the project to your XDK
Rotation
Compass
Absolute Humidity
Calibrated Accelerometer
Calibrated Gyroscope
Calibrated Magnetometer
Gravity
StepCounter
Fingerprint
Linear Acceleration
Gestures
XDK
USB cable (USB A to USB micro)
Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
SendVirtualSensorDataOverUsb
exampleOpen the project in the Project Explorer and navigate to the file
AppController.c
Enable the sensor you want to use in the struct
VirtualSensors
.Clean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
StreamSensorDataOverUsb
exampleClean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Mobile Android/iOS device with Bluetooth Low Energy (BLE)
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
VirtualXdkDemo
exampleInstall the Virtual XDK app on the mobile device (from the iTunes Store on iOS or the Play Store on Android)
Open the app on the mobile device
Turn the mobile device’s Bluetooth on
Clean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- Available wireless network
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
WlanNetworkManagement
exampleOpen the project and navigate to the file
WlanNetworkManagment.h
fileConfigure the network and DHCP setting as desired
Clean and build the project
Flash the project to the XDK
- XDK
- USB cable (USB A to USB micro)
- Windows 7 or greater/Linux/MAC PC with XDK-Workbench version 3.4.0 or later installed
- External attachable device, which communicates over UART, SPI, I2C or GPIO
Connect the XDK to the PC via USB cable
Open the XDK-Workbench
From the Welcome Screen, open the
XdkExtensionPort
exampleFrom the Project Explorer, expand the project, open the source folder and then open the
AppController.h
file.Edit the
EXTENSION_PORT_UART_FEATURE
field to enable or disable communication over UARTEdit the
EXTENSION_PORT_I2C_FEATURE
field to enable of disable communication over I2CEdit the
EXTENSION_PORT_SPI_FEATURE
field to enable of disable communication over SPIEdit the
EXTENSION_PORT_GPIO_FEATURE
field to enable of disable communication over GPIOSave the file
Clean and build the project
Connect an external device which communicates over UART, SPI, I2C or GPIO over the extension bus to the XDK
Flash the project to the XDK