• just in the same file, before you declare the class.

    or, i suppose, it would be cleaner to define inside __init__, as self.CHPROPS , then refer to it as such in inside did_discover_characteristics.

    The purpose of that is to give a more meaningful display of characateristic properties -- but you could always just print c.properties, and figure out the bitmask yourself.

  • Oh my god! You're the MAN!

    I did not know that scene module would handle that, I'm gonna read more about that module and all its capabilities!

    A huge thanks Mickael, I am now following you in case I ever need some help!

    Take care!

  • i think what your doing is possible but the way you're doing it isn't. for one apple and the Xbox remote have there Bluetooth locked down.

    but if you use sockets and a pc to forward it instead it might work. you will need a pc and a library to spoof the Xbox remote but it, in theory, should work

  • This is the entire code. Thanks for the help.

    import cb import ui class MyCentralManagerDelegateView (ui.View): def __init__(self): self.peripheral = None self.charactetistic= None self.b=ui.Button(title='button') self.add_subview(self.b) self.b.action=self.a self.frame=(0,0,320,570) def did_discover_peripheral(self, p): if p.name == 'Bluno' and not self.peripheral: print ('Discovered ')+ p.name self.peripheral = p cb.connect_peripheral(self.peripheral) def did_connect_peripheral(self, p): print ('Connected Peripheral ') + p.name print ('Looking for Service FFE0') p.discover_services() def did_discover_services(self, p, error): for s in p.services: if s.uuid == 'DFB0': print ('Found Service ') + s.uuid print ('Looking for Characteristic FFE1') p.discover_characteristics(s) def did_discover_characteristics(self, s, error): for c in s.characteristics: if c.uuid == 'DFB1': print ('Found Characteristic') + c.uuid self.characteristic=c print ('Writing H') def a(self,sender): c=self.characteristic self.peripheral.write_characteristic_value(c, 'H', False) def close(self): cb.reset() v=MyCentralManagerDelegateView() cb.set_central_delegate( v) print ('Looking for HM-10-BLE module') cb.scan_for_peripherals() v.present('sheet')```
  • @ccc , did you buy your TI Sensor Tag in Europe or from the USA? I want to buy a few of them.

Internal error.

Oops! Looks like something went wrong!