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 Btool

Other Parts Discussed in Thread: CC2540

Hey Team,

My customer is using the BTool sofware to communicate with the CC2540 Bluetooth LE module and is getting the following error:

GAP Device Initialization Timeout.

Device May Not Function Properly.

The issue seems to be with either the chip or the pathway between the chip and the RS232 Serial port. they are unable to initialize and communicate as a GAP device.  I've done extensive testing with a number of different serial configurations but all have ended with the same result.  If you are aware of any issues involving this combination of development tools or the BTool software, it would be much appreciated.

The RS232 connection is functional because the customer's UART code seems to have no trouble sending or receiving.  It's just the HostTestRelease program that is not communicating back to the serial port.

  • Hello,

    I have a few questions to help isolate the issue.

    Is this the USBDongle or SmartRF?  Also, is this a supplied binary or is it built from a project - IAR7.6 &release 1.1?

    Is the error showing up in the BTool log?  I can do a text search for this error in Btool source, but I need to know exact message.

    Br,

    -Greg

  • Hey Greg,

     The customer is using the SMARTRF05. They have installed both from the .hex file and built the project using 7.6.  The error message is always the same and it shows up in the BTool log.  they've also checked to ensure that the CC2540 is getting the UART RX.  The TX seems to be getting lost.

    The exact error message is:

    GAP Device Initialization Timeout.

    Device May Not Function Properly.

     Thank you again.

  • Hello,

    This is timeout at very beginning, so BTool found the serial port, but like you say, it doesn't get a response.  The SmartRF has an enable disable toggle switch near the RS232 connector. Make sure this is set to enable.  Also, with IAR -hit the break button after it is running and see where the code is running.   There is a project setting for SmartRF, so make sure the project is Slave/Master only and not USBSlave or USBMaster or keyFob. Try connecting BTool only after the program is running.  Try these out and let me know how it goes.

    BR,

    -Greg

  • Greg, I am having the exact same problem. I had the switch in disable and I switched it to enable. But I am still having the same problem with the switch in enable. I tried it with the two boards that came with the kit and both have the same problem. I tried powering them with USB and with batteries and the same problem. I powered the board after changing the enable switch and started BTOOL after the SMARTRF05EB was powered up and running. I am new to your kits and very confused. Nothing seems to be working. The two boards were supposed to come with SimpleBLECentral and SimpleBLEPeripheral  loaded in them, but they both came with SimpleBLECentral. I am using Windows XP Professional x32 SP3. We built the computer for this project (Intel DH67CL and i7-2600 with 4Gbytes) and have nothing else loaded in it, but the basic XP that we installed. The USB serial adapter is the ATEN USB to Serial Bridge. I am stuck and have no idea how to move forward, Thanks for your help. Julio C. Spinelli

     

  • I am seeing the same error using the USB Dongle inthe BTLE Mini Dev kit, right outof the box...I start BTool with the USB dongle attached or not-attached, it doesn't seem to matter. I get the following log with an XP system

    Port opened at 11/2/2011 7:27:43 AM

    [1] : <Tx> - 07:27:43.843
    -Type        : 0x01 (Command)
    -Opcode        : 0xFE00 (GAP_DeviceInit)
    -Data Length    : 0x26 (38) byte(s)
     ProfileRole    : 0x08 (Central)
     MaxScanRsps    : 0x05 (5)
     IRK        : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
     CSRK        : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
     SignCounter    : 0x00000001 (1)
    Dump(Tx):
    01 00 FE 26 08 05 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

    ------------------------------------------------------------------------------------------------------------------------
    Error writing to COM1
    The write timed out.
    [2] : <Warning> - 07:27:53.750
    GAP Device Initialization Timeout.
    Device May Not Function Properly.

  • Sorry...I did want to make clear that I did program the dongle (and the fob) in accordance with the instructions before trying this.

  • Hello,

    For SmartRF - Are you able to flash? Does the USB enumeration on the PC happen?

    For USBDongle - Once you have programmed the USBDongle, you should see a red led when powered up. Does this enumerate on your PC when plugged in.

    To be on safe side,install TI Flash programmer - which will install some of the drivers automatically.  

     

    - Flash with Central/Master (selecting correct project - SmartRF or Mini-Kit)

    - Make sure enumeration happens

    - Startup Btool

    BR,

    -Greg

  • Here are my steps:

     

    1) I have the TI Flash Programmer installed and working.

    2) According to the CC2540 Quick Start Guide, I programmed the USB Dongle with the HEX file in Texas Instruments\Accessories\Hex_Files\cc2540_ble1.1_USBDongle_HostTestRelease_Master.hex...it seems to program correctly and verifies.

    3) I disconnect the dongle from the USB and disconnect the programmer cable. The red led is ON...until I disconnect obviously.

    4) I reconnect the USB Dongle to the USB port on the same Windows XP Pro PC. The red led is ON and the Windows Found New Hardware wizard appears. Windows sees this as a "USB Device" but cannot, as I would expect, find a correct driver so I CANCEL the HW Wizard. I actually have to use the task manager to cancel the HW wizard as it is unreponsive. ** is this what you mean by enumeration? I don't have a tool to examine this in more detail and am not sure what to do at this point other than cancel HW wizard.

    5) I start BTool, it defaults to COM1. Flow control is by default set to RTS/CTS, but if I use that it errors trying to write to COM1 so I close the device, select New device,select NO flow control and this is when I only get the message:  (along with an error box popup).

    [2] : <Warning> - 11:19:46.937
    GAP Device Initialization Timeout.
    Device May Not Function Properly.

     

    I am following the quick start sheet as close as possible and get this error.

     

  • Hi Ken,

    Have you tried using the usb_cdc_driver_cc2540 driver for this, found in "C:\Texas Instruments\BLE-CC2540-1.1a\Accessories\Drivers" (default directory).

    BR

  • Awesome...I think that did it. I now get a connection on COM3 and do not get the previous error. thanks

  • Hi Nick,

     

    Do you know how to use the usb_cdc_driver_cc2540 driver?

     

    Regards,

     

    Daniel

  • Daniel,

    How to install the USB drivers is explained in the cc2540 mini development kit user guide ( http://www.ti.com/lit/ug/swru270b/swru270b.pdf ) Chapter 3.1.

    BR,

    Gijs

  • i Gijs,

    I have read the chapter. The problem seems not that easily to be fixed.

    I'm using CC2540 DK not Mini DK which I believe has the same USB Dongle.

    After I plug in my USB Dongle, under Cebal controlled devices in Device Manager, it shows CC2540 USB Dongle meaning it's working, but there is no COM port associated with it, and therefore, I still can not use BTool to access CC2540 on USB Dongle.

    Do you have any ideas?

    Of all the software development tools: Packet Sniffer, Flash Programmer, SmartRF Studio 7, and BTool, I have no problems with others, just this BTool. Quite nuisance.

    Regards,

     

  • Hi Daniel,

    When you install the driver correctly it should show up in the device manager in the "Ports (COM & LTP)" section and should carry the name "TI CC2540 Low-Power RF to USB CDC Serial Port (COM [portnumber])".

    Are you sure you programmed the  "cc2540_ble1.1_USBdongle_HostTestRelease_Master.hex" firmware on the USB dongle?

    BR,

    Gijs

  • Hi Gijs,

    Many thanks for for that.

    I succeeded. I didn't install the the .hex file. But how to access CC2540 Module mounted on the SmartRF05 Board?

     

    Regards,

  • Hi Gijs,

     

    My LCD Screen on SmartRF05 Board produces noise when it is switched on, and the characters are flashing with LEDs blinking as well.

     

    Can we send it back for repairing?

     

    Regards,

  • Daniel,

    I do not think Gijs can help you in this issue. You have to talk not to a "community member" but a "TI employee", or better get in touch through a normal contact way, not a forum ;)

  • Hello All,

    I am a new developer on CC2540. I have installed the software IAR Embedded on my PC.
    I do not any idea how can I create a simple application for send and receive data.

    So I am requesting you all please suggest me how can I proceed.

    Thanks in advance

    Tapas

  • Hello,

    I could solve my problems by Gijs's comment. Thank you very much.

    SO, why don't they explicitly describe that "CC2540_USBDongle_HostTestRelease_All.hex" is the file you should download to the dongle via the Flash Programmer ?

    I don't see any explicit description in the CC2540 Mini Development KIt Quick Start Guide nor in the Software Developer's Guide which hex file should be used for the dongle and keyfob.

     BR,

    Ichirou

     

  • I am having the same problem.  Using a SmartRF05 EVB with the CC2540 module.  I've compiled and uploaded the "CC2540EM" configuration of the HostTestRelease project.  The LCD screen says "TI BLEv1.2 HostTestApp All"  I have turned the RS232enable switch to enable.  However, BTool is unable to get a response from the board!

    I have tried 115200 and 57600 baud, but no difference.    

    Furthermore, I've looked through the code APP code to see if it ever calls the HAL UART functions, but it appears that it does not.  

    Is the CC2540EM config correct?  I have also tried the CC2540EM-SBL but no love there either.

    Any help is appreciated!

    EDIT:  a crossover RS232 cable was required.  DOh it's working fine now :)

  • Hi all,

    I am just faced with same problems even 2 years later:

    It seems, that programming procedure to use BTool with CC2540USB dongle is not described anywhere.

    Pls forward this to responsible colleagues to add this in BTool description.

    Here a summary for different use case (Oct 2014)

    CC2540USB as BLE PacketSniffer:
    C:\Program Files (x86)\Texas Instruments\SmartRF Tools\Packet Sniffer\bin\general\firmware\sniffer_fw_cc2540_usb.hex

    CC2540USB for BTool :
    C:\Texas Instruments\BLE-CC254x-1.4.0\Accessories\HexFiles\CC2540_USBdongle_HostTestRelease_All.hex

     

  • i use windows 10. that driver didnt installed what i do help me. my problem is btool
    [2] : <Warning> - 05:06:05.446
    GAP Device Initialization Timeout.
    Device May Not Function Properly.
    that error
  • I am seeing the same problem. Trying to get BTool working with SMARTRF05EB using serial to USB connection> USB driver was updated and and firmware flash up to date.
    I get error.

    The report is as follows with error at end:

    [1] : <Info> - 08:23:58.622

    Port opened at 4/12/2016 8:23:58 PM

    --------------------------------------------------------------------

    [2] : <Tx> - 08:23:59.028

    -Type : 0x01 (Command)

    -OpCode : 0xFE00 (GAP_DeviceInit)

    -Data Length : 0x26 (38) byte(s)

    ProfileRole : 0x08 (8) (Central)

    MaxScanRsps : 0x05 (5)

    IRK : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

    CSRK : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

    SignCounter : 0x00000001 (1)

    Dump(Tx):

    0000:01 00 FE 26 08 05 00 00 00 00 00 00 00 00 00 00 ...&............

    0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

    0020:00 00 00 00 00 00 01 00 00 00 ..........

    --------------------------------------------------------------------

    [3] : <Warning> - 08:24:09.060

    GAP Device Initialization Timeout

    Device May Not Function Properly

    --------------------------------------------------------------------

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    I looked at some of the threads in E2E and the solution for the one I seen was to update the USB_cdc_driver. When doing so, message came back that I have the latest version.

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    My set up is

    usb to SMARTFR05 and powered up

    RS232 serial cable connected to SMARTFR05 and USB to PC.

    Tryed with RS232 switch enabled and disabled with same results.

    On BTool as per document

    PortCom3 –USB-Serial CH340

    Baud 57600

    Flow None (doc says CTS/RTS but PC port does not have that option)

    Parity None

    Stop Bits One

    Data Bits 8

    Device Manager on PC sees the usb-serial connection, error free

    Same as above (no Flow CTS/RTS on PC)

    Also, when looking to see if SMARTFR05EB firmware was latest, it was.



    Note:No Dongle involved in set up.



    What are some other things to look at to eliminate BTool error?

    Thanks