Tool/software: Code Composer Studio
According to 《Using Production Test Mode (PTM)》, PTM is added into simple_peripheral project . Then following another post in E2E to solve the problem of building failed . That
post can be got in "6 attachments". Configuring pairMode to GAPBOND_PAIRING_MODE_INITIATE , so that the pair request can be shown in my cellphone . However , the pair request can only be
shown android phone , instead of iphone . Where am I wrong ?
My detailed steps:
1,According to 《Using Production Test Mode (PTM)》, adding PTM into simple_peripheral project.As shown in picture 1 .《Using Production Test Mode (PTM)》can be got in "7 attachments".
picture 1
2,Following another post in E2E to solve the problem of building failed .As shown in picture 2 . That post can be got in "7 attachments".
picture 2
3,Configuring pairMode PTM_ENABLE_FLAG to TRUE, so that the PTM is opened , and CC2640 can not advertise . PTM works normally , as shown in picture 3 .
#define PTM_ENABLE_FLAG TRUE /*PTM ENABLE FLAG*/ static void SimpleBLEPeripheral_init(void) { ........ if(PTM_ENABLE_FLAG) { /* Intercept NPI RX events. */ NPITask_registerIncomingRXEventAppCB(SBP_handleNPIRxInterceptEvent, INTERCEPT); /* Register for Command Status information */ HCI_TL_Init(NULL, (HCI_TL_CommandStatusCB_t) SBP_sendToNPI, NULL, selfEntity); /* Register for Events */ HCI_TL_getCmdResponderID(ICall_getLocalMsgEntityId(ICALL_SERVICE_CLASS_BLE_MSG, selfEntity)); HCI_EXT_EnablePTMCmd(); /* Inform Stack to Initialize PTM */ } }
picture 3
4,Configuring pairMode PTM_ENABLE_FLAG to FALSE , so that the PTM can be closed , and CC2640 can advertise normally .
#define PTM_ENABLE_FLAG FALSE /*PTM ENABLE FLAG*/
5,Configuring pairMode to GAPBOND_PAIRING_MODE_INITIATE , so that the pair request can be shown in my android cellphone .As shown in picture 4 .
static void SimpleBLEPeripheral_init(void) { ...... uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE; ....... }
picture 4
6,However , when iphone connected to CC2640 , the pair request can never be shown . Where am I wrong ?
7.ATTACHMENTS:
(1)The link of《Using Production Test Mode (PTM)》 at simplelink_cc2640r2_sdk_1_40_00_45:
file:///C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/docs/blestack/ble_user_guide/html/ble-stack-3.x/creating-a-custom-bluetooth-low-energy-application.html#using-production-test-mode-ptm
(2)the link of simple_peripheral in my computer:
C:\ti\simplelink_cc2640r2_sdk_1_40_00_45\examples\rtos\CC2640R2_LAUNCHXL\blestack\simple_peripheral
(3)simplelink_cc2640r2_sdk_1_40_00_45 can be downloader here:
dev.ti.com/.../
(4)CC2640R2 launchpad can be bought here:
www.ti.com/.../launchxl-cc2640r2
(5)The post in E2E to solve the problem of building failed can be got here:
e2e.ti.com/.../676779
(6) The link of teaching video of PTM:
training.eeworld.com.cn/.../9105
8、My Developing environment :
CCS:Code Composer Studio 7.2.0
SDK:simplelink_cc2640r2_sdk_1_40_00_45
hardware:CC26640R2 launchpad develop kit
VS: Microsoft Visual C++ 2010 Express
system:win7 64 bit