We import from SimpleLink SDK BLE Plugin project_zero_MSP_EXP432P401R_tirtos_ccs. We compile and upload. When the USB is connected to a PC, two serial ports are created. On Linux they are /dev/ttyACM0 and ACM1. Connect to the serial port at 115200 baud, the following message comes up.
Scanning for Bluetooth devices, "Project Zero" should come up. TI Android App SimpleLink SDK Explorer can be used for testing; it has a Project Zero interface to control the LED, read buttons, and send text. On Linux, we can use hcitool lescan to scan and gatttool to test--------- Project Zero Example ---------Initializing the user task, hardware, BLE stack and services.LEDService: Registered callbacks to application.ButtonService: registered callbacks to applicationDataService: Registered callbacks to application.LEDService: Registered service, 1 attributesButtonService: Registered service, 2 attributesDataService: Registered service, 2 attributes
gatttool -b A0:E6:F8:BD:EB:02 -IWhen both buttons are pressed, CC2650MODA is flashed. However, note the default project includes cc2640r2lp_simple_np_uart_pm_sble hex, which does not work with CC2650. We replace it with simple_np_cc2650bp_uart_pm_sbl_2_02_01_18a_merge. If there is some problem flashing, install SmartRF Flash Programmer 2 (v1.7.5).
[A0:E6:F8:BD:EB:02][LE]> connect
Attempting to connect to A0:E6:F8:BD:EB:02
Connection successful
[A0:E6:F8:BD:EB:02][LE]> primary
attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0008, end grp handle: 0x0008 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x0009, end grp handle: 0x001b uuid: 0000180a-0000-1000-8000-00805f9b34fb
attr handle: 0x001c, end grp handle: 0x001e uuid: f0001110-0451-4000-b000-000000000000
attr handle: 0x001f, end grp handle: 0x0025 uuid: f0001120-0451-4000-b000-000000000000
attr handle: 0x0026, end grp handle: 0xffff uuid: f0001130-0451-4000-b000-000000000000
[A0:E6:F8:BD:EB:02][LE]> char-write-req 0x001e ff00ff
Characteristic value was written successfully
[A0:E6:F8:BD:EB:02][LE]> char-read-hnd 0x001e
Characteristic value/descriptor: ff 00 ff
CC2650MODA draws about 160uA when idle, and 0.1uA when in reset. There is a 100K pull up resistor on the reset pin, which could contribute to 30uA if the reset pin is pulled low.
No comments:
Post a Comment