![Image result for cc2640r2f](https://dev.ti.com/tirex/content/tirex-product-tree/cc26xx_devtools/.metadata/.tirex/project0_cc2640r2lp/images/cc2640r2lp_explained.jpg)
![Image result for cc2650](https://www.element14.com/community/dtss-images/uploads/devtool/image/large/SimpleLink_CC2650_Wireless_MCU_LaunchPad_Kit.png)
This is the first experiment to do on a connection between CC2650 and CC2640R2F
In this experiment, I use a CC2650 as a simple central device and scanning another peripheral (CC2640).
This tutor follows the TI Guide:
http://dev.ti.com/tirex/explore/content/simplelink_academy_cc2640r2sdk_3_10_01_00/modules/blestack/ble_scan_adv_basic/ble_scan_adv_basic.html
However, this tutor use for two CC2640 experiments so we need to combine two Source:
Simplelink for CC2640R2 ver 3.10.0.0.xx
and SimpleLink for CC2650 ver ble_sdk_2_02_00_31
Notice 1: You must configure UART for each project to connect two KITs.
Notice 2: The code does not display Advertising Data and I will try later
Update:
After two days to debug the problems belong to the function convert number string to text string
char *Util_convertBytes2Str(uint8_t *pData, uint8_t length)
{
uint8_t charCnt;
char hex[] = "0123456789ABCDEF";
static char str[(3*31)+1];
char *pStr = str;
//*pStr++ = '0';
//*pStr++ = 'x';
char len = length/4 -1;
for (charCnt = 0; charCnt < len; charCnt++)
{
*pStr++ = hex[*pData >> 4];
*pStr++ = hex[*pData++ & 0x0F];
if(!((charCnt+1) >= len)) {
*pStr++ = ':';
}
}
pStr = NULL;
return str;
}
the Length of pData is 31 however its format different to charCount (Actually just 7 characters) so we need to modify the TI's original tutorial
We can change some feature to test the example operation; for particularly I change the feature
#define DEFAULT_DISCOVERY_MODE DEVDISC_MODE_ALL
#define DEFAULT_DISCOVERY_WHITE_LIST FALSE
in simple_central.c for scanner
#define DEFAULT_DISCOVERABLE_MODE GAP_ADTYPE_FLAGS_GENERAL
in simple_peripheral.c for advertiser
Comments
Post a Comment