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.

CC2540 kefob not visible to other BLE device (mobile or tab)

Other Parts Discussed in Thread: CC2540

 i have purchased CC2540 mini development. keyfobkit, keyfob here only communicate with  USB dongle provided with this mini kit. Normally what happened is any BLE device (mobile or tab) visible to any other BLE device irrespective of make. but CC2540 keyfob is not visible to any BLE device (mobile or tab).

can anyone guide me how i can make CC2540 keyfob visible to any other BLE device (mobile or tab) without using any app like (TI BLE sensor tag or TI BLE device monitor). 

  • Should work. There is nothing special about keyfob. It uses public advertising and does not disconnect automatically. Try LightBlue 3rd party app. Press button on fob, since it will stop advertising after 30 sec.

    -Greg

  • Hi,

    Have you modified any thing in Mini-DK code? Can you check in peripheral.c(GapRole_init) what are the parameters set while advertising?

    gapRole_AdvEventType = GAP_ADTYPE_ADV_IND;   
    gapRole_AdvDirectType = ADDRTYPE_PUBLIC;
    gapRole_AdvChanMap = GAP_ADVCHAN_ALL;
    gapRole_AdvFilterPolicy = GAP_FILTER_POLICY_ALL;

    Use the above settings and try. Check in your application if any of the above GAPROLE_ADV_EVENT_TYPE, GAPROLE_ADV_DIRECT_TYPE, GAPROLE_ADV_CHANNEL_MAP, GAPROLE_ADV_FILTER_POLICY these are changed or not. Also check the advData and scanData structures.

    Regards,

    Arun

  • Thanks Greg.

    But this is not discovering any other device like my smart phones or i-pads.

    I don't want to use any 3rd party app, but want to see the changes that I can make in the BLE profiles itself.

    Thanks.

  • Hi Arun,

    Pl See my reply below :

    1. Have you modified any thing in Mini-DK code? - NO.

    2.

    Can you check in peripheral.c(GapRole_init) what are the parameters set while advertising?

    gapRole_AdvEventType = GAP_ADTYPE_ADV_IND;   
    gapRole_AdvDirectType = ADDRTYPE_PUBLIC;
    gapRole_AdvChanMap = GAP_ADVCHAN_ALL;
    gapRole_AdvFilterPolicy = GAP_FILTER_POLICY_ALL;

    These are exactly the same.

    3. Check in your application if any of the above GAPROLE_ADV_EVENT_TYPE, GAPROLE_ADV_DIRECT_TYPE, GAPROLE_ADV_CHANNEL_MAP, GAPROLE_ADV_FILTER_POLICY these are changed or not. Also check the advData and scanData structures.

    I have checked these and verified.

     

    The problem is that I am still not able to see this keyfob on my phone or tab bluetooth.

    This is still only discoverable and connectable to the USB Dongle only....

     

    Kindly help in sorting this out.

    Many Thanks,

  • Hi,

    Your advertisements should be visible on your phone and iPad. Please help in verifying the advertisement settings. 

    What is your advertising interval and timeout for Mini-DK? You can flash Packet Sniffer code on the CC2540 USB dongle if you have a CC Debugger? With this packet sniffer can you check if your mini-DK is advertising when started? 

    Can you post the log of the packet sniffer here?

    Regards,

    Arun

  • You haven't specified which phone or tab you are using to discover KeyFOB. Please make sure that whichever device you are using has a BLE support, not only Standard Bluetooth.

  • Hi Arun,

    Thanks for your reply.

    I am explaining my problem in detail below :

    1. I am using IAR workbench ( evaluation mode ) for coding the CCdebugger.

    2. Whenever I download & debug the code for keyfob using IAR, it runs successfully. I have then used this keyfob with Btool & USB dongle using Btool. There is no problem there. The dongle detects and Btool scans and connects with the keyfob.

    But when I try to scan the keyfob on other phones , ( iphone 4, macbook pro, Blackberry, Samsung GT7100 ) this remains unvisible ??

    Where am I making the mistake here ? is something wrong with the code ?

    I am attaching the IAR snapshot below:

    Advertising interval - 30.72 sec

    Time out - FFFF

    Thanks,

     

  • Hi Dhaval,

    I am using the following devices :

    1. Samsung  - GT7100 

    2. Balckberry - 9220

    3. Iphone 4

    4. Macbook pro.

    I have searched their BT specs and all are4.0 LE compliant..

    So I don't think we have a problem here...

  • thought this had verified answer?

    What is timeout FFFF?
    Some old dev kits use address 0xFFFFFF, which you should avoid.

    I would try lightBlue app to help isolate issue to hw/sw.

    Disable bonding and whitelist. This can cause you to advertise private resolvable. check box Erase all flash when downloading.

    What other parts of code have you changed? Try putting adv data back to default in example. The adv data is parsed by host stack to determine some of the adv parameters, so this can mess things up.

    Add advEvent callback to toggle LED on advertisement, so you can tell when connected/advertising/idle.

  • Hi,

    Most of these phones are BT4.0 compliant. But I doubt they are BLE compliant. Can you check with a phone that is BLE complaint for sure? Try a newer phone like Samsung Galaxy S5, iPhone 5s or 6, Nexus 4 or 5 etc.

    Also, if you could program the cc2540 USB dongle to packet sniffer  dongle using CC debugger and capture the sniffer log it would help us in understanding if your advertisements are fine or not.

    Regards,

    Arun

  • Hi,

    I just want to correct few things.

    First of all advertising interval is not 30.72 sec. It should be in millisecond range(its the interval between each advertisement packets being sent).

    The timeout has to be kept at 0 sec for the device to advertise till 30.72 and then stop advertisement. You can keep a higher value in seconds too.

    Also as Greg pointed, make sure white list is disabled for now.

    Are you sure that you have power recycled the board or is the board still not connected to Btool dongle before checking on phone?

    packet sniffer log will be highly appreciated. 

    Thanks & Regards,

    Arun