Commit Graph

7 Commits

Author SHA1 Message Date
glennrub 4584ef4ace Support address types (#18)
* nrf5/modules/ubluepy: Adding new enumeration of address types.

* nrf5/modules/ubluepy: Adding constants that can be used from micropython for public and random static address types.

* nrf5/modules/ubluepy: Adding support for optionally setting address type in Peripheral.connect(). Public address is used as default. Address types can be retrieved from 'constants'. Either constants.ADDR_TYPE_PUBLIC or constants.ADDR_TYPE_RANDOM_STATIC.

* nrf5/modules/ubluepy: Register central GAP event handler before issuing connect to a peripheral. Has to be done before connect() function as a connected event will be propergated upon successfull connection. The handler will set the connection handle which gets connect function out of the busy loop waiting for connection to succeed.

* nrf5/modules/ubluepy: Removing duplicate setting of GAP event handler in connect().
2017-05-13 16:12:14 +02:00
Glenn Ruben Bakke 54656044f7 nrf5: Syncing code with upstream master and converting all module and method tables to use MP_ROM macros. Also adding explicit casting of local dicts to (mp_obj_dict_t*). 2017-05-09 22:54:58 +02:00
Glenn Ruben Bakke bb196a2b09 nrf5/modules/ubluepy: Adding ad_types constants in new object. Linking in ad_types object into the ubluepy.constants local dict. 2017-04-01 22:37:39 +02:00
Glenn Ruben Bakke 4efedb67b6 nrf5/modules: Enable ubluepy constants for CONNECT and DISCONNECT for other bluetooth stacks than s132. 2017-03-02 22:43:06 +01:00
Glenn Ruben Bakke 45144ee8a8 nrf5/modules: Adding constant for CCCD uuid in ubluepy constants dict. 2017-02-18 23:11:12 +01:00
Glenn Ruben Bakke f5324060cc nrf5/modules: Correcting event id numbers for connect and disconnect event in ubluepy_constants.py 2017-02-18 13:07:00 +01:00
Glenn Ruben Bakke af2f32ed6a nrf5/modules: Adding constants class to ubluepy which will contain easy access to common bluetooth le numbers and definitions for the bluetooth stack. 2017-02-18 00:11:10 +01:00