Author Topic: Simblee serviceUUID  (Read 2018 times)

Cman

  • RFduino Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Simblee serviceUUID
« on: February 13, 2016, 08:01:30 AM »
I am trying to convert rfduino apps to work with Simblee but I can't figure out how to make the iOS apps discover Simblee.  I change the 2220 in the code  to fe84 and even tried fe85 but no luck?  Has anyone done this?

Thank you in advance.

Cman

  • RFduino Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Simblee serviceUUID
« Reply #1 on: February 13, 2016, 09:15:10 AM »
Ok I was able to fix the discovery but now it will not allow me to write to it.

This does not work and throws an exception.
Code: [Select]

[peripheral writeValue:data forCharacteristic:send_characteristic type:CBCharacteristicWriteWithoutResponse];


Very frustrating!!!
« Last Edit: February 13, 2016, 09:38:09 AM by Cman »

Cman

  • RFduino Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Simblee serviceUUID
« Reply #2 on: February 16, 2016, 11:37:12 AM »
Still no luck.  No Characteristics are found when I set service to "fe84"  When connecting I get

Code: [Select]
*** Assertion failure in -[CBPeripheral writeValue:forCharacteristic:type:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreBluetooth/CoreBluetooth-327.1/CBPeripheral.m:386


When I send my first byte.

Cman

  • RFduino Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Simblee serviceUUID
« Reply #3 on: February 16, 2016, 11:56:24 AM »
Finally figured it out. Have to use 128 bit rather than 16 bit

See below
Code: [Select]
    service_uuid = [CBUUID UUIDWithString:(customUUID ? customUUID : @"fe84")];
    receive_uuid = [CBUUID UUIDWithString:(customUUID ? customUUID : @"2d30c082-f39f-4ce6-923f-3484ea480596")];
    if (customUUID)
        incrementUuid16(receive_uuid, 1);
    send_uuid = [CBUUID UUIDWithString:(customUUID ? customUUID : @"2d30c083-f39f-4ce6-923f-3484ea480596")];
    if (customUUID)
        incrementUuid16(send_uuid, 2);
    disconnect_uuid = [CBUUID UUIDWithString:(customUUID ? customUUID : @"2d30c084-f39f-4ce6-923f-3484ea480596")];
    if (customUUID)
        incrementUuid16(disconnect_uuid, 3);
    peripheral.delegate = self;
   
    [peripheral discoverServices:[NSArray arrayWithObject:service_uuid]];



Alternative is to set
Code: [Select]
SimbleeBLE.customUUID = "2220";

In your Arduino sketch

 

anything