Hi Riccardo
We've considered creating a plug-in for the Bluetooth Develop Studio, but didn't work on that.
Aside from the fact that does not support OS X or Linux, I think that the plug-in architecture is too limited to be really useful. The plug-ins allow to export a set of Services into a native format.
However, at least with BTstack's GATT files, you would need to modify the exported file a bit, e.g. to define which Characteristics are dynamic (provided by the app) or const (provided as part of the GATT DB).
When you make these changes, and then go back to the Bluetooth Developer Studio and make changes there, you're changes to the BTstack .gatt file would be gone.
That's a general problem with code generators.
However... since the main use of Bluetooth Developer Studio could be to generate an initial .gatt file for BTstack applications, we've created a command line tool for that: tool/convert_gatt_service.py
If you run it without arguments, it fetches the list of official profiles from the Bluetooth SIG page:
...
$ tool/convert_gatt_service.py
Specification Type | Specification Name | UUID
-------------------------------------------------------+-------------------------------+-----------
org.bluetooth.service.alert_notification | Alert Notification Service | 0x1811
org.bluetooth.service.automation_io | Automation IO | 0x1815
org.bluetooth.service.battery_service | Battery Service | 0x180F
org.bluetooth.service.blood_pressure | Blood Pressure | 0x1810
org.bluetooth.service.body_composition | Body Composition | 0x181B
org.bluetooth.service.bond_management | Bond Management | 0x181E
org.bluetooth.service.continuous_glucose_monitoring | Continuous Glucose Monitoring | 0x181F
org.bluetooth.service.current_time | Current Time Service | 0x1805
org.bluetooth.service.cycling_power | Cycling Power | 0x1818
org.bluetooth.service.cycling_speed_and_cadence | Cycling Speed and Cadence | 0x1816
org.bluetooth.service.device_information | Device Information | 0x180A
org.bluetooth.service.environmental_sensing | Environmental Sensing | 0x181A
org.bluetooth.service.fitness_machine | Fitness Machine | 0x1826
org.bluetooth.service.generic_access | Generic Access | 0x1800
org.bluetooth.service.generic_attribute | Generic Attribute | 0x1801
org.bluetooth.service.glucose | Glucose | 0x1808
org.bluetooth.service.http_proxy | HTTP Proxy | 0x1823
org.bluetooth.service.health_thermometer | Health Thermometer | 0x1809
org.bluetooth.service.heart_rate | Heart Rate | 0x180D
org.bluetooth.service.human_interface_device | Human Interface Device | 0x1812
org.bluetooth.service.immediate_alert | Immediate Alert | 0x1802
org.bluetooth.service.indoor_positioning | Indoor Positioning | 0x1821
org.bluetooth.service.internet_protocol_support | Internet Protocol Support | 0x1820
org.bluetooth.service.link_loss | Link Loss | 0x1803
org.bluetooth.service.location_and_navigation | Location and Navigation | 0x1819
org.bluetooth.service.next_dst_change | Next DST Change Service | 0x1807
org.bluetooth.service.object_transfer | Object Transfer | 0x1825
org.bluetooth.service.phone_alert_status | Phone Alert Status Service | 0x180E
org.bluetooth.service.pulse_oximeter | Pulse Oximeter | 0x1822
org.bluetooth.service.reference_time_update | Reference Time Update Service | 0x1806
org.bluetooth.service.running_speed_and_cadence | Running Speed and Cadence | 0x1814
org.bluetooth.service.scan_parameters | Scan Parameters | 0x1813
org.bluetooth.service.transport_discovery | Transport Discovery | 0x1824
org.bluetooth.service.tx_power | Tx Power | 0x1804
org.bluetooth.service.user_data | User Data | 0x181C
org.bluetooth.service.weight_scale | Weight Scale | 0x181D
To convert a service into a .gatt file template, please call the script again with the requested Specification Type and the output file name
Usage: tool/convert_gatt_service.py SPECIFICATION_TYPE [service_name.gatt]
....
Now, you can ask it to fetch a particular service
...
$ tool/convert_gatt_service.py org.bluetooth.service.indoor_positioning
Service Indoor Positioning
- Characteristic Indoor Positioning Configuration - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite']
- Characteristic Latitude - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite', 'Broadcast']
-- Descriptor Server Characteristic Configuration
- Characteristic Longitude - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite', 'Broadcast']
-- Descriptor Server Characteristic Configuration
- Characteristic Local North Coordinate - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite', 'Broadcast']
-- Descriptor Server Characteristic Configuration
- Characteristic Local East Coordinate - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite', 'Broadcast']
-- Descriptor Server Characteristic Configuration
- Characteristic Floor Number - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite', 'Broadcast']
-- Descriptor Server Characteristic Configuration
- Characteristic Altitude - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite', 'Broadcast']
-- Descriptor Server Characteristic Configuration
- Characteristic Uncertainty - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite', 'Broadcast']
-- Descriptor Server Characteristic Configuration
- Characteristic Location Name - properties ['Read', 'Write', 'Write_Without_Response', 'ReliableWrite', 'Broadcast']
-- Descriptor Server Characteristic Configuration
Service successfully created org.bluetooth.service.indoor_positioning.gatt
Please check for TODOs in the .gatt file
..
Now, you've got a starting point for your app in org.bluetooth.service.indoor_positioning.gatt
..
// Specification Type org.bluetooth.service.indoor_positioning
// Indoor Positioning 1821
PRIMARY_SERVICE, ORG_BLUETOOTH_SERVICE_INDOOR_POSITIONING
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_INDOOR_POSITIONING_CONFIGURATION, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE,
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_LATITUDE, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE | BROADCAST,
SERVER_CHARACTERISTIC_CONFIGURATION, READ | WRITE,
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_LONGITUDE, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE | BROADCAST,
SERVER_CHARACTERISTIC_CONFIGURATION, READ | WRITE,
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_LOCAL_NORTH_COORDINATE, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE | BROADCAST,
SERVER_CHARACTERISTIC_CONFIGURATION, READ | WRITE,
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_LOCAL_EAST_COORDINATE, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE | BROADCAST,
SERVER_CHARACTERISTIC_CONFIGURATION, READ | WRITE,
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_FLOOR_NUMBER, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE | BROADCAST,
SERVER_CHARACTERISTIC_CONFIGURATION, READ | WRITE,
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_ALTITUDE, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE | BROADCAST,
SERVER_CHARACTERISTIC_CONFIGURATION, READ | WRITE,
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_UNCERTAINTY, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE | BROADCAST,
SERVER_CHARACTERISTIC_CONFIGURATION, READ | WRITE,
CHARACTERISTIC, ORG_BLUETOOTH_CHARACTERISTIC_LOCATION_NAME, DYNAMIC | READ | WRITE | WRITE_WITHOUT_RESPONSE | RELIABLEWRITE | BROADCAST,
SERVER_CHARACTERISTIC_CONFIGURATION, READ | WRITE,
Best
Matthias