The Thunderboard Forum is no longer active. If you would like to post a question regarding Thunderboard Kits, please use the Bluetooth Forum.

This discussion and its replies are closed

Although I can connect the Thunderboard to either an iOS or Android device they never receive any of the keycodes I send. Here is the code to send the character.

	hidTempBuffer[2] = 0x08;
    gecko_cmd_gatt_server_send_characteristic_notification(0xFF, gattdb_report, length, hidTempBuffer);
    hidTempBuffer[2] = 0;
    gecko_cmd_gatt_server_send_characteristic_notification(0xFF, gattdb_report, length, hidTempBuffer);

Here is the gatt.xml file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--Custom BLE GATT-->
<gatt gatt_caching="true" generic_attribute_service="true" header="gatt_db.h" name="Custom BLE GATT" out="gatt_db.c" prefix="gattdb_">
  
  <!--Device Information-->
  <service advertise="false" id="device_information" name="Device Information" requirement="mandatory" sourceId="org.bluetooth.service.device_information" type="primary" uuid="180A">
    <informativeText>Abstract: The Device Information Service exposes manufacturer and/or vendor information about a device. Summary: This service exposes manufacturer information about a device. The Device Information Service is instantiated as a Primary Service. Only one instance of the Device Information Service is exposed on a device. </informativeText>
    
    <!--PnP ID-->
    <characteristic id="pnp_id" name="PnP ID" sourceId="org.bluetooth.characteristic.pnp_id" uuid="2A50">
      <informativeText>Custom characteristic</informativeText>
      <value length="7" type="hex" variable_length="false">0x014700ffffffff</value>
      <properties const="true" const_requirement="optional" indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="excluded" read="true" read_requirement="mandatory" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="false" write_no_response_requirement="excluded" write_requirement="excluded"/>
    </characteristic>
    
    <!--Manufacturer Name String-->
    <characteristic id="manufacturing_name_string" name="Manufacturer Name String" sourceId="org.bluetooth.characteristic.manufacturer_name_string" uuid="2A29">
      <informativeText>Abstract: The value of this characteristic is a UTF-8 string representing the name of the manufacturer of the device. </informativeText>
      <value length="3" type="utf-8" variable_length="false">AST</value>
      <properties indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="excluded" read="true" read_requirement="mandatory" reliable_write="false" reliable_write_requirement="excluded" write="false" write_requirement="excluded"/>
    </characteristic>
    
    <!--Model Number String-->
    <characteristic id="model_number_string" name="Model Number String" sourceId="org.bluetooth.characteristic.model_number_string" uuid="2A24">
      <informativeText>Abstract: The value of this characteristic is a UTF-8 string representing the model number assigned by the device vendor. </informativeText>
      <value length="1" type="utf-8" variable_length="false">1</value>
      <properties indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="excluded" read="true" read_requirement="mandatory" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="false" write_no_response_requirement="excluded" write_requirement="excluded"/>
    </characteristic>
    
    <!--System ID-->
    <characteristic id="system_id" name="System ID" sourceId="org.bluetooth.characteristic.system_id" uuid="2A23">
      <informativeText>Abstract: The SYSTEM ID characteristic consists of a structure with two fields. The first field are the LSOs and the second field contains the MSOs.       This is a 64-bit structure which consists of a 40-bit manufacturer-defined identifier concatenated with a 24 bit unique Organizationally Unique Identifier (OUI). The OUI is issued by the IEEE Registration Authority (http://standards.ieee.org/regauth/index.html) and is required to be used in accordance with IEEE Standard 802-2001.6 while the least significant 40 bits are manufacturer defined.       If System ID generated based on a Bluetooth Device Address, it is required to be done as follows. System ID and the Bluetooth Device Address have a very similar structure: a Bluetooth Device Address is 48 bits in length and consists of a 24 bit Company Assigned Identifier (manufacturer defined identifier) concatenated with a 24 bit Company Identifier (OUI). In order to encapsulate a Bluetooth Device Address as System ID, the Company Identifier is concatenated with 0xFFFE followed by the Company Assigned Identifier of the Bluetooth Address. For more guidelines related to EUI-64, refer to http://standards.ieee.org/develop/regauth/tut/eui64.pdf. Examples: If the system ID is based of a Bluetooth Device Address with a Company Identifier (OUI) is 0x123456 and the Company Assigned Identifier is 0x9ABCDE, then the System Identifier is required to be 0x123456FFFE9ABCDE. </informativeText>
      <value length="6" type="hex" variable_length="false">000102030405</value>
      <properties const="true" const_requirement="optional" read="true" read_requirement="optional"/>
    </characteristic>
  </service>
  
  <!--Generic Access-->
  <service advertise="true" name="Generic Access" requirement="mandatory" sourceId="org.bluetooth.service.generic_access" type="primary" uuid="1800">
    <informativeText>Abstract: The generic_access service contains generic information about the device. All available Characteristics are readonly. </informativeText>
    
    <!--Device Name-->
    <characteristic id="device_name" name="Device Name" sourceId="org.bluetooth.characteristic.gap.device_name" uuid="2A00">
      <informativeText/>
      <value length="6" type="utf-8" variable_length="false">gestr4</value>
      <properties read="true" read_requirement="optional" write="true" write_requirement="optional"/>
    </characteristic>
    
    <!--Appearance-->
    <characteristic name="Appearance" sourceId="org.bluetooth.characteristic.gap.appearance" uuid="2A01">
      <informativeText>Abstract: The external appearance of this device. The values are composed of a category (10-bits) and sub-categories (6-bits). </informativeText>
      <value length="2" type="hex" variable_length="false">0000</value>
      <properties const="true" const_requirement="optional" read="true" read_requirement="optional"/>
    </characteristic>
  </service>
  
  <!--Silicon Labs OTA-->
  <service advertise="false" name="Silicon Labs OTA" requirement="mandatory" sourceId="com.silabs.service.ota" type="primary" uuid="1D14D6EE-FD63-4FA1-BFA4-8F47B42119F0">
    <informativeText>Abstract: The Silicon Labs OTA Service enables over-the-air firmware update of the device. </informativeText>
    
    <!--Silicon Labs OTA Control-->
    <characteristic id="ota_control" name="Silicon Labs OTA Control" sourceId="com.silabs.characteristic.ota_control" uuid="F7BF3564-FB6D-4E53-88A4-5E37E0326063">
      <informativeText>Abstract: Silicon Labs OTA Control. </informativeText>
      <value length="1" type="user" variable_length="false"/>
      <properties write="true" write_requirement="optional"/>
    </characteristic>
  </service>
  
  <!--Battery Service-->
  <service advertise="false" id="battery_service" name="Battery Service" requirement="mandatory" sourceId="org.bluetooth.service.battery_service" type="primary" uuid="180F">
    <informativeText>Abstract:  The Battery Service exposes the state of a battery within a device.  Summary:  The Battery Service exposes the Battery State and Battery Level of a single battery or set of batteries in a device.  </informativeText>
    
    <!--Battery Level-->
    <characteristic id="battery_level" name="Battery Level" sourceId="org.bluetooth.characteristic.battery_level" uuid="2A19">
      <informativeText>Abstract:  The current charge level of a battery. 100% represents fully charged while 0% represents fully discharged.  </informativeText>
      <value length="1" type="hex" variable_length="false"/>
      <properties indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="optional" read="true" read_requirement="mandatory" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="false" write_no_response_requirement="excluded" write_requirement="excluded"/>
      
      <!--Characteristic Presentation Format-->
      <descriptor id="characteristic_presentation_format" name="Characteristic Presentation Format" sourceId="org.bluetooth.descriptor.gatt.characteristic_presentation_format" uuid="2904">
        <properties read="true" read_requirement="mandatory" write="false" write_requirement="excluded"/>
        <value length="7" type="hex" variable_length="false"/>
      </descriptor>
      
      <!--Client Characteristic Configuration-->
      <descriptor id="client_characteristic_configuration" name="Client Characteristic Configuration" sourceId="org.bluetooth.descriptor.gatt.client_characteristic_configuration" uuid="2902">
        <properties read="true" read_requirement="mandatory" write="true" write_requirement="mandatory"/>
        <value length="2" type="hex" variable_length="false"/>
      </descriptor>
    </characteristic>
  </service>
  
  <!--Scan Parameters-->
  <service advertise="false" id="scan_parameters" name="Scan Parameters" requirement="mandatory" sourceId="org.bluetooth.service.scan_parameters" type="primary" uuid="1813">
    <informativeText>Abstract:  This service enables a GATT Client to store the LE scan parameters it is using on a GATT Server device so that the GATT Server can  utilize the information to adjust behavior to optimize power consumption and/or reconnection latency  Summary:  The Scan Parameters Service enables a GATT Server device to expose a characteristic for the GATT Client to write its scan interval and scan window on the GATT Server device.  </informativeText>
    
    <!--Scan Interval Window-->
    <characteristic id="scan_interval_window" name="Scan Interval Window" sourceId="org.bluetooth.characteristic.scan_interval_window" uuid="2A4F">
      <informativeText>Abstract:  The Scan Interval Window characteristic is used to store the scan parameters of the GATT Client. Included in this characteristic are the Scan Interval and Scan Window of the GATT Client device.  Summary:  The Scan Interval Window characteristic is used to store the scan parameters of the GATT Client.  The GATT Server can use these values to optimize its own advertisement rate and to minimize      the rate of its own advertisements while also minimizing the latency of reconnections.  </informativeText>
      <value length="4" type="hex" variable_length="false"/>
      <properties indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="excluded" read="false" read_requirement="excluded" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="true" write_no_response_requirement="mandatory" write_requirement="excluded"/>
    </characteristic>
    
    <!--Scan Refresh-->
    <characteristic id="scan_refresh" name="Scan Refresh" sourceId="org.bluetooth.characteristic.scan_refresh" uuid="2A31">
      <informativeText>Abstract:  The Scan Refresh characteristic is used to notify the Client that the Server requires the Scan Interval Window characteristic to be written with the latest values upon notification.  </informativeText>
      <value length="1" type="hex" variable_length="false"/>
      <properties indicate="false" indicate_requirement="excluded" notify="true" notify_requirement="mandatory" read="false" read_requirement="excluded" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="false" write_no_response_requirement="excluded" write_requirement="excluded"/>
      
      <!--Client Characteristic Configuration-->
      <descriptor id="client_characteristic_configuration_3" name="Client Characteristic Configuration" sourceId="org.bluetooth.descriptor.gatt.client_characteristic_configuration" uuid="2902">
        <properties read="true" read_requirement="mandatory" write="true" write_requirement="mandatory"/>
        <value length="2" type="hex" variable_length="false"/>
      </descriptor>
    </characteristic>
  </service>
  
  <!--Human Interface Device-->
  <service advertise="true" id="human_interface_device" name="Human Interface Device" requirement="mandatory" sourceId="org.bluetooth.service.human_interface_device" type="primary" uuid="1812">
    <informativeText>Abstract:  This service exposes the HID reports and other HID data intended for HID Hosts and HID Devices.  Summary:  The HID Service exposes characteristics required for a HID Device to transfer HID report descriptors and reports to a HID Host. This also exposes the characteristics for a HID Host to write to a Device. The Human Interface Device Service is instantiated as a Primary Service.  </informativeText>
    <include id="battery_service"/>
    
    <!--Protocol Mode-->
    <characteristic id="protocol_mode" name="Protocol Mode" sourceId="org.bluetooth.characteristic.protocol_mode" uuid="2A4E">
      <informativeText>Summary:  The Protocol Mode characteristic is used to expose the current protocol mode of the HID Service with which it is associated, or to set the desired protocol mode of the HID Service.  </informativeText>
      <value length="1" type="hex" variable_length="false">1</value>
      <properties indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="excluded" read="true" read_requirement="mandatory" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="true" write_no_response_requirement="mandatory" write_requirement="excluded"/>
    </characteristic>
    
    <!--Report-->
    <characteristic id="report" name="Report" sourceId="org.bluetooth.characteristic.report" uuid="2A4D">
      <informativeText>Abstract:  The Report characteristic is used to exchange data between a HID Device and a HID Host.  Summary:  The Report characteristic value contains Input Report, Output Report or Feature Report data to be transferred between the HID Device and HID Host.  </informativeText>
      <value length="8" type="hex" variable_length="false">0x0000000000000000</value>
      <properties const="true" const_requirement="optional" indicate="false" indicate_requirement="excluded" notify="true" notify_requirement="mandatory" read="true" read_requirement="mandatory" reliable_write="false" reliable_write_requirement="excluded" write="true" write_no_response="false" write_no_response_requirement="excluded" write_requirement="optional"/>
      
      <!--Client Characteristic Configuration-->
      <descriptor id="client_characteristic_configuration" name="Client Characteristic Configuration" sourceId="org.bluetooth.descriptor.gatt.client_characteristic_configuration" uuid="2902">
        <properties encrypted_read="true" encrypted_read_requirement="mandatory" encrypted_write="true" encrypted_write_requirement="mandatory"/>
        <value length="2" type="hex" variable_length="false"/>
      </descriptor>
      
      <!--Report Reference-->
      <descriptor id="report_reference" name="Report Reference" sourceId="org.bluetooth.descriptor.report_reference" uuid="2908">
        <properties const="true" const_requirement="optional" encrypted_read="true" encrypted_read_requirement="mandatory" read="true" read_requirement="optional" write="false" write_requirement="excluded"/>
        <value length="11" type="hex" variable_length="true">0001</value>
      </descriptor>
    </characteristic>
    
    <!--Report Map-->
    <characteristic id="report_map" name="Report Map" sourceId="org.bluetooth.characteristic.report_map" uuid="2A4B">
      <informativeText>Summary:  The Report Map characteristic is used to define formatting information for Input Report, Output Report, and Feature Report data transferred between a HID Device and HID Host, information on how this data can be used, and other information regarding physical aspects of the device (i.e. that the device functions as a keyboard, for example, or has multiple functions such as a keyboard and volume controls).       Only a single instance of this characteristic exists as part of a HID Service.  </informativeText>
      <value length="45" type="hex" variable_length="false">05010906A101050719E029E71500250175019508810295017508810195057501050819012905910295017503910195067508150025650507190029658100C0</value>
      <properties encrypted_read="true" encrypted_read_requirement="mandatory" indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="excluded" read="true" read_requirement="mandatory" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="false" write_no_response_requirement="excluded" write_requirement="excluded"/>
      
      <!--External Report Reference-->
      <descriptor id="external_report_reference" name="External Report Reference" sourceId="org.bluetooth.descriptor.external_report_reference" uuid="2907">
        <properties read="true" read_requirement="mandatory" write="false" write_requirement="excluded"/>
        <value length="2" type="hex" variable_length="false"/>
      </descriptor>
    </characteristic>
    
    <!--HID Information-->
    <characteristic id="hid_information" name="HID Information" sourceId="org.bluetooth.characteristic.hid_information" uuid="2A4A">
      <informativeText>Abstract:  The HID Information Characteristic returns the HID attributes when read.  Summary:  The HID Information Characteristic contains the HID attributes.  The value of this Characteristic is static and can be cached for the lifetime of the bond between the HID device and the HID host.  </informativeText>
      <value length="4" type="hex" variable_length="false">01110002</value>
      <properties indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="excluded" read="true" read_requirement="mandatory" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="false" write_no_response_requirement="excluded" write_requirement="excluded"/>
    </characteristic>
    
    <!--HID Control Point-->
    <characteristic id="hid_control_point" name="HID Control Point" sourceId="org.bluetooth.characteristic.hid_control_point" uuid="2A4C">
      <informativeText>Summary:  The HID Control Point characteristic is a control-point attribute that defines the following HID Commands when written:             - Suspend ( Refer to Section 7.4.2, Bluetooth HID Profile Specification 1.0             - Exit Suspend (Refer to Section 7.4.2, Bluetooth HID Profile Specification 1.0  </informativeText>
      <value length="1" type="hex" variable_length="false">00</value>
      <properties indicate="false" indicate_requirement="excluded" notify="false" notify_requirement="excluded" read="false" read_requirement="excluded" reliable_write="false" reliable_write_requirement="excluded" write="false" write_no_response="true" write_no_response_requirement="mandatory" write_requirement="excluded"/>
    </characteristic>
  </service>
</gatt>

What is missing here?

  • Discussion Forums
  • Thunderboard Kits
Unanswered