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.

no GAP_DeviceDiscoveryDone event

Other Parts Discussed in Thread: CC2540

i writing a simple central-role application, using the message sequences i see from BTool as a model....   [it might be nice to have a small example for this purpose; reading hci_ext_app.c is like information overload!!]

i have successfully called GAP_DeviceInit with essentially the same parameters i see from the BTool messages -- eg, CENTRAL_ROLE....  the call returns SUCCESS *and* i subsequently receive a GAP_DeviceInitDone event with all status being successful here as well....

then, i call GAP_DeviceDiscoveryRequst() -- but i never receive a matching GAP_DeviceDiscoveryRequestDone event!!!

i am indeed linking with the right library (wasn't originally!!)...

any thoughts on what i'm missing....   a "checklist" of what's required for an embedded central-role app would be helpful....

  •  

    Hello,

    I did somewhat the same thing I think in c sharp, and wrote a little app to send commands to cc2540 usb dongle. You are definitely  doing the right thing, by looking at the btool log for reference.  Do you see anything different in the fields?  You should get a command complete, and then after the scan finishes (several seconds) a deviceDiscoveryDone   Btool is setup as central device, so that shouldn't be issue.

    -Greg

     

    Serial Port Open - Success 

    =========================================

    TX:Device init

      01  00  FE  26  08  03  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  01  00  00  00

    =========================================

    RX:Command Complete

      04  FF  06  7F  06  00  00  FE  00

    =========================================

    RX:Device Init Done

      04  FF  2C  00  06  00  EE  FF  C0  EE  FF  C0  1B  00  04  B7  B7  07  F7  70  43  6B  64  EE  6E  A6  8E  32  B8  FF  57  88  E6  C8  E6  9C  D6  DD  29  C9  1A  2C  95  4A  1D  B4  B5

    =========================================

    TX:ScanReq

      01  04  FE  03  03  01  00

    =========================================

    RX:Command Complete

      04  FF  06  7F  06  00  04  FE  00

    =========================================

    RX:GAP Device Info

      04  FF  2C  0D  06  00  00  00  EE  FF  C0  EE  FF  C0  D3  1F  02  01  06  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00

    =========================================

    RX:GAP Device Info

      04  FF  2C  0D  06  00  04  00  EE  FF  C0  EE  FF  C0  D3  1F  12  09  54  68  65  72  6D  6F  6D  65  74  65  72  53  65  6E  73  6F  72  00  00  00  00  00  00  00  00  00  00  00  00

    =========================================

    RX:Device Discovery Done

    RX:Device Discovery Done

    Device Found

      04  FF  0C  01  06  00  01  00  00  EE  FF  C0  EE  FF  C0

    =========================================

    TX:ConnectReq

      01  09  FE  09  00  00  00  EE  FF  C0  EE  FF  C0

    =========================================

    RX:Command Complete

      04  FF  06  7F  06  00  09  FE  00

    =========================================

    RX:GAP Established Link

      04  FF  13  05  06  00  00  EE  FF  C0  EE  FF  C0  00  00  50  00  00  00  D0  07  00

    =========================================

    TX:Enable Temperature Indications

      01  12  FD  08  00  00  00  00  12  00  02  00

    =========================================

    RX:Command Complete

      04  FF  06  7F  06  00  12  FD  00

    =========================================

    RX:unknown command

     

    =========================================

    RX:Temperature Indication

      04  FF  14  1D  05  00  00  00  0E  11  00  02  73  01  00  FF  DB  07  02  1B  00  02  19

    =========================================

    TX:Indication Confirmation

      01  1E  FD  02  00  00

    =========================================

  • i'm not using a host at all....  i have a "standalone" board that i've loaded a C program that does the sequence i described above....

    do you have a *C* program that works at least through the scan request???  ideally, there would be an IAR project that would encapsulate all of the -D settings and use the right library....

  • Ahhh - then you are doing something like a central profile on the keyfob?   This code has been developed for upcoming 1.1 release, but I haven't tried it out yet.   Other than the library, I can't think of anything you would be missing, but I will ask the guys involved with the central profile development.  There is peripheral.c file which encapsulates the peripheral role and you would likely need to add code which adds in "master" type handling. Maybe we can have you test our central profiles before 1.1? 

    -Greg

     

  • i'll be glad to help in any way i can with testing....

    but obviously, hci_ext_app.c "works" with the current code base....  i'm just trying to make the same direct function calls that otherwise happen when i use BTool...

     

    i would think one could already do this??

  • HI

       When is the BLE stack 1.1 expected to launch.What will be the new additional features in this version

  • Hi...

    I am working on a simple app. that sends KeyFob data to the USB dongle and onto UART1 on the dongle. Currently I am using the BTool to control the dongle. I am extremely interested (and the some ;-)) in getting my hands on some code that would rid the USB dongle of the required USB-connectivity and PC-control. I am trying to make stand alone projects that don't require BTool or PC-connection.

    If the code is available in BETA versions for the upcoming BLE stack 1.1, what are the chances that I could inspire you (TI) to release the requested code asap :-)

    Regards,

     

    Morten Nielsen

    M.Sc. - Computer Systems

    Denmark

  • Hi greg,

    I know that you wrote a little app to send commands to cc2540 usb dongle. Can i see the source code?I need it for write an application that send command to usb dongle.

    Thanks.