Hi Kevin, On Sun, Jul 17, 2016 at 03:32:18PM +0200, Kevin Townsend wrote: > Are there any examples of how to setup a Scan Response while > advertising? Apple, for example, recommends putting the Local Name and > TX Power in the scan response to free up space. See section 3.4 of > https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf
None of the example apps configure the scan response data (we should change this). It is relatively simple to configure response data: call ble_gap_adv_rsp_set_fields() (http://mynewt.apache.org/develop/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_fields/). This function is more or less identical to ble_gap_adv_set_fields(), except it configures response data rather than advertising data. > PS: One other note with reference to the design guidelines from Apple: > many Apple devices are very specific about the timing requirements > (Section 3.5, 3.6, etc.) and devices that don't respect the limits may > not appear even if they are within the core specification limits. It > might be worth adding a section to the documentation on controlling the > key timing values (advertising interval, connection interval, etc.). > We're just looking into some of the details now that we have a basic app > running with DIS and Nordic UART, and I'm happy to contribute some > documentation in markdown as we track these details down, but it might > be worth considering having something easy to use in the core API to > control the various timing values in one central location. Is there a particular API change that you are thinking of? You're right about there being are a lot of timing settings, and anything that makes the API simpler would be an improvement. Just for reference for other readers, here is what the advertise API looks like today (comments removed for brevity; see referenced URL for details): http://mynewt.apache.org/develop/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_start/ int ble_gap_adv_start( uint8_t own_addr_type, uint8_t peer_addr_type, const uint8_t *peer_addr, int32_t duration_ms, const struct ble_gap_adv_params *adv_params, ble_gap_event_fn *cb, void *cb_arg ) http://mynewt.apache.org/develop/network/ble/ble_hs/ble_gap/definitions/ble_gap_defs/ struct ble_gap_adv_params { /*** Mandatory fields. */ uint8_t conn_mode; uint8_t disc_mode; /*** Optional fields; assign 0 to make the stack calculate them. */ uint16_t itvl_min; uint16_t itvl_max; uint8_t channel_map; uint8_t filter_policy; uint8_t high_duty_cycle:1; }; Thanks, Chris