SINTEF-9012 / bglib

Java implementation of the BGAPI binary protocol for Bluegiga BLE112 Bluetooth low energy modules.
37 stars 14 forks source link

Not Really Issue but Questions #21

Closed mjs513 closed 8 years ago

mjs513 commented 8 years ago

Just getting started with BLE so please forgive my ignorance here:

I looks like the GUI is set up for service id 0x180A which I think is the batter service. So my question is how do you set up a custom service. What I am interested in is setting it up so I can use the Bluegiga dongle CRP service. Using the Arduino101 example:

BLEService crpService = BLEService("0bd51666e7cb469b8e4d2742f1ba77cc");
// create characteristic
BLECharacteristic txCharacteristic = BLECharacteristic("e7add780b0424876aae1112855353cc1", BLENotify, 20); // == RX on central
BLECharacteristic rxCharacteristic = BLECharacteristic("e7add780b0424876aae1112855353cc1", BLEWriteWithoutResponse, 20); // == TX on central

I think this is where I have to change to the service:

    public static Hashtable<String, String> profiles = new Hashtable<String, String>();
    static {
        profiles.put("0x180A", "");
    }

Thanks Mike

mjs513 commented 8 years ago

Ok Modified the GUI code and got it to interface with the Bluegiga dongle running the cable replacement service.