556 | | This code was provided by a Texas Instruments (TI) employee on the E2E Support forums. |
| 556 | This sample example code was provided by a Texas Instruments (TI) employee (Prashanth S) on the [https://e2e.ti.com/support/wireless_connectivity/proprietary_sub_1_ghz_simpliciti/f/156/p/586620/2154741#2154741 E2E Support forums] - (filename download on the forum post is: 4034.uartRxTx_CC1350_LAUNCHXL_TI.zip). |
| 557 | |
| 558 | 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. |
| 559 | |
| 560 | One single project is designed to do TX and RX (one firmware file). |
| 561 | |
| 562 | Download the pre-compiled firmware here: |
| 563 | [http://dev.gateworks.com/gw16122/uart-rx-tx-example-firmware/ uartRxTx_CC1350_LAUNCHXL_TI.out] |
| 564 | |
| 565 | Using a Windows or Linux desktop/laptop PC, flash this firmware to the GW16122. |
| 566 | |
| 567 | Connect the GW16122 to the desired system where you will then open the UART communication. |
562 | | |
563 | | This example code |
| 573 | * Windows Example |
| 574 | * COM6 (use this first UART) |
| 575 | * COM8 |
| 576 | |
| 577 | 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. |
| 578 | |
| 579 | You can type the data you want to send, but ***must*** press the 'Enter' key to actually send the data. |
| 580 | |
| 581 | Type a message on the console on the TX side, like so: |
| 582 | {{{ |
| 583 | hi, hello world! |
| 584 | }}} |
| 585 | |
| 586 | |
| 587 | The other end will print the received data with a string like so: |
| 588 | {{{ |
| 589 | rx data: hi, hello world! |
| 590 | }}} |
| 591 | |
| 592 | This example code uses the following LEDs on the GW16122: |