I want to connect wireless sensor nodes to the IBM IoT Watson cloud infrastructure IBM Bluemix based on the TI Reference Design TIDEP0084 Sub-1 GHz Sensor to Cloud Industrial IoT Gateway Reference Design for Linux Systems. The reference document TI Designs:TIDEP0084 Sub-1 GHz Sensor-to-Cloud Industrial Internet-of-Things (IoT) Gateway Reference Design is referred to as TI Design in this memo.
The TI Design is based on the BeagleBone Black (BBB) and has become part of the SimpleLink CC13x2 SDK Academy TI 15.4-Stack - Linux Gateway Project Zero, more precisely the part of the Academy covering the TI 15.4-Stack Linux SDK. The BBB version has been complemented with Linux PC host based version. I will follow the documentation in the CC13x2 SDK Academy and in the TI 15.4-Stack Software Developer’s Guide and revert to the original TI Design only if necessary.
In this project, I will first look at the PC based version, the BBB based version will follow later.
In either case, a coprocessor based on a SimpleLink™ Multi-Band CC1352R Wireless MCU LaunchPad™ Development Kit is used, which has been the subject of a previous TiPs.
2. The Coprocessor
The coprocessor runs the TI 15.4 stack and handles the wireless communication with the sensor nodes. It communicates with the host (PC, BBB) via a serial port.
2.1. Copy the example project
I import the
coprocessor_CC1352P1_LAUNCHXL_tirtos_ccs_syscfg into the CCS workspace as described in the
SimpleLink CC13x2 26x2 SDK (3.40.00.02) documentation of the
http://dev.ti.com/tirex/explore/node?devtools=LAUNCHXL-CC1352P1&node=AFU6dryAU8NukjdRPy4T4QpTTHBmuLATEST[Sensor and Collector - TI 15.4-Stack Project Zero]
Within CCS, I then copy the project into compagnion repo, with the following abbreviated names:
The coprocessor is configured to communicate with the host via a serial-USB connection. In another project, the coprocessor is configured to communicate with an embedded gateway board directly via UART pins.
2.2. Setting the serial number of the gateway on-board debug probe.
The procedure for setting the serial number has been explained here ??. I choose to set the serial number to 5.
The serial port will therefore be available under
3. Host based version
TI 15.4-Stack - Linux Gateway Project Zero
3.1. Task 3
download from here http://www.ti.com/tool/TI-15.4-STACK-GATEWAY-LINUX-SDK
here is the Linux TI 15.4-Stack User’s Guide
Trying to fix the port naming mess:
I got rid of all TI related .rules in /etc/udev/rules.d and added:
this will create:
5 is the serial number I gave to the coprocessor LaunchPad.
see http://www.reactivated.net/writing_udev_rules.html#env in general see https://txlab.wordpress.com/2016/06/14/udev-rules-for-ttyusb-devices/ in particular which solves the disambiguaton problem.
To find out idVendor and idProduct run
$ udevadm info -a /dev/ttyACMx
to test the rules :
$ udevadm test /sys/class/tty/ttyACMx
this shows the env vars ID_xxx
where x can be obtained like so:
$ ls /dev/ttyACM* /dev/ttyACM2 /dev/ttyACM3
3.3. Copy the source code for the host based software
I copy relevant parts from ti154stack_linux_x64_3_40_00_10 to the folder
ti154stack inside the compagnion demo:
$ cd ti154stack $ ls ./components example scripts build_all.sh
3.4. Modify collector.cfg
devname = /dev/ti500 config-phy-id 131 config-scan-duration 5
=== Configuring the demo program
devname = /dev/ti500 config-phy-id = 131 // 863 Long Range