223 | | === Power ON sensor, final steps === |
224 | | Attach antenna to "SUB 1GHz" port of the GW16122 that will act as "Sensor". Connect the GW16122 "sensor" to the USB of your desktop workstation to power it on. The sensor should connect imedately to the collector, this is indicated by the red LED D2 iluminating. If this LED does not iluminate see "Troubleshooting" section. Using the WebUI check that a "Sensor Node" is present. Under "RSSI" click the "ToggleLED" box, this will cause LED D1 and D2 on the Collector to turn on brifly. This is verification that all the steps have been followed correctly, and RSSI signals can be sent and recieved. |
225 | | |
226 | | === Troubleshooting === |
227 | | * Be sure GW16122 boards have an antenna installed |
228 | | * Be sure the collector network is an open network so that the sensors can be joined. By default, the network is closed and no sensors can join |
229 | | * Use "systemctl |grep running -i" or "systemctl |grep modem -i" to verify !ModemManager is not running. |
230 | | * Be sure that the Gateworks board and collector are all setup and turned on and the WebGUI is live with the host_collector program running on the Gateworks board. After this, then try re-programming the sensor firmware, then powering it off and back on. |
231 | | * On the Gateworks board nv-simulation.bin has been deleted. This file will erase all previously connected sensor entries. |
232 | | * When flashing "Erase all unprotected sectors" and "Erase entire flash" have been selected. |
233 | | |
234 | | |
235 | | === What's Next? === |
236 | | |
237 | | This example showcases a network setup between a sensor and collector, with the Gateworks SBC acting as a co-processor. |
238 | | |
239 | | Future development will be accomplished through understanding all the Ti source code contained in the !SimpleLink SDK and TI 15.4 Stack. Custom applications can be created using all of the TI provided software. |
240 | | |
241 | | Please read and understand the following links below: |
242 | | * [http://blog.gateworks.com/?wpdmpro=gw16122-manual GW16122 Hardware Manual] |
243 | | * [http://dev.ti.com/tirex/#/ TI Resource Explorer - Documentation] |
244 | | * [http://processors.wiki.ti.com/index.php/Main_Page TI Wiki] |
245 | | * [http://dev.ti.com/tirex/#/?link=Software%2FSimpleLink%20CC13x0%20SDK CC1350 Wiki] |
246 | | * [http://dev.ti.com/tirex/content/tirtos_cc13xx_cc26xx_2_20_00_06/resources/cc1350LaunchPad/project0/landing_page_index.html Launch Pad Resource Explorer Landing Page on Ti] |
247 | | * [https://e2e.ti.com/support/ All TI Forums] |
248 | | |
249 | | Additionally, reading through the rest of this wiki page will offer more notes from some of the research Gateworks performed. |
250 | | |
251 | | == GW16122 Specifications == |
252 | | |
253 | | Features Include: |
254 | | * Texas Instruments [http://www.ti.com/lsds/ti/wireless-connectivity/multi-standard/simplelink-cc1350/overview.page CC1350 MCU] |
255 | | * Open Source 802.15.4g |
256 | | * Lowest Power |
257 | | * Sub 1GHz |
258 | | * 5.4 mA Radio RX current |
259 | | * 13.4 mA Radio TX @ +10 dBm |
260 | | * 24.4 mA Radio TX @ +14 dBm |
261 | | * Longest Range |
262 | | * Excellent Receiver Sensitivity –124 dBm Using Long-Range Mode, –110 dBm at 50 kbps (Sub-1 GHz), –87 dBm at Bluetooth low energy |
263 | | * Programmable Output Power up to +14 dBm (Sub-1 GHz) and +9 dBm at 2.4 GHz (Bluetooth low energy) |
264 | | * Small form factor (7x7mm chip size) |
265 | | * Low Bandwidth applications - Sensor Data, etc |
266 | | * Minimal interference - Narrow Bandwidth |
267 | | * Can perform Sigfox TX if required, no RX |
268 | | |
269 | | This features two RF Channels: |
270 | | |
271 | | * Sub 1GHz (USA 915MHz) - Used for long distance communication |
272 | | * Bluetooth 4.2 Low Energy (2.4GHz) - Can be used for programming sensor nodes |
273 | | |
274 | | ''' Size Note ''' |
275 | | |
276 | | This module is 60.8mm long, compared to the standard Mini-PCIe card at around 50mm. This could cause mechanical conflicts depending on the baseboard used. |
277 | | |
278 | | == Texas Instruments CC1350 Reference Design == |
279 | | |
280 | | For more information see the [http://www.ti.com/product/CC1350 TI CC1350 Product Page]. |
281 | | |
282 | | == RF Network / Infrastructure == |
283 | | |
284 | | The GW16122 / CC1350 operates on its own network. It does not rely on towers/networks installed by 3rd party companies (!LoRa, Sigfox, Verizon, AT&T, etc). The entire network infrastructure is under control by the user. This includes sensors/nodes, collector(s), antennas and more. |
285 | | |
286 | | == Network Architecture == |
287 | | |
288 | | The default is a star-based topology system where there is one central collector (The GW16122 on a Gateworks SBC) that listens to all the sensors / nodes that are around it. |
289 | | |
290 | | == Sensor Limits == |
291 | | |
292 | | Number of connected users: |
293 | | |
294 | | * Support for 50 nodes in network is for the MAC-!CoProcessor configuration, where the network employs full MAC level security (AES-128). |
295 | | The Security table can take up all available RAM considering 500 bytes packets so some trade off are possible if the max packet size that must be supported by the application is smaller and the network size can go bigger (probably not reach 1K nodes). The network can scale up to much more nodes if for instance the security is removed at MAC level and deployed at application level (the code is hosted on Linux). The actual network size would be in that case more limited by the traffic profile (ie how frequently data is exchanged). |
296 | | |
297 | | == Range Testing == |
298 | | |
299 | | Gateworks did basic range testing with the GW16122 using a 2dBi Omni Antenna on the 915Mhz band. A successful link was acquired at 4500ft/1.4km over water. Note both the transmitter and receiver were only 1m off the ground so much better performance would be expected if the antennas were mounted higher to clear the Fresnel zones. Using a directional antennas, range can be increased further with links easily greater then >10Km. Additionally, there is different modes and tuning that can be done in software to increase the range, such as LRM (long range mode). |
300 | | |
301 | | More range information may be found on the [https://e2e.ti.com/support/ TI E2E Forums] and on the TI documentation listed in the references on this page. |
302 | | |
303 | | Gateworks Range testing map: |
304 | | |
305 | | [[Image(16122range.png,400px)]] |
306 | | |
307 | | |
308 | | == Glossary == |
309 | | |
310 | | * BLE - Bluetooth Low Engery |
311 | | * BLE-ADV - Bluetooth Low Energy Advertising |
312 | | * OAD - Over the Air Download |
313 | | * 802.15.4 - IEEE standard defining the operation of low-rate wireless personal area networks (LR-WPANs). Definition includes the physical layer and media access control. Can be used with 6LoWPAN. The IEEE 802.15.4 standard is used as a data-link layer of many popular networking standards deployed in the market (6LoWPAN, Wi-SUN, !ZigBee®, Thread and WHART). It guarantees a solid wireless foundation thanks to features like air arbitration (through CSMA-CA), acknowledgments and retransmissions and built-in AES security. 802.15.4 can operate on the following frequencies: 868/915/2450 MHz |
314 | | * Frequency: North America: 902–928 MHz, up to 30 channels |
315 | | * RTOS - Real Time Operating System |
316 | | * LoWPAN - Low Power Wireless Personal Area Network |
317 | | * 6LoWPAN - Low Power Wireless Personal Area Network, allowing for IPv6 packets. Read more [http://www.ti.com/lit/wp/swry013/swry013.pdf here]. |
318 | | * LRM - Long Range Mode |
319 | | * LP - Likely LaunchPad, referring to the CC1350 'Dev Kit' from Ti. Could also mean 'LowPower' |
320 | | * PA/LNA - Power amplifier (PA) for increased output power, and a low-noise amplifier (LNA) with low noise figure for improved receiver sensitivity. This can be used with the [http://www.ti.com/product/CC1190/toolssoftware Ti CC1190 RF Booster / Front End] |
321 | | * BLE Modes - advertising, scanning, master, slave. Read more [http://www.eetimes.com/document.asp?doc_id=1278927 here] |
322 | | * TI-RTOS - TI-RTOS kernel is a tailored version of the legacy SYS/BIOS kernel and operates as a real-time, preemptive, multi-threaded operating system with drivers, tools for synchronization and scheduling. |
323 | | * TI-15.4 Stack - The TI 15.4-Stack is a software development kit (SDK) running on the !SimpleLink™ Sub-1 GHz CC1310 wireless microcontroller (MCU). Based on the proven IEEE 802.15.4 standard, it implements the 'g' amendment of the specification for operations in North America and Europe in the Sub-1 GHz band (regulated respectively by FCC and ETSI). |
324 | | * LPWAN - Low‑Power Wide‑Area |
325 | | * NB-IoT - Narrow band Internet of Things |
326 | | * Contiki - read more [#ThirdPartySoftware Third Party Software] |
327 | | * rfWsnDmNodeOad_US_CC1350STK_TI_CC1350F128-v1_06.hex |
328 | | * rf = Radio Frequency |
329 | | * Wsn = Wireless Sensor Network |
330 | | * Dm = Dual Mode, Bluetooth and Sub 1Ghz |
331 | | * Node = A node is an edge device that is a sensor and sends data back to a central coordinator or collector |
332 | | * Oad = Over the air download |
333 | | * STK = Sensor Tag Kit |
334 | | * Coord Addr - Coordinator Address - This is the address on the network for the coordinator/collector. Example: 0xAABB |
335 | | * PanID - Personal Area Network ID, example 0xACDC |
336 | | * FAN - Field Area Network |
337 | | * FH - Frequency hopping. Not used in default examples. |
338 | | * EasyLink - an API, a simple abstraction layer on top of the RF Driver and is intended as a starting point for customers creating a proprietary Sub1-GHz protocol or application. |
339 | | * Alternatives: |
340 | | * TI-RTOS RF driver (of what EasyLink is a abstraction of) |
341 | | * TI-15.4 Stack, Full stack-based network solution, available as part of the CC13x0 SDK |
342 | | * Thread - read more [#ThirdPartySoftware Third Party Software] |
343 | | * Dash7 - DASH7 Alliance Protocol (D7A) is an open source Wireless Sensor and Actuator Network protocol, which operates in the 433 MHz, 868 MHz and 915 MHz unlicensed ISM band/SRD band. Dash7 has not been tested on the GW16122. |
344 | | |
345 | | |
346 | | = GW16122 Development = |
347 | | Much of the following information is taken from TI documentation which is licensed under [http://creativecommons.org/licenses/by-nc-nd/4.0/ CC BY NC ND 4.0]. This wiki page aims to get users up and runnning with the GW16122 by collating relevant information contained by aforementioned TI sources along with our own annotations. |
348 | | |
349 | | The subsequent sections detail the information collected by Gateworks related to development with the GW16122. The GW16122 constitutes the following embedded systems: |
350 | | |
351 | | * !TiVa TM4C1294NCPDT MCU - Primarily used to program the CC1350; converts USB signals to UART |
352 | | * CC1350 MCU - The main MCU responsible for taking sensor readings |
353 | | |
354 | | A pre-made sensor node is provided by Texas Instruments: |
355 | | |
356 | | * [http://www.ti.com/tool/cc1350stk Simplelink CC1350 SensorTag Bluetooth and Sub-1GHz Long Range Wireless] |
357 | | Further information on the TI MCU's and tools utilized in GW16122 development can by found on the [http://processors.wiki.ti.com/ TI Wiki]. |
358 | | |
359 | | == Developer Set Up == |
360 | | |
361 | | The following sections detail the steps necessary to set up a development environment for the GW16122. It is assumed that you already have a general understanding of Gateworks products and Linux based OS operations. |
362 | | |
363 | | === Development Tools === |
364 | | |
365 | | Development can be done on either a Windows or Linux x86 based machine (host). Various references to Mac OS exist for some tools but were untested by Gateworks. You will need to create a TI account through their [http://my.ti.com/ registration page] before downloading some of the software listed here. After creating an account you will still need to sign an agreement on each download indicating its intended use. |
366 | | |
367 | | 1. Remote terminal program, e.g. [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] for serial connection to Gateworks SBC |
368 | | 1. [http://www.ti.com/tool/CCSTUDIO Code Composer Studio] which is an IDE maintained by TI with preinstalled tools and libraries for software development on TI MCU's ([http://software-dl.ti.com/ccs/esd/CCSv7/CCS_7_3_0/exports/ccs_setup_7.3.0.00019.exe Direct download link]) |
369 | | * Don't forget to run the post install script {{{ccsv7/install_scripts/install_drivers.sh}}} |
370 | | * The executable for the IDE is located at {{{ccsv7/eclipse/ccstudio}}} |
371 | | 1. [http://www.ti.com/tool/download/SIMPLELINK-CC13X0-SDK Simple Link CC13X0 SDK] from TI's site is available on multiple platforms and contains prebuilt firmware images, example software, and documentation for working with the CC1350 |
372 | | ==== Host Programming Software ==== |
373 | | |
374 | | In general, the Windows tool seems easier to use and more reliable. |
375 | | |
376 | | ===== Windows ===== |
377 | | 1. [http://www.ti.com/tool/flash-programmer SmartRF Flash Programmer v2] for quickly installing prebuilt firmware without code composer studio and especially useful for quickly programming sensor nodes using a GUI ('''Windows only - Must use SmartRF Flash Programmer v2''') |
378 | | |
379 | | ===== Linux ===== |
380 | | |
381 | | [http://www.ti.com/tool/uniflash Uniflash Programmer] which is a linux compatible alternative that includes both a GUI and command line interfaces |
382 | | |
383 | | Some quick commands for installing Uniflash properly on an Ubuntu system: |
384 | | |
385 | | {{{ |
386 | | #!bash |
387 | | # Get the installer (software version subject to change) |
388 | | wget --no-check-certificate http://software-dl.ti.com/ccs/esd/uniflash/uniflash_sl.4.2.1490.run |
389 | | # Link udev library for installer error |
390 | | sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0 |
391 | | # Run gui installer |
392 | | chmod +x uniflash_*.run |
393 | | ./uniflash_*.run |
394 | | }}} |
395 | | |
396 | | ''' Read more Linux details [wiki:#ProgrammingtheCC1350 Programming the CC1350 with Linux] |
397 | | |
398 | | === Gateworks SBC Tools === |
399 | | |
400 | | The mechanism controlling the GW16122 will be a Gateworks SBC (testing was done with a GW5404-E.2). The [http://trac.gateworks.com/wiki/ventana/ubuntu Gateworks Ubuntu Trusty] image is recommended and the instructions will use Ubuntu specific commands. |
401 | | |
402 | | Some of the TI example projects make use of the Node.js framework in order to create a web interface to control what is referred to as the "collector" which in our case is the GW16122. |
403 | | |
404 | | Once Ubuntu has been installed and a network connection has been established, complete the following steps to finish initial target configuration: |
405 | | |
406 | | 1. Install necessary packages |
407 | | {{{#!bash |
408 | | # Always update your package manager information |
409 | | apt-get update |
410 | | apt-get upgrade |
411 | | # Install packages for GW16122 development |
412 | | apt-get install -y build-essential nodejs |
413 | | }}} |
414 | | 1. Acquire and install TI's 15.4 BLE stack source files from the [http://www.ti.com/tool/ti-15.4-stack-gateway-linux-sdk SDK] available online |
415 | | 1. Since TI apparently only offers the SDK installer in the form of an x86 binary (ventana CPU is arm architecture), you will need to download the installer on a compatible linux machine, run it, and repackage the files for transfer |
416 | | {{{#!bash |
417 | | # ON SEPARATE x86 CPU LINUX MACHINE: |
418 | | # enable execute permissions on binary downloaded from above link, your file name may be different |
419 | | chmod +x ti15.4stack_linux_x64_2_02_00_03.run |
420 | | # run the installer |
421 | | ./ti15.4stack_linux_x64_2_02_00_03.run |
422 | | # package the install files from target directory |
423 | | tar -czvf ti15-4.tar.gz ti/ |
424 | | }}} |
425 | | 1. Transfer and extract the sdk files to your Gateworks SBC filesystem using your method of choice |
426 | | {{{#!bash |
427 | | # pull installation file from host pc (networked method) |
428 | | wget http://remotehost/path/to/ti15-4.tar.gz |
429 | | # extract the files |
430 | | tar xzvf ./ti15-4.tar.gz |
431 | | }}} |
432 | | |
433 | | == Software == |
434 | | |
435 | | A quick breakdown of the software running on each piece of hardware in an example network utilizing the GW16122: |
436 | | |
437 | | * Gateworks SBC |
438 | | * Ubuntu Trusty Gateworks Image |
439 | | * node-js (if using web interface) |
440 | | * serial program (if using serial api) |
441 | | * GW16122 Mini-PCIe Card |
442 | | * !TiVa TM4C1294NCPDT MCU |
443 | | * boot_loader.bin - TI boot loader firmware |
444 | | * firmware.bin - XDS110 emulation firmware binary |
445 | | * CC1350 MCU |
446 | | * Co-Processor firmware (.out/.hex) - Either a prebuilt TI example or custom firmware designed with CCS |
447 | | |
448 | | The following subsections detail the various software layers developed by TI for use with the CC1350 which is the main MCU in the GW16122 as well as Code Composer Studio and other general notes. |
449 | | |
450 | | === TI-RTOS RF driver === |
451 | | |
452 | | The RF core has a dedicated driver called the TI-RTOS RF driver, which is used for all interaction with the RF core. If you do not wish to use the !EasyLink abstraction layer, there is also the option to do simple packet RX/TX using the TI-RTOS RF driver directly. |
453 | | |
454 | | A reference for the example lab located in the TI resource center, see [http://dev.ti.com/tirex/#/?link=Software%2FSimpleLink%20CC13x0%20SDK%2FSimpleLink%20Academy%2FLabs%2FProprietary%20RF%2FBasic%20RX%20and%20TX SimpleLink Academy lab Proprietary RF - Basic RX and TX]. |
455 | | |
456 | | For more information, see the [http://dev.ti.com/tirex/content/simplelink_cc13x0_sdk_1_00_00_13/docs/proprietary-rf/html/rf-core/rf-driver.html CC13X0 Proprietary RF User's Guide]. |
457 | | |
458 | | === !EasyLink API === |
459 | | |
460 | | !EasyLink is a simple abstraction layer on top of the RF Driver and is intended as a starting point for customers creating a proprietary Sub1-GHz protocol or application. |
461 | | |
462 | | For more information see the [http://processors.wiki.ti.com/index.php/SimpleLink-EasyLink EasyLink wiki page]. |
463 | | |
464 | | ==== Serial Command API ==== |
465 | | |
466 | | '''Important''' Note: Using this API will not work on the default !CoProcessor firmware flashed onto the GW16122. This requires the '''rfEasyLinkNp''' firmware example as provided in the TI SDK Download (one must compile the binary in Code Composer Studio and flash it to the GW16122) |
467 | | |
468 | | The serial command API for the CC1350 is implemented in the form of standard AT+ commands that correlate to !EasyLink API functions. This serial control method there has an example project provided by the TI resource center. The web page can be found [http://dev.ti.com/tirex/#/?link=Software%2FSimpleLink%20CC13x0%20SDK%2FSimpleLink%20Academy%2FLabs%2FProprietary%20RF%2FEasyLink%20Network%20Processor%20example&collapsetree= here]. |
469 | | |
470 | | You can easily test the AT to Easylink api commands by using two GW16122/SensorTag devices running the {{{rfEasyLinkNp}}} and the {{{rfEasyLinkRx}}} examples. |
471 | | |
472 | | Typically, one would open the console port using the screen command in Linux like so: |
473 | | {{{ |
474 | | screen /dev/ttyACM0 115200,cs8 |
475 | | }}} |
476 | | |
477 | | Once the console is opened, type AT commands (followed by the enter key to submit the command), example (with responses) shown below: |
478 | | {{{ |
479 | | AT+I x |
480 | | OK |
481 | | |
482 | | ATPST? |
483 | | 00000000OK |
484 | | |
485 | | ATPFR? |
486 | | 868000000OK |
487 | | |
488 | | AT+rs |
489 | | Reset:EasyLink-v2.30.00 |
490 | | }}} |
491 | | |
492 | | |
493 | | |
494 | | ===== Serial Format ===== |
495 | | |
496 | | Parameters offer set and get functionality. |
497 | | |
498 | | * The format of a parameter read command to get the !TxPower parameter is: |
499 | | {{{ |
500 | | #!bash |
501 | | “ATP00?” |
502 | | }}} |
503 | | * The response to a read will be of the format shown below, depending on the parameter it will be hex or decimal: |
504 | | {{{ |
505 | | #!bash |
506 | | “-10” |
507 | | }}} |
508 | | * The format of an AT command to set the Frequency Parameter to 868MHz is: |
509 | | {{{#!bash |
510 | | “ATPFR=868000000” |
511 | | }}} |
512 | | * The response of a write will be of the format: |
513 | | {{{#!bash |
514 | | OK<CR> |
515 | | }}} |
516 | | |
517 | | The response to the "rx" "RX" (receive) command is of the format: |
518 | | |
519 | | * For ASCII Data Mode: |
520 | | {{{#!bash |
521 | | RX: Hello World<CR> |
522 | | OK<CR> |
523 | | For Binary Data Mode: |
524 | | RX: 2fbb1aa8ec84045fb0c3e5236cb8cc5b3c<CR> |
525 | | OK<CR> |
526 | | }}} |
527 | | |
528 | | * The response to the "rs" "RX" (reset) command is of the format: |
529 | | {{{#!bash |
530 | | For ASCII Data Mode: |
531 | | RESET:vxx.xx.xx<CR> |
532 | | Where vxx.xx.xx is the version number of the !EasyLink API |
533 | | }}} |
534 | | |
535 | | ===== Command List ===== |
536 | | |
537 | | The registers exposed for the !EasyLink API are: |
538 | | |
539 | | ||= Param =||= R/W =||= Description =||= Parameter(s) =|| |
540 | | || ST || R || Read The last !EasyLink status returned |---------------- |
541 | | {{{#!td |
542 | | !EasyLink status in {{{0x4B}}}: |
543 | | * hex<br> Success = 0000 |
544 | | * Config_Error = 0001 |
545 | | * Param_Error = 0002 |
546 | | * Mem_Error = 0003 |
547 | | * Cmd_Error = 0004 |
548 | | * Tx_Error = 0005 |
549 | | * Rx_Error = 0006 |
550 | | * Rx_Timeout = 0007 |
551 | | * Rx_Buffer_Error = 0008 |
552 | | * Busy_Error = 0009 |
553 | | * Aborted = 000a |
554 | | }}} |
555 | | |---------------- |
556 | | || AE || R/W || UART Echo Enable || 0 or 1 to enable/disable echo || |
557 | | || FR || R/W || !Read/Write frequency in kHz || Frequency in {{{0x1B}}} || |
558 | | || PW || R/W || !Read/Write tx power in dBm || Power in decimal between -10 to 14dBm. Note cfg changes are required for 14dBm output power || |
559 | | || BM || R/W || !Read/Write data mode for !Tx/Rx data |---------------- |
560 | | {{{#!td |
561 | | Mode in {{{0x1B}}} |
562 | | |
563 | | 0:ASCII |
564 | | 1:Binary |
565 | | }}} |
566 | | |---------------- |
567 | | || IE || R || Read IEEE address || None || |
568 | | || AS || R || Read address size in Bytes || None || |
569 | | || TS || R/W || !Read/Write Tx address || address {{{0x01}}}-{{{0x8B}}} || |
570 | | || RT || R || Read current radio time || None || |
571 | | || TY || R/W || !Read/Write Time Type |---------------- |
572 | | {{{#!td |
573 | | Time in {{{0x1B}}} |
574 | | |
575 | | 0:Absolute |
576 | | 1:Relative Time |
577 | | }}} |
578 | | |---------------- |
579 | | || TT || R/W || Absolute or relative (based on Time Type) radio time to Tx a packet || Absolute/relative time in units of 4MHz ticks in decimal OR 0 for immediate || |
580 | | || TR || R/W || Absolute or relative (based on Time Type) radio time to Rx a packet || Absolute/relative time in units of 4MHz ticks in decimal OR 0 for immediate || |
581 | | || RO || R/W || Relative time for Rx timeout || Relative time in units of 4MHz ticks in decimal OR 0 for never || |
582 | | || LA || R || Destination address of last Rx'ed message || None || |
583 | | || LT || R || Read absolute radio time of last Rx'ed message || None || |
584 | | || LR || R || Read RSSI of last Rx'ed message || None || |
585 | | || F0 || R/W || !Read/Write address filter 0 || address {{{0x01}}}-{{{0x8B}}} || |
586 | | || F1 || R/W || !Read/Write address filter 1 || address {{{0x01}}}-{{{0x8B}}} || |
587 | | || F2 || R/W || !Read/Write address filter 2 || address {{{0x01}}}-{{{0x8B}}} || |
588 | | || TM || R/W || !Read/Write test mode |---------------- |
589 | | {{{#!td |
590 | | Test mode in {{{0x1B}}}: |
591 | | |
592 | | 0:!None/Cancel |
593 | | 1:!Tone/Carrier Wave |
594 | | 2:Modulated Signal |
595 | | 3:PER Tx |
596 | | 4:PER Rx |
597 | | }}} |
598 | | |---------------- |
599 | | || PI || R/W || !Read/Write PER Tx bursts interval || {{{0x1B}}} time between PER bursts in units of ms || |
600 | | || PB || R/W || !Read/Write PER Tx burst size || {{{0x1B}}} Tx Burst Size in hex || |
601 | | || PP || R/W || !Read/Write number of PER !Tx/Rx packets || {{{0x1B}}} !Tx/Rx Packets in hex || |
602 | | || PL || R/W || !Read/Write PER !Tx/Rx packet length || {{{0x1B}}} !Tx/Rx Packet Length in hex || |
603 | | || GM00-03 || R/W || !Read/Write GPIO Mode || 0:1 GPIO Value input/output || |
604 | | || GV00-03 || R/W || !Read/Write GPIO Value || 0:1 GPIO Value || |
605 | | |
606 | | Command Responses Response for Register Write and Control Commands are formatted as: |
607 | | |
608 | | ||= Response =||= Description =|| |
609 | | || OK<CR> || Command or Register write successful || |
610 | | || Error 0001<CR> || Command or register read/write failed due to bad formatting || |
611 | | || Error 0002<CR> || Command or register read/write failed due to bad length || |
612 | | || Error 0003<CR> || Command or register write failed due to a parameter Error || |
613 | | || Error 0004<CR> || Command or register write failed due to a Memory Error || |
614 | | || Error 0005<CR> || Command or register write failed due to Error From !EasyLink API (!EasyLink error is stored in Parameter "ST") || |
615 | | |
616 | | Sample app to interface with 16122 running this software (link to it under software example section) |
617 | | |
618 | | For further documentation on this serial implementation see the official [http://processors.wiki.ti.com/index.php/SimpleLink-EasyLink#rfEasyLinkNp_AT_Network_Processor_Example TI wiki page]. |
619 | | |
620 | | |
621 | | === TI 15.4-Stack === |
622 | | |
623 | | On the other hand, if you wish to create a full stack-based network solution, consider using the TI 15.4-Stack, available as part of the CC13x0 SDK. |
624 | | |
625 | | The example lab documentation to get started can be found at the [http://dev.ti.com/tirex/content/simplelink_academy_cc13x0sdk_1_12_01_16/modules/154-stack_01_sensor_collector/154-stack_01_sensor_collector.html TI 15.4-Stack Project Zero] page. |
626 | | |
627 | | Further documentation can be found in the [http://dev.ti.com/tirex/content/simplelink_cc13x0_sdk_1_40_00_10/docs/ti154stack/ti154stack-users-guide/ti154stack/index.html TI 15.4 User's Guide]. |
628 | | |
629 | | === Texas Instruments Code Composer Studio === |
630 | | |
631 | | Code Composer Studio (CCS) is an IDE based on Eclipse and includes various libraries and software packages required to develop on many TI MCU's, including the CC1350 which is the primary component of the GW16122. |
632 | | |
633 | | Below are some various notes on using CCS. See the [http://processors.wiki.ti.com/index.php/CCSv6_Getting_Started_Guide Getting Started wiki] and the [http://processors.wiki.ti.com/index.php/Category:Code_Composer_Studio_v7 Main CCS wiki] for more information. |
634 | | |
635 | | ==== Resource Center ==== |
636 | | |
637 | | Click Menu item View -> Resource Explorer |
638 | | Expand software and view !SimpleLink CC13x0 SDK as well as Ti-RTOS for CC2650 |
639 | | Drill down to the area you would like to explore |
640 | | Find an example, then click the download button to download to desktop |
641 | | Then click the import to IDE to import the project |
642 | | |
643 | | ==== Building a Project ==== |
644 | | |
645 | | Once the project is imported, right click on the project title in the explorer window and click 'Build Project' and let it compile. You can also click the debug button to build the project and run it on the connected target. Once it is complete, a binaries folder will be created under the project. Most TI tools will use the .out file that is produced there to program with. |
646 | | |
647 | | Alternatively you can build projects via command line and avoid the entire IDE if you so desire. See the official TI wiki on [http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create Command Line Build/Create] for more information. |
648 | | |
649 | | A couple of additional notes when building via command line: |
650 | | |
651 | | Note that the executable for Linux CCS installations is named "eclipse" and not "eclipsec" |
652 | | Run with "-ccs.help" to see full list of options |
653 | | Use full path names for all command line arguments (environment variables useful here) |
654 | | |
655 | | |
656 | | === General Notes === |
657 | | |
658 | | * The XDS110 USB debugger referenced by material related to the CC1350 or in CCS is equivalent to the !TiVa chip that's on the GW16122 |
659 | | * Make sure the GW16122 is properly into the miniPcie->USB adapter board otherwise it will come up as a usb device but fail to be recognized by the code composer software. You can check if its connected properly by opening the {{{.ccxml}}} file under the projects targetConfigs folder and hitting the "test connection" button. If multiple boards are connected at once you will * need to specify them by serial number. |
660 | | * The US frequency allows for a total of 129 channels to choose from, defined in {{{CONFIG_CHANNEL_MASK}}} |
661 | | You can prevent conflicts of sensor networks by either limiting the channels enabled on each collector/sensor, or by setting the PAN-ID to match on the devices belonging to each * network. |
662 | | * Beware of adding too many channels to your channel mask, for example, adding all of them took well over 20 minutes to complete the channel selection cycle and bring up the network. |
663 | | * Line of sight is extremely significant. Depending on the material, a few obstacles can drastically reduce your maximum range. |
664 | | * General RF information and specific information regarding antenna choice and performance can be found in this [http://www.ti.com/lit/an/swra161b/swra161b.pdf app note]. |
665 | | |
666 | | === UART RX/TX Example === |
667 | | |
668 | | |
669 | | At a high level, this example allows for you to type from a keyboard to an open UART on each side and the data will be sent to the other side. |
670 | | |
671 | | One single project is designed to do TX and RX (one firmware file). |
672 | | |
673 | | Download the pre-compiled firmware here: |
674 | | [http://dev.gateworks.com/gw16122/uart-rx-tx-example-firmware/ uartRxTx_CC1350_LAUNCHXL_TI.out] |
675 | | |
676 | | Using a Windows or Linux desktop/laptop PC, flash this firmware to the GW16122. |
677 | | |
678 | | Connect the GW16122 to the desired system where you will then open the UART communication. |
679 | | |
680 | | This example exposes 2 serial ports to the host that the GW16122 is connected to. |
681 | | * Linux Example |
682 | | * /dev/ttyACM0 (use this first UART) |
683 | | * /dev/ttyACM1 |
684 | | * Windows Example |
685 | | * COM6 (use this first UART) |
686 | | * COM8 |
687 | | |
688 | | Open the serial port /dev/ttyACM0 on the host using a terminal program of your choice, such as screen / picocom or Putty using 115200 baud rate and turn on local echo. |
689 | | |
690 | | You can type the data you want to send, but ***must*** press the 'Enter' key to actually send the data. |
691 | | |
692 | | Type a message on the console on the TX side, like so: |
693 | | {{{ |
694 | | hi, hello world! |
695 | | }}} |
696 | | |
697 | | |
698 | | The other end will print the received data with a string like so: |
699 | | {{{ |
700 | | rx data: hi, hello world! |
701 | | }}} |
702 | | |
703 | | This example code uses the following LEDs on the GW16122: |
704 | | * LED D1 toggles green when it sends |
705 | | * LED D2 toggles red when it receives |
706 | | |
707 | | The RF is at 500 kbps by default but can be adjusted in the source code. |
708 | | |
709 | | |
710 | | == Programming the CC1350 == |
711 | | |
712 | | The CC1350 of the GW16122 can be programmed a number of ways depending on your host machine. |
713 | | |
714 | | Gateworks has tested both Windows (SmartRF Flash Programmer v2) and Linux (Uniflash) tools but specific instructions will be provided from the Linux perspective. However, the [wiki:#HostProgrammingSoftware Windows Software] may be easier and more reliable to use. |
715 | | |
716 | | You will need to have installed the software detailed in the [wiki:expansion/gw16122#SetUp Set Up] section in order to continue. |
717 | | |
718 | | The Uniflash tool is linux compatible and has both a gui and command line interface. The gui program has an autodetect feature and is somewhat easier to use but the command line tool has the same functionality and is better suited for repeated tasks with constant configurations. |
719 | | |
720 | | * Note that there doesn't appear to be a way to update the firmware on a running ARM based target. All of the methods we used to program the !TiVa and CC1350 MCU's from a x86 host are not compatible with an ARM based system. This means that users will not be able to update firmware on running boards. |
721 | | |
722 | | === GUI Approach === |
723 | | |
724 | | 1. Connect a single GW16122 to the host machine (desktop/laptop) via mini-PCIe to USB adapter. |
725 | | 1. Open the "Uniflash" application through a gui file manager from the uniflash_4.2 install directory, or via command line: |
726 | | {{{#!bash |
727 | | ./uniflash_4.2/node-webkit/nw |
728 | | }}} |
729 | | 1. Select target device of CC1350F128 |
730 | | 1. Select connection of Texas Instruments XDS110 USB Debug Probe |
731 | | 1. Click the "Start" button |
732 | | In the Program tab, select the firmware file you wish to load. This is typically a .out file created via a Code Composer Studio Project and can be found in your workspace directory (default {{{~/workspace_v7/}}}) |
733 | | 1. Click the "Load Image" and "Verify Image" buttons and see the text console output on the bottom of the window for a green success message |
734 | | |
735 | | It should also be mentioned that you can program your GW16122 directly from the Code Composer Studio IDE by creating a proper target configuration and then selecting "Debug". Most of the TI example projects will detail this procedure. |
736 | | |
737 | | At this point you may want to power cycle your device. |
738 | | |
739 | | === Command Line Approach === |
740 | | |
741 | | 1. Navigate to your uniflash install directory |
742 | | {{{#!bash |
743 | | cd uniflash_4.2 |
744 | | }}} |
745 | | |
746 | | 1. Run the installer providing a configuration and .out file as arguments, for example: |
747 | | {{{#!bash |
748 | | ./dslite.sh --config=CC1350F128.ccxml ~/workspace_v7/collector_cc1350lp/collector_cc1350lp/collector_cc1350lp.out |
749 | | }}} |
750 | | The {{{CC1350F128.ccxml}}} file can be created via the uniflash gui or Code Composer Studio IDE. The contents of the file are provided in the collapsible text below for convenience. |
751 | | |
752 | | |
753 | | [[CollapsibleStart(CC1350F128.ccxml)]] |
754 | | {{{#!xml |
755 | | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
756 | | <configurations XML_version="1.2" id="configurations_0"> |
757 | | <configuration XML_version="1.2" id="configuration_0"> |
758 | | <instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe" xml="TIXDS110_Connection.xml" xmlpath="connections"/> |
759 | | <connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe"> |
760 | | |
761 | | <instance XML_version="1.2" href="drivers/tixds510icepick_c.xml" id="drivers" xml="tixds510icepick_c.xml" xmlpath="drivers"/> |
762 | | |
763 | | <instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/> |
764 | | |
765 | | <instance XML_version="1.2" href="drivers/tixds510cortexM.xml" id="drivers" xml="tixds510cortexM.xml" xmlpath="drivers"/> |
766 | | |
767 | | |
768 | | <property Type="choicelist" Value="4" id="SWD Mode Settings"> |
769 | | <choice Name="cJTAG (1149.7) 2-pin advanced modes" value="enable"> |
770 | | <property Type="choicelist" Value="1" id="XDS110 Aux Port"/> |
771 | | </choice> |
772 | | </property> |
773 | | |
774 | | <property Type="choicelist" Value="1" id="Power Selection"> |
775 | | <choice Name="Probe supplied power" value="1"> |
776 | | <property Type="stringfield" Value="3.3" id="Voltage Level"/> |
777 | | </choice> |
778 | | <choice Name="Target supplied power" value="0"> |
779 | | <property Type="choicelist" Value="1" id="Voltage Selection"> |
780 | | <choice Name="User specified value" value="1"> |
781 | | <property Type="stringfield" Value="3.3" id="Voltage Level"/> |
782 | | </choice> |
783 | | </property> |
784 | | </choice> |
785 | | </property> |
786 | | |
787 | | <property Type="choicelist" Value="0" id="JTAG Signal Isolation"/> |
788 | | |
789 | | <platform XML_version="1.2" id="platform_0"> |
790 | | <instance XML_version="1.2" desc="CC1350F128" href="devices/cc1350f128.xml" id="CC1350F128" xml="cc1350f128.xml" xmlpath="devices"/> |
791 | | </platform> |
792 | | </connection> |
793 | | </configuration> |
794 | | </configurations> |
795 | | }}} |
796 | | [[CollapsibleEnd]] |
797 | | == References == |
798 | | * [http://dev.ti.com/tirex/#/?link=Software%2FSimpleLink%20CC13x0%20SDK CC1350 Wiki] |
799 | | * [http://dev.ti.com/tirex/content/tirtos_cc13xx_cc26xx_2_20_00_06/resources/cc1350LaunchPad/project0/landing_page_index.html Launch Pad Landing Page on Ti] |
800 | | * [http://processors.wiki.ti.com/index.php/Contiki-6LOWPAN Ti Information regarding Contiki] |
801 | | * [http://www.ti.com/lit/ug/sprui94/sprui94.pdf XDS110 User Guide] |
802 | | * [http://dev.ti.com/tirex/content/simplelink_academy_cc13x0sdk_1_13_01_05/modules/154-stack_03_linux_project_0/154-stack_03_linux_project_0.html TI 15.4-Stack - Linux Gateway Project Zero App Note] |
803 | | * [http://dev.ti.com/tirex/content/simplelink_academy_cc13x0sdk_1_12_01_16/modules/prop_04_cc1350lpdm/resources/CC1350LaunchPad_BLE_All_v1_00.hex CC1350 Bluetooth Software for use with iPhone App] |
804 | | |
805 | | = CC1350STK Notes = |
806 | | The [http://www.ti.com/tool/CC1350STK CC1350STK] is a sensor node sold and designed by Ti. While similar to the Launch Pad, it is much smaller. |
807 | | * Button 1 is the button on the edge furthest away from the JTAG headers. This is labeled as the 'Power' button. |
808 | | * Button 2 is the button on the same edge as the JTAG headers. This is a 'user' button. |
809 | | * There is no green LED on CC1350STK. There is only Green LED on CC2650STK and that function is for CC2650STK. |
810 | | * Hex file to erase CC1350SensorTag_ExtFlashErase.hex |
811 | | * Hex file for default factory image: CC1350SensorTag_BLE_All_v1_33.hex |
812 | | * It's not possible to set the STK in factory restore by pushing buttons. |
813 | | * The Ti Bluetooth iPhone app is missing the 1Ghz factory image in the list of available firmware. |
814 | | * Files are placed here (typical installation path): |
815 | | *C:\Program Files (x86)\Texas Instruments\SmartRF Tools\BLE Device Monitor\firmware\cc1350\sensortag |
816 | | * rfWsnDmNodeOad_US_CC1350STK_TI_CC1350F128-v1_06.hex |
817 | | |
818 | | = Third Party Software = |
819 | | * Contiki - Open Source OS for IoT, utilizing 6LoWPAN, can run on Sub-1GHz |
820 | | * Thingsquare - Based on Contiki, exposes through REST API [#Thingsquare Click here ] |
821 | | * !WiSun [#Wi-Sun Click Here] |
822 | | * Thread - Thread is an IPv6-based, low-power mesh networking technology for IoT products, intended to be secure and future-proof. Thread will not work on the Gateworks GW16122 because it is not designed for Sub-1Ghz. Based on 6LowPan. Based on 802.15.4 2.4GHz. |
823 | | * KNX - Open protocol Aimed at building automation. Operates on many physical layers. |
824 | | * Ti Simple 6LoWPAN Mesh End-Node Improves Network Performance Reference Design [http://www.ti.com/tool/tida-010003] |
825 | | * Wirepas: Fairly close to WiSun [https://wirepas.com/] |
826 | | |
827 | | == Wi-Sun == |
828 | | |
829 | | The TI 15.4 stack leverages WiSun-based frequency hopping and can be used on CC1350 and CC1352. |
830 | | |
831 | | Some 3rd parties capable of implementing a Wi-SUN stack are Adsol-Nissin and Procubed. |
832 | | |
833 | | Please use the E2E Ti Forums for more information [https://e2e.ti.com/support/ TI E2E Forums] |
834 | | |
835 | | |
836 | | == Thingsquare == |
837 | | [http://www.thingsquare.com Thingsquare] is a software company that offers customized software for the chip on the GW16122, the Ti CC135x. This software allows for the use of a smartphone app to monitor and control sensors through the Thingsquare cloud/backend. A [https://www.thingsquare.com/docs/api/ REST API] is available as well. |
838 | | |
839 | | A brief description of what is happening in the demo below: |
840 | | * A Gateworks GW16122 is acting as the Thingsquare IoT gateway on the Gateworks SBC |
841 | | * The GW16122 exposes a few serial interfaces (/dev/ttyACM0 and /dev/ttyACM1) which are then used for the SLIP interface |
842 | | * dnsmasq acts as a DNS server for the slip interface |
843 | | * The sl0 uses PTP for the DNS |
844 | | * The SLIP requires some routing and forwarding between interface sl0 and eth0 |
845 | | * The firmware on the GW16122 pushes data up to the Thingsquare cloud |
846 | | * The CC1350 Sensor tag is reporting back to the Gateway and pushing it's information up to the cloud |
847 | | |
848 | | |
849 | | |
850 | | '''Hardware required:''' |
851 | | All items purchased seperately |
852 | | |
853 | | * Gateworks [http://www.gateworks.com/product Ventana or Newport] Single Board Computer |
854 | | * Gateworks [http://www.gateworks.com/product/item/gw16122-mini-pcie-iot-radio-expansion-card GW16122 IoT Card] |
855 | | * Gateworks GW10124 900Mhz Antenna |
856 | | * Gateworks [https://shop.gateworks.com/index.php?route=product/product&product_id=59 GW10074] MMCX to SMA Female Adapter Cable |
857 | | * [http://www.ti.com/tool/CC1350STK Ti CC1350 Sensor Tag] |
858 | | * Gateworks SBC and GW16122 are the 'collector' in the system. This CC1350 !Sensor !Tag becomes the 'sensor' for development. |
859 | | * USB to Mini-PCIe Adapter |
860 | | * This allows the Gateworks GW16122 to be connected to a Laptop / PC for programming purposes. |
861 | | * [https://www.amazon.com/Mini-Wireless-Adapter-Module-Testing/dp/B00T2FPC2A/ref=sr_1_8?ie=UTF8&qid=1519335779&sr=8-8& Option #1 - Amazon] - Requires rubberband to hold GW16122 in |
862 | | |
863 | | ''' The following instructions assume the developer is familiar with using the Gateworks SBC & GW16122 and programming it using the instructions given elsewhere on this wiki''' |
864 | | |
865 | | '''Setup Instructions''' |
866 | | 1. [http://trac.gateworks.com/wiki/expansion/gw16122#Windows Flash] the GW16122 and sensor nodes with Thingsquare Firmware located [https://www.thingsquare.com/docs/downloads/ here] |
867 | | a. GW16122 Firmnware is labeled as ''CC1350 Launchpad Serial USB Access Point (US / 915 MHz)'' |
868 | | a. Sensor Firmnware is labeled as ''CC1350 Sensortag'' |
869 | | 1. Insert a programmed GW16122 into a Gateworks SBC Mini-PCIe slot that has USB support |
870 | | 1. Load Gateworks SBC Ubuntu 16.04 Software |
871 | | a. Install Ubuntu Xenial 16.04 with the instructions [wiki:ventana/ubuntu#Ubuntu16.04LTSXenialXerusconsoleimage Ventana 16.04] |
872 | | a. Confirm /dev/ttyACM0 and /dev/ttyACM1 exist on the Gateworks SBC in software |
873 | | a. Confirm an ethernet cable is connected to the Gateworks SBC connected to a LAN that has internet access via a WAN |
874 | | a. Install dnsmasq{{{apt-get install dnsmasq}}} |
875 | | a. Add the following lines to the end of the /etc/dnsmasq.conf file: |
876 | | {{{ |
877 | | interface=sl0 |
878 | | listen-address=127.0.0.1 |
879 | | listen-address=172.16.0.1 |
880 | | }}} |
881 | | a. Create a script or add to /etc/rc.local to be ran after the board boots each time: |
882 | | {{{ |
883 | | modprobe slip |
884 | | stty -F /dev/ttyACM0 115200 |
885 | | sleep 3 |
886 | | slattach -L -s 115200 -p slip /dev/ttyACM0 & |
887 | | |
888 | | sleep 10 |
889 | | ifconfig sl0 172.16.0.1 dstaddr 172.16.0.2 |
890 | | ifconfig sl0 mtu 600 |
891 | | |
892 | | echo 1 > /proc/sys/net/ipv4/ip_forward |
893 | | |
894 | | iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
895 | | iptables -A FORWARD -i eth0 -o sl0 -j ACCEPT |
896 | | iptables -A FORWARD -i sl0 -o eth0 -j ACCEPT |
897 | | systemctl start dnsmasq.service |
898 | | }}} |
899 | | a. After script is installed, either run the script or reboot the board if the script will run automatically |
900 | | 1. Connect the Gateway / Sensor either using a mobile phone or network browser, explained below: |
901 | | 1. Utilize the Thingsquare website to connect both sensor and Gateway to cloud with the following instructions using a mobile phone: [http://www.thingsquare.com/docs/get-started-with-starter-kit/] |
902 | | a. Important Note: Checking the box 'Remote Access' is important to connect the device to the Thingsquare backend and available when logging into the app/browser with user account |
903 | | 1. You can use the website [https://developer.thingsquare.com/web/] to access the devices from a PC browser on the same LAN. Create a Thingsquare account. |
904 | | a. Use the bottom menu icon, 'Nearby' to be sure you can discover the device on the LAN |
905 | | a. Important Note: Checking the box 'Remote Access' is important to connect the device to the Thingsquare backend and available when logging into the app/browser with user account |
906 | | |
907 | | '''Screenshots:''' |
908 | | * [[Image(thingsquare1.png,400px)]] |
909 | | * [[Image(thingsquare2.png,400px)]] |
910 | | |
911 | | '''Troubleshooting:''' |
912 | | 1. Verify traffic on sl0 interface with tcpdump, example below: |
913 | | {{{ |
914 | | root@xenial-ventana:~# tcpdump -i sl0 |
915 | | tcpdump: verbose output suppressed, use -v or -vv for full protocol decode |
916 | | listening on sl0, link-type RAW (Raw IP), capture size 262144 bytes |
917 | | 17:04:02.516758 IP 172.16.0.2.10323 > ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https: Flags [P.], seq 12805:13034, ack 371767140, win 500, length 229 |
918 | | 17:04:02.682914 IP ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https > 172.16.0.2.10323: Flags [.], ack 229, win 54500, length 0 |
919 | | 17:04:02.685640 IP ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https > 172.16.0.2.10323: Flags [P.], seq 1:102, ack 229, win 54500, length 101 |
920 | | 17:04:02.941381 IP 172.16.0.2.10323 > ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https: Flags [P.], seq 229:330, ack 102, win 500, length 101 |
921 | | 17:04:03.148806 IP ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https > 172.16.0.2.10323: Flags [.], ack 330, win 54500, length 0 |
922 | | 17:04:12.109625 IP 172.16.0.2.10323 > ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https: Flags [P.], seq 330:479, ack 102, win 500, length 149 |
923 | | 17:04:12.276629 IP ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https > 172.16.0.2.10323: Flags [.], ack 479, win 55500, length 0 |
924 | | 17:04:18.591617 IP 172.16.0.2.10323 > ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https: Flags [P.], seq 479:580, ack 102, win 500, length 101 |
925 | | 17:04:18.756148 IP ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https > 172.16.0.2.10323: Flags [.], ack 580, win 55500, length 0 |
926 | | 17:04:18.772626 IP 172.16.0.2.10323 > ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https: Flags [P.], seq 580:649, ack 102, win 500, length 69 |
927 | | 17:04:18.941914 IP ec2-52-211-110-245.eu-west-1.compute.amazonaws.com.https > 172.16.0.2.10323: Flags [.], ack 649, win 55500, length 0 |
928 | | ^C |
929 | | 11 packets captured |
930 | | 11 packets received by filter |
931 | | 0 packets dropped by kernel |
932 | | root@xenial-ventana:~# |
933 | | |
934 | | }}} |
935 | | 1. Verify dnsmasq is running: |
936 | | {{{ |
937 | | systemctl status dnsmasq.service |
938 | | }}} |
939 | | 1. Verify dnsmasq is listening on the right address 172.16.0.1 |
940 | | {{{ |
941 | | root@xenial-ventana:~# netstat -tulpn |
942 | | Active Internet connections (only servers) |
943 | | Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name |
944 | | tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 824/dnsmasq |
945 | | tcp 0 0 172.16.0.1:53 0.0.0.0:* LISTEN 824/dnsmasq |
946 | | tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 645/sshd |
947 | | tcp6 0 0 ::1:53 :::* LISTEN 824/dnsmasq |
948 | | tcp6 0 0 :::22 :::* LISTEN 645/sshd |
949 | | udp 0 0 127.0.0.1:53 0.0.0.0:* 824/dnsmasq |
950 | | udp 0 0 172.16.0.1:53 0.0.0.0:* 824/dnsmasq |
951 | | udp 0 0 0.0.0.0:68 0.0.0.0:* 584/dhclient |
952 | | udp6 0 0 ::1:53 :::* 824/dnsmasq |
953 | | root@xenial-ventana:~# |
954 | | |
955 | | }}} |
956 | | 1. Verify sl0 interface exists and is up: |
957 | | {{{ |
958 | | root@xenial-ventana:~# ifconfig |
959 | | eth0 Link encap:Ethernet HWaddr 00:d0:12:9b:f2:af |
960 | | inet addr:172.24.22.173 Bcast:172.24.255.255 Mask:255.240.0.0 |
961 | | inet6 addr: fe80::2d0:12ff:fe9b:f2af/64 Scope:Link |
962 | | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
963 | | RX packets:8962 errors:0 dropped:0 overruns:0 frame:0 |
964 | | TX packets:483 errors:0 dropped:0 overruns:0 carrier:0 |
965 | | collisions:0 txqueuelen:1000 |
966 | | RX bytes:665276 (665.2 KB) TX bytes:58003 (58.0 KB) |
967 | | |
968 | | lo Link encap:Local Loopback |
969 | | inet addr:127.0.0.1 Mask:255.0.0.0 |
970 | | inet6 addr: ::1/128 Scope:Host |
971 | | UP LOOPBACK RUNNING MTU:65536 Metric:1 |
972 | | RX packets:172 errors:0 dropped:0 overruns:0 frame:0 |
973 | | TX packets:172 errors:0 dropped:0 overruns:0 carrier:0 |
974 | | collisions:0 txqueuelen:1000 |
975 | | RX bytes:13066 (13.0 KB) TX bytes:13066 (13.0 KB) |
976 | | |
977 | | sl0 Link encap:Serial Line IP |
978 | | inet addr:172.16.0.1 P-t-P:172.16.0.2 Mask:255.255.255.255 |
979 | | UP POINTOPOINT RUNNING NOARP MULTICAST MTU:600 Metric:1 |
980 | | RX packets:307 errors:0 dropped:0 overruns:0 frame:0 |
981 | | TX packets:345 errors:0 dropped:0 overruns:0 carrier:0 |
982 | | collisions:0 txqueuelen:10 |
983 | | RX bytes:42795 (42.7 KB) TX bytes:24061 (24.0 KB) |
984 | | |
985 | | |
986 | | }}} |
987 | | 1. Verify you can ping www.google.com from the Gateworks SBC command line |
988 | | |
989 | | |
990 | | References: |
991 | | * Ti Thingsquare [http://www.ti.com/ww/en/internet_of_things/Thingsquare-for-TI-IoT-development-kits.html] |
992 | | |
993 | | {{{#!comment |
994 | | == Programming the Tiva MCU == |
995 | | |
996 | | In the event of an unprogrammed or corrupted !TiVa MCU, you can flash firmware via USB connection. For the GW16122 this is done via a mini-PCIe to USB converter such as our GW16115. |
997 | | |
998 | | You will need to have installed the software detailed in the [wiki:expansion/gw16122#SetUp Set Up] section in order to continue. |
999 | | |
1000 | | Since the !TiVa MCU functions as an XDS110 debug probe for the GW16122, you can use the default firmware included in the Code Composer Studio installation directory. |
1001 | | |
1002 | | To flash the bootloader and/or firmware via '''USB''': |
1003 | | |
1004 | | 1. Navigate to your Code Composer installation directory |
1005 | | 1. Enter the XDS110 folder in ccs |
1006 | | {{{#!bash |
1007 | | cd ccsv7/ccs_base/common/uscif/xds110/ |
1008 | | }}} |
1009 | | 1. Connect a single GW16122 to your host machine via USB port. If more than one are connected the {{{xdsfu}}} program will operate on the first device it finds. |
1010 | | {{{#!bash |
1011 | | xdsdfu -e |
1012 | | }}} |
1013 | | If no device is found, check your connections and cables, if no usb device enumerates you will need to flash your firmware via JTAG. |
1014 | | 1. Once a device is enumerated, flash the default XDS110 bootloader and firmware |
1015 | | {{{#!bash |
1016 | | xdsdfu -m |
1017 | | xdsdfu -b bootloader.bin -r |
1018 | | xdsdfu -m |
1019 | | xdsdfu -f firmware.bin -r |
1020 | | }}} |
1021 | | Alternatively, to flash the bootloader and/or firmware via '''JTAG''': |
1022 | | |
1023 | | 1. Connect an external XDS110 debug probe to your host machine via USB, and to the GW16122 via 10-pin JTAG connector (designator J4) |
1024 | | 1. Run the Uniflash gui application |
1025 | | 1. Select target device of {{{TiVa > TM4C1294NCPDT}}} |
1026 | | 1. Select connection of {{{XDS110 Debug Probe}}} |
1027 | | 1. Click "Start" |
1028 | | 1. Select the {{{boot_loader.bin}}} and {{{firmware.bin}}} files from the {{{ccsv7/ccs_base/common/uscif/xds110/}}} directory (click the plus sign to flash multiple files) and enter load addresses of {{{0x0000}}} and {{{0x4000}}} respectively |
1029 | | 1. Click "Load Image" |
1030 | | |
1031 | | If you run into trouble using uniflash to load both the bootloader and firmware, just flash the bootloader and use the above USB method to flash the firmware. |
1032 | | |
1033 | | A properly flashed !TiVa MCU should now enumerate as a XDS110 debug probe which is required to program the connected CC1350. |
1034 | | {{{#!bash |
1035 | | # lsusb entry: |
1036 | | Bus XXX Device XXX: ID 0451:bef3 Texas Instruments, Inc. |
1037 | | |
1038 | | # xdsdfu -e entry: |
1039 | | VID: 0x0451 PID: 0xbef3 |
1040 | | Device Name: XDS110 Embed with CMSIS-DAP |
1041 | | Version: 2.3.0.9 |
1042 | | Manufacturer: Texas Instruments |
1043 | | }}} |
1044 | | |
1045 | | More information can be found on the {{{xdsdfu}}} tool via the {{{ReadMe.txt}}} in the same directory. Also refer to the XDS110 User Guide linked in the [wiki:expansion/gw16122#References References] section. |
1046 | | }}} |
| 37 | All software information to use the GW16122-B and newer should be found on the [wiki:cc135x Gateworks CC135x wiki page]. This is because the CC135x chip is used on many designs. |