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.

Invalid Parameter

Other Parts Discussed in Thread: CC2540

Hi,

I followed CC2540 Mini DK Users Guide "4.3 Using the Simple GATT Profile" to read a characteristic value by UUID or handle. With BTool, the Value box shown nothing and the Status box shown "Invalid Parameter". The link between the USB dongle and the keyfob was established. The Slave BDA was 78:C5:E5:6C:09:64. For the Sub-Procedure of Read Characteristic Value / Descritor, the Handle was set to 0x0011. For Read Using Characteristic UUID, Characteristic UUID was set to F1:FF. I am using CC2540_USBdongle_HostTestRelease_All.hex for the dongle and CC2540_keyfob_SimpleBLEPeripheral.hex for the keyfob. Did I miss anything?

Thanks,

John

Reading a Characteristic Value by Handle

  • Hi John,

    I believe the CC2540 Mini DK Users Guide might be a bit outdated. With BLEv1.2, the Device Information Service got an additional characteristic which created an offset on the handle enumeration for the simpleGATT profile. 

    If you perform a "Discover characteristic by UUID" with F1:FF you will get a response indicating the handle which the characteristic has been given (I think it's 0x0025).

    Best Regards

  • Is there any document explained the hex files, the LED status, the buttons, and error messages? Would anybody help PLEASE? 

  • Hi John,

    You seem a bit frustrated.

    The Software Developers Guide do cover these topics (assuming you are using SimpleBLEPeripheral software). It can be a pain in the a** to get started on something new as Bluetooth low energy, but it'll get a lot easier once you've gone through some of basic stuff. 

    If you have specific questions, you'll get them answered on this forum but please be a bit more specific. Have a look at out wiki (www.ti.com/ble-wiki) for some tutorials and sample applications.

    Take a deep breath and we'll sort it out.

    PS. We are in the process of updating all our documents.

    Best Regards

  • Hi Nick,

    Actually I tried everything and got "Invalid parameter" for all the tests including Discover Characteristic by UUID with F1:FF and Read Characteristic Value with 0x0025 and 0x0028. Am I using the right hex files for the dongle and the keyfob? Am I missing something?

    Thanks,

    John 

  • Hi Nick,

    Before studying the Developers Guide, I need to know what I get including the functions of the buttons and the LEDs, and make sure the DK is working properly, as well as the descriptions of the error messages. The Developers Guide doesn't explain the basic information. Could you give me more support?

    John

  • "Invalid Parameter" shown in the Status box on the Read/Write tab of the BTool dialog usually means that you are not successfully connected. Check that you have successfully discovered and then established a connection with the device. You should see it appear in the tree-view on the left of the dialog. When it does, that same tree-view will show the connection handle. On the Read/Write tab the Connection Handle box in the top right should have the same number. It defaults to 0x0000 but if you have been connecting and disconnecting a lot it is easy to end up with your established connection having a different handle, e.g. 0x0001.

    The connection handle thing can also be a source of frustration when trying to terminate a link. On the Discover/Connect tab the Terminate button attempts to terminate the link with the connection handle shown in the box to its left. Check in the tree-view for the handle of the connection that you want to terminate. It's usually 0x0000 but can sometimes be different if you have been connecting and disconnecting rapidly, or connecting to multiple devices.

  • Hi Matthew,

    Thanks for your reply. You are right, the connection was not established successfully. The Connection Info didn't show the handle 0x0000. After I pulled out the USB dongle and the keyfob battery and reinserted them, everything was fine. Now all the Characteristic Read and Write operations are working. Thanks for everybody's help!

    Regards,

    John

  • Hi, did you solve your problem yet? When I tried to read or write using bTool first time, I met the same problem. But finally, I found there is problem with the handle value. For example, if I want to read handle0025, actually i should read 0x0028, as so forth.