This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SimpleBLECentral on the CC2540 Keyfob

Other Parts Discussed in Thread: CC2540

Hi! So I am trying to get the SimpleBLECentral example from the 1.2.1 stack going on the keyfob from the mini dev kit.

So far I have:
-set HAL_LCD to FALSE in the preprocessor settings and
-in simpleBLECentral.c, simpleBLECentral_HandleKeys I changed the key assignment so that discovery is started on HAL_KEY_SW_1 instead of HAL_KEY_UP.

When I run this on the keyfob it does indeed start discovery (runs the command), but only once, it never enters simpleBLECentral_HandleKeys again! It would seem no more events are registerd after the first button press?
Also I cannot find the device in BTool , and I see no packets what so ever when using the Packet Sniffer, but I'm not sure how this is supposed to work when connecting to a central device?

Any thoughts on where to start?

  • I found out one more thing when I started poking around in hal_key.c; adding CC2540_MINIDK to the preprocessor variables fixed the key assignments!

    The question remaining is how to connect to the central device from BTool? It still does not turn up in the scan results..

  • Hi Albert,

    Albert Skog said:
    The question remaining is how to connect to the central device from BTool? It still does not turn up in the scan results..

    In order to connect a Central Device to BTool, BTool has to configure the NWP (HostTestRelease) as a Peripheral Device. This is done by using commands in the Advanced tab of BTool:

    1. GAP_DeviceInit (Peripheral Role)
    2. GAP_UpdateAdvertisingData
    3. GAP_MakeDiscoverable

    From this point, the Central Device can scan for advertisments, initiate and connect to the Peripheral Device that is run by BTool.

    Br.

  • Hi Albert,

    I'm exactly facing the same issue - unable to receive any callbacks for button press event after the first one when KeyFob is running simpleBLEcentral software. I've added CC2540_MINIDK to the pre-processor macros but it didn't fix my problem. Can you please tell me if there are any other tweaks needed in "hal_key.c" 

    Thanks, Arjun

  • Hi Albert / TI,

    Can you please share the knowledge of setting Keyfob in Central mode. I'm facing the same problem that you faced with - Only one keypress callback and no more.

    I've my CC2540_MINIDK macro added to Preprocessor variables but It didn't fix my problem. Please help me.

    Thanks, Arjun

  • Joakim,

    I completed the three steps in BTool for BLE v1.3 HostTestReleaseAppAll running on a 2540 on an RF05EB board.  But my BLE Central still indicates '0 dicovered" when I do a scan with it's joystick.  Should I be clicking on something else in BTool before I start the scan?

    Thanks'

    Pat