Hi, I've just created PR https://github.com/apache/mynewt-core/pull/671
This adds host GAP support for all features provided by Extended Advertising: - multiple advertising instances - advertising TX power configuration - alternate PHYs configuration - large advertising data Applications are now able to control multiple advertising instances and configure them separately. btshell application is also extended with support for all new functionalities. I'd like to get some feedback on few design decisions though: - API is more finegrained compared to old - this is to give application a bit more flexibility when dealing with multiple instances - if desired API can be extended with eg ble_gap_ext_adv_start/stop_simple() that would wrap around configuring parameters, address, data and starting into single call - setting advertising data and scan responses takes mbuf instead of raw buffer, this is due to possibly large (currently spec limits this to 1650 bytes) data being set - adv_complete GAP event is extended with new fields that allow to assosiate event with advertising instance and connection handle, since the latter is valid only when connection was created I had to introduce addition error code when instance was terminated due to timeout - intermedient experimental API for setting PHY and TX power is removed - this was bad design in first place as it configured things globaly and not per instance - when extended advertising is enabled, legacy advertising API is non functional - this is something I could possible add wrappers but it seems unlikely that application would like to use both APIs at the same time Documentation for new API is still missing as I'm not sure on what the right way for doing it now (doxygen?). This will be fixed later on. Comments are welcome. -- pozdrawiam Szymon Janc
