<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How should I not ask my question?</title><link>/nordic/nordic-blog/b/blog/posts/how-should-i-not-ask-my-question</link><description>You should never ask your question as an answer to another question. Add it as a new question, and link to the question if it’s relevant.
You should never ask your question as a comment to another question, if you aren’t asking for more information </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><item><title>RE: How should I not ask my question?</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-should-i-not-ask-my-question</link><pubDate>Sat, 29 Jun 2019 08:36:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cfb45d0-7fdb-4bc4-b91a-f1875661e864</guid><dc:creator>Abbyon</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hello, I am newbie to nrF52 480 chip, and i am using the beacon code in&amp;nbsp;nRF5_SDK_15.3.0_59ac345 SDK. I tried to add DEVICE NAME but as soon as I added the device name,&amp;nbsp;to the code and compiled, the android app (nrf Beacon)&amp;nbsp;chip stop detecting the beacon from the nrF chip. I have tried reducing the manufacturer data but still behaves the same way. I will appreciate any help to resolve this I have included the sample code. Many thanks[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:0d58fa66-7382-4584-8918-196d93433300:type=text&amp;text=%0D%0A%23include%20%3Cstdbool.h%3E%0D%0A%23include%20%3Cstdint.h%3E%0D%0A%23include%20%22nordic_common.h%22%0D%0A%23include%20%22bsp.h%22%0D%0A%23include%20%22nrf_soc.h%22%0D%0A%23include%20%22nrf_sdh.h%22%0D%0A%23include%20%22nrf_sdh_ble.h%22%0D%0A%23include%20%22ble_advdata.h%22%0D%0A%23include%20%22app_timer.h%22%0D%0A%23include%20%22nrf_pwr_mgmt.h%22%0D%0A%0D%0A%23include%20%22nrf_log.h%22%0D%0A%23include%20%22nrf_log_ctrl.h%22%0D%0A%23include%20%22nrf_log_default_backends.h%22%0D%0A%23define%20DEVICE_NAME%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Nordic_HRM%22%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Name%20of%20device.%20Will%20be%20included%20in%20the%20advertising%20data.%20%2A%2F%0D%0A%0D%0A%0D%0A%0D%0A%23define%20APP_BLE_CONN_CFG_TAG%20%20%20%20%20%20%20%20%20%20%20%201%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20A%20tag%20identifying%20the%20SoftDevice%20BLE%20configuration.%20%2A%2F%0D%0A%0D%0A%23define%20NON_CONNECTABLE_ADV_INTERVAL%20%20%20%20MSEC_TO_UNITS%28100%2C%20UNIT_0_625_MS%29%20%20%2F%2A%2A%3C%20The%20advertising%20interval%20for%20non-connectable%20advertisement%20%28100%20ms%29.%20This%20value%20can%20vary%20between%20100ms%20to%2010.24s%29.%20%2A%2F%0D%0A%0D%0A%23define%20APP_BEACON_INFO_LENGTH%20%20%20%20%20%20%20%20%20%200x17%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Total%20length%20of%20information%20advertised%20by%20the%20Beacon.%20%2A%2F%0D%0A%23define%20APP_ADV_DATA_LENGTH%20%20%20%20%20%20%20%20%20%20%20%20%200x15%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Length%20of%20manufacturer%20specific%20data%20in%20the%20advertisement.%20%2A%2F%0D%0A%23define%20APP_DEVICE_TYPE%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x02%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%200x02%20refers%20to%20Beacon.%20%2A%2F%0D%0A%23define%20APP_MEASURED_RSSI%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200xC3%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20The%20Beacon%27s%20measured%20RSSI%20at%201%20meter%20distance%20in%20dBm.%20%2A%2F%0D%0A%23define%20APP_COMPANY_IDENTIFIER%20%20%20%20%20%20%20%20%20%200x0059%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Company%20identifier%20for%20Nordic%20Semiconductor%20ASA.%20as%20per%20www.bluetooth.org.%20%2A%2F%0D%0A%23define%20APP_MAJOR_VALUE%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x01%2C%200x02%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Major%20value%20used%20to%20identify%20Beacons.%20%2A%2F%0D%0A%23define%20APP_MINOR_VALUE%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x03%2C%200x04%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Minor%20value%20used%20to%20identify%20Beacons.%20%2A%2F%0D%0A%0D%0A%2F%2A%0D%0A%23define%20APP_BEACON_UUID%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x01%2C%200x12%2C%200x23%2C%200x34%2C%20%5C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x45%2C%200x56%2C%200x67%2C%200x78%2C%20%5C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x89%2C%200x9a%2C%200xab%2C%200xbc%2C%20%5C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200xcd%2C%200xde%2C%200xef%2C%200xf0%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Proprietary%20UUID%20for%20Beacon.%20%2A%2F%0D%0A%0D%0A%0D%0A%0D%0A%23define%20DEAD_BEEF%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200xDEADBEEF%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Value%20used%20as%20error%20code%20on%20stack%20dump%2C%20can%20be%20used%20to%20identify%20stack%20location%20on%20stack%20unwind.%20%2A%2F%0D%0A%0D%0A%23if%20defined%28USE_UICR_FOR_MAJ_MIN_VALUES%29%0D%0A%23define%20MAJ_VAL_OFFSET_IN_BEACON_INFO%20%20%2018%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Position%20of%20the%20MSB%20of%20the%20Major%20Value%20in%20m_beacon_info%20array.%20%2A%2F%0D%0A%23define%20UICR_ADDRESS%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x10001080%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Address%20of%20the%20UICR%20register%20used%20by%20this%20example.%20The%20major%20and%20minor%20versions%20to%20be%20encoded%20into%20the%20advertising%20data%20will%20be%20picked%20up%20from%20this%20location.%20%2A%2F%0D%0A%23endif%0D%0A%0D%0A%2F%2FSTART%20%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Sensor%20Contact%20Detected%20toggle%20interval%20%28ticks%29.%20%2A%2F%0D%0A%0D%0A%23define%20MIN_CONN_INTERVAL%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20MSEC_TO_UNITS%28400%2C%20UNIT_1_25_MS%29%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Minimum%20acceptable%20connection%20interval%20%280.4%20seconds%29.%20%2A%2F%0D%0A%23define%20MAX_CONN_INTERVAL%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20MSEC_TO_UNITS%28650%2C%20UNIT_1_25_MS%29%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Maximum%20acceptable%20connection%20interval%20%280.65%20second%29.%20%2A%2F%0D%0A%23define%20SLAVE_LATENCY%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Slave%20latency.%20%2A%2F%0D%0A%23define%20CONN_SUP_TIMEOUT%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20MSEC_TO_UNITS%284000%2C%20UNIT_10_MS%29%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Connection%20supervisory%20timeout%20%284%20seconds%29.%20%2A%2F%0D%0A%0D%0A%0D%0A%2F%2FSTOP%20%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0Astatic%20ble_gap_adv_params_t%20m_adv_params%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Parameters%20to%20be%20passed%20to%20the%20stack%20when%20starting%20advertising.%20%2A%2F%0D%0Astatic%20uint8_t%20%20%20%20%20%20%20%20%20%20%20%20%20%20m_adv_handle%20%3D%20BLE_GAP_ADV_SET_HANDLE_NOT_SET%3B%20%2F%2A%2A%3C%20Advertising%20handle%20used%20to%20identify%20an%20advertising%20set.%20%2A%2F%0D%0Astatic%20uint8_t%20%20%20%20%20%20%20%20%20%20%20%20%20%20m_enc_advdata%5BBLE_GAP_ADV_SET_DATA_SIZE_MAX%5D%3B%20%20%2F%2A%2A%3C%20Buffer%20for%20storing%20an%20encoded%20advertising%20set.%20%2A%2F%0D%0A%0D%0A%2F%2A%2A%40brief%20Struct%20that%20contains%20pointers%20to%20the%20encoded%20advertising%20data.%20%2A%2F%0D%0Astatic%20ble_gap_adv_data_t%20m_adv_data%20%3D%0D%0A%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20.adv_data%20%3D%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20.p_data%20%3D%20m_enc_advdata%2C%0D%0A%20%20%20%20%20%20%20%20.len%20%20%20%20%3D%20BLE_GAP_ADV_SET_DATA_SIZE_MAX%0D%0A%20%20%20%20%7D%2C%0D%0A%20%20%20%20.scan_rsp_data%20%3D%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20.p_data%20%3D%20NULL%2C%0D%0A%20%20%20%20%20%20%20%20.len%20%20%20%20%3D%200%0D%0A%0D%0A%20%20%20%20%7D%0D%0A%7D%3B%0D%0A%0D%0A%0D%0Astatic%20uint8_t%20m_beacon_info%5BAPP_BEACON_INFO_LENGTH%5D%20%3D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2A%2A%3C%20Information%20advertised%20by%20the%20Beacon.%20%2A%2F%0D%0A%7B%0D%0A%20%20%20%20APP_DEVICE_TYPE%2C%20%20%20%20%20%2F%2F%20Manufacturer%20specific%20information.%20Specifies%20the%20device%20type%20in%20this%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20implementation.%0D%0A%20%20%20%20APP_ADV_DATA_LENGTH%2C%20%2F%2F%20Manufacturer%20specific%20information.%20Specifies%20the%20length%20of%20the%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20manufacturer%20specific%20data%20in%20this%20implementation.%0D%0A%20%20%20%20%2F%2F%20%2F%2FAPP_BEACON_UUID%2C%20%20%20%20%20%2F%2F%20128%20bit%20UUID%20value.%0D%0A%20%20%20%20APP_MAJOR_VALUE%2C%20%20%20%20%20%2F%2F%20Major%20arbitrary%20value%20that%20can%20be%20used%20to%20distinguish%20between%20Beacons.%0D%0A%20%20%20%20APP_MINOR_VALUE%2C%20%20%20%20%20%2F%2F%20Minor%20arbitrary%20value%20that%20can%20be%20used%20to%20distinguish%20between%20Beacons.%0D%0A%20%20%20%20APP_MEASURED_RSSI%20%20%20%20%2F%2F%20Manufacturer%20specific%20information.%20The%20Beacon%27s%20measured%20TX%20power%20in%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20this%20implementation.%0D%0A%7D%3B%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Callback%20function%20for%20asserts%20in%20the%20SoftDevice.%0D%0A%20%2A%0D%0A%20%2A%20%40details%20This%20function%20will%20be%20called%20in%20case%20of%20an%20assert%20in%20the%20SoftDevice.%0D%0A%20%2A%0D%0A%20%2A%20%40warning%20This%20handler%20is%20an%20example%20only%20and%20does%20not%20fit%20a%20final%20product.%20You%20need%20to%20analyze%0D%0A%20%2A%20%20%20%20%20%20%20%20%20%20how%20your%20product%20is%20supposed%20to%20react%20in%20case%20of%20Assert.%0D%0A%20%2A%20%40warning%20On%20assert%20from%20the%20SoftDevice%2C%20the%20system%20can%20only%20recover%20on%20reset.%0D%0A%20%2A%0D%0A%20%2A%20%40param%5Bin%5D%20%20%20line_num%20%20%20Line%20number%20of%20the%20failing%20ASSERT%20call.%0D%0A%20%2A%20%40param%5Bin%5D%20%20%20file_name%20%20File%20name%20of%20the%20failing%20ASSERT%20call.%0D%0A%20%2A%2F%0D%0Avoid%20assert_nrf_callback%28uint16_t%20line_num%2C%20const%20uint8_t%20%2A%20p_file_name%29%0D%0A%7B%0D%0A%20%20%20%20app_error_handler%28DEAD_BEEF%2C%20line_num%2C%20p_file_name%29%3B%0D%0A%7D%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20initializing%20the%20Advertising%20functionality.%0D%0A%20%2A%0D%0A%20%2A%20%40details%20Encodes%20the%20required%20advertising%20data%20and%20passes%20it%20to%20the%20stack.%0D%0A%20%2A%20%20%20%20%20%20%20%20%20%20Also%20builds%20a%20structure%20to%20be%20passed%20to%20the%20stack%20when%20starting%20advertising.%0D%0A%0D%0A%20%2A%2F%0D%0A%0D%0A%0D%0A%20%2F%2FSTART%20HERE%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20the%20GAP%20initialization.%0D%0A%20%2A%0D%0A%20%2A%20%40details%20This%20function%20sets%20up%20all%20the%20necessary%20GAP%20%28Generic%20Access%20Profile%29%20parameters%20of%20the%0D%0A%20%2A%20%20%20%20%20%20%20%20%20%20device%20including%20the%20device%20name%2C%20appearance%2C%20and%20the%20preferred%20connection%20parameters.%0D%0A%20%2A%2F%0D%0Astatic%20void%20gap_params_init%28void%29%0D%0A%7B%0D%0A%20%20%20%20ret_code_t%20%20%20%20%20%20%20%20%20%20%20%20%20%20err_code%3B%0D%0A%20%20%20%20ble_gap_conn_params_t%20%20%20gap_conn_params%3B%0D%0A%20%20%20%20ble_gap_conn_sec_mode_t%20sec_mode%3B%0D%0A%0D%0A%20%20%20%20BLE_GAP_CONN_SEC_MODE_SET_OPEN%28%26sec_mode%29%3B%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20sd_ble_gap_device_name_set%28%26sec_mode%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28const%20uint8_t%20%2A%29DEVICE_NAME%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20strlen%28DEVICE_NAME%29%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20sd_ble_gap_appearance_set%28BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%0D%0A%20%20%20%20memset%28%26gap_conn_params%2C%200%2C%20sizeof%28gap_conn_params%29%29%3B%0D%0A%0D%0A%20%20%20%20gap_conn_params.min_conn_interval%20%3D%20MIN_CONN_INTERVAL%3B%0D%0A%20%20%20%20gap_conn_params.max_conn_interval%20%3D%20MAX_CONN_INTERVAL%3B%0D%0A%20%20%20%20gap_conn_params.slave_latency%20%20%20%20%20%3D%20SLAVE_LATENCY%3B%0D%0A%20%20%20%20gap_conn_params.conn_sup_timeout%20%20%3D%20CONN_SUP_TIMEOUT%3B%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20sd_ble_gap_ppcp_set%28%26gap_conn_params%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20GATT%20module%20event%20handler.%0D%0A%20%2A%2F%0D%0A%20%2F%2A%0D%0Astatic%20void%20gatt_evt_handler%28nrf_ble_gatt_t%20%2A%20p_gatt%2C%20nrf_ble_gatt_evt_t%20const%20%2A%20p_evt%29%0D%0A%7B%0D%0A%20%20%20%20if%20%28p_evt-%3Eevt_id%20%3D%3D%20NRF_BLE_GATT_EVT_ATT_MTU_UPDATED%29%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20NRF_LOG_INFO%28%22GATT%20ATT%20MTU%20on%20connection%200x%25x%20changed%20to%20%25d.%22%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20p_evt-%3Econn_handle%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20p_evt-%3Eparams.att_mtu_effective%29%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20ble_hrs_on_gatt_evt%28%26m_hrs%2C%20p_evt%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20initializing%20the%20GATT%20module.%0D%0A%20%2A%2F%0D%0A%20%2F%2A%0D%0Astatic%20void%20gatt_init%28void%29%0D%0A%7B%0D%0A%20%20%20%20ret_code_t%20err_code%20%3D%20nrf_ble_gatt_init%28%26m_gatt%2C%20gatt_evt_handler%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%7D%0D%0A%2A%2F%0D%0A%20%2F%2FSTOP%20HERE%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%0D%0A%0D%0A%0D%0A%0D%0Astatic%20void%20advertising_init%28void%29%0D%0A%7B%0D%0A%20%20%20%20uint32_t%20%20%20%20%20%20err_code%3B%0D%0A%20%20%20%20ble_advdata_t%20advdata%3B%0D%0A%20%20%20%20uint8_t%20%20%20%20%20%20%20flags%20%3D%20BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED%3B%0D%0A%0D%0A%20%20%20%20ble_advdata_manuf_data_t%20manuf_specific_data%3B%0D%0A%0D%0A%20%20%20%20manuf_specific_data.company_identifier%20%3D%20APP_COMPANY_IDENTIFIER%3B%0D%0A%0D%0A%23if%20defined%28USE_UICR_FOR_MAJ_MIN_VALUES%29%0D%0A%20%20%20%20%2F%2F%20If%20USE_UICR_FOR_MAJ_MIN_VALUES%20is%20defined%2C%20the%20major%20and%20minor%20values%20will%20be%20read%20from%20the%0D%0A%20%20%20%20%2F%2F%20UICR%20instead%20of%20using%20the%20default%20values.%20The%20major%20and%20minor%20values%20obtained%20from%20the%20UICR%0D%0A%20%20%20%20%2F%2F%20are%20encoded%20into%20advertising%20data%20in%20big%20endian%20order%20%28MSB%20First%29.%0D%0A%20%20%20%20%2F%2F%20To%20set%20the%20UICR%20used%20by%20this%20example%20to%20a%20desired%20value%2C%20write%20to%20the%20address%200x10001080%0D%0A%20%20%20%20%2F%2F%20using%20the%20nrfjprog%20tool.%20The%20command%20to%20be%20used%20is%20as%20follows.%0D%0A%20%20%20%20%2F%2F%20nrfjprog%20--snr%20%3CSegger-chip-Serial-Number%3E%20--memwr%200x10001080%20--val%20%3Cyour%20major%2Fminor%20value%3E%0D%0A%20%20%20%20%2F%2F%20For%20example%2C%20for%20a%20major%20value%20and%20minor%20value%20of%200xabcd%20and%200x0102%20respectively%2C%20the%0D%0A%20%20%20%20%2F%2F%20the%20following%20command%20should%20be%20used.%0D%0A%20%20%20%20%2F%2F%20nrfjprog%20--snr%20%3CSegger-chip-Serial-Number%3E%20--memwr%200x10001080%20--val%200xabcd0102%0D%0A%20%20%20%20uint16_t%20major_value%20%3D%20%28%28%2A%28uint32_t%20%2A%29UICR_ADDRESS%29%20%26%200xFFFF0000%29%20%3E%3E%2016%3B%0D%0A%20%20%20%20uint16_t%20minor_value%20%3D%20%28%28%2A%28uint32_t%20%2A%29UICR_ADDRESS%29%20%26%200x0000FFFF%29%3B%0D%0A%0D%0A%20%20%20%20uint8_t%20index%20%3D%20MAJ_VAL_OFFSET_IN_BEACON_INFO%3B%0D%0A%0D%0A%20%20%20%20m_beacon_info%5Bindex%2B%2B%5D%20%3D%20MSB_16%28major_value%29%3B%0D%0A%20%20%20%20m_beacon_info%5Bindex%2B%2B%5D%20%3D%20LSB_16%28major_value%29%3B%0D%0A%0D%0A%20%20%20%20m_beacon_info%5Bindex%2B%2B%5D%20%3D%20MSB_16%28minor_value%29%3B%0D%0A%20%20%20%20m_beacon_info%5Bindex%2B%2B%5D%20%3D%20LSB_16%28minor_value%29%3B%0D%0A%23endif%0D%0A%0D%0A%20%20%20%20manuf_specific_data.data.p_data%20%3D%20%28uint8_t%20%2A%29%20m_beacon_info%3B%0D%0A%20%20%20%20manuf_specific_data.data.size%20%20%20%3D%20APP_BEACON_INFO_LENGTH%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%20Build%20and%20set%20advertising%20data.%0D%0A%20%20%20%20memset%28%26advdata%2C%200%2C%20sizeof%28advdata%29%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2Fadvdata.name_type%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20BLE_ADVDATA_NO_NAME%3B%0D%0A%20%20%20%2F%2F%20advdata.name_type%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20BLE_ADVDATA_NO_NAME%3B%0D%0A%20%20%20%20advdata.flags%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20flags%3B%0D%0A%20%20%20%20advdata.p_manuf_specific_data%20%3D%20%26manuf_specific_data%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%20Initialize%20advertising%20parameters%20%28used%20when%20starting%20advertising%29.%0D%0A%20%20%20%20memset%28%26m_adv_params%2C%200%2C%20sizeof%28m_adv_params%29%29%3B%0D%0A%0D%0A%20%20%20%20m_adv_params.properties.type%20%3D%20BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED%3B%0D%0A%20%20%20%20m_adv_params.p_peer_addr%20%20%20%20%20%3D%20NULL%3B%20%20%20%20%2F%2F%20Undirected%20advertisement.%0D%0A%20%20%20%20m_adv_params.filter_policy%20%20%20%3D%20BLE_GAP_ADV_FP_ANY%3B%0D%0A%20%20%20%20m_adv_params.interval%20%20%20%20%20%20%20%20%3D%20NON_CONNECTABLE_ADV_INTERVAL%3B%0D%0A%20%20%20%20m_adv_params.duration%20%20%20%20%20%20%20%20%3D%200%3B%20%20%20%20%20%20%20%2F%2F%20Never%20time%20out.%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20ble_advdata_encode%28%26advdata%2C%20m_adv_data.adv_data.p_data%2C%20%26m_adv_data.adv_data.len%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20ble_advdata_encode%28%26advdata%2C%20m_adv_data.adv_data.p_data%2C%20%26m_adv_data.adv_data.len%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20sd_ble_gap_adv_set_configure%28%26m_adv_handle%2C%20%26m_adv_data%2C%20%26m_adv_params%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20starting%20advertising.%0D%0A%20%2A%2F%0D%0Astatic%20void%20advertising_start%28void%29%0D%0A%7B%0D%0A%20%20%20%20ret_code_t%20err_code%3B%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20sd_ble_gap_adv_start%28m_adv_handle%2C%20APP_BLE_CONN_CFG_TAG%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20bsp_indication_set%28BSP_INDICATE_ADVERTISING%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20initializing%20the%20BLE%20stack.%0D%0A%20%2A%0D%0A%20%2A%20%40details%20Initializes%20the%20SoftDevice%20and%20the%20BLE%20event%20interrupt.%0D%0A%20%2A%2F%0D%0Astatic%20void%20ble_stack_init%28void%29%0D%0A%7B%0D%0A%20%20%20%20ret_code_t%20err_code%3B%0D%0A%0D%0A%20%20%20%20err_code%20%3D%20nrf_sdh_enable_request%28%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%20Configure%20the%20BLE%20stack%20using%20the%20default%20settings.%0D%0A%20%20%20%20%2F%2F%20Fetch%20the%20start%20address%20of%20the%20application%20RAM.%0D%0A%20%20%20%20uint32_t%20ram_start%20%3D%200%3B%0D%0A%20%20%20%20err_code%20%3D%20nrf_sdh_ble_default_cfg_set%28APP_BLE_CONN_CFG_TAG%2C%20%26ram_start%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%20Enable%20BLE%20stack.%0D%0A%20%20%20%20err_code%20%3D%20nrf_sdh_ble_enable%28%26ram_start%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20initializing%20logging.%20%2A%2F%0D%0Astatic%20void%20log_init%28void%29%0D%0A%7B%0D%0A%20%20%20%20ret_code_t%20err_code%20%3D%20NRF_LOG_INIT%28NULL%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%0D%0A%20%20%20%20NRF_LOG_DEFAULT_BACKENDS_INIT%28%29%3B%0D%0A%7D%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20initializing%20LEDs.%20%2A%2F%0D%0Astatic%20void%20leds_init%28void%29%0D%0A%7B%0D%0A%20%20%20%20ret_code_t%20err_code%20%3D%20bsp_init%28BSP_INIT_LEDS%2C%20NULL%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20initializing%20timers.%20%2A%2F%0D%0Astatic%20void%20timers_init%28void%29%0D%0A%7B%0D%0A%20%20%20%20ret_code_t%20err_code%20%3D%20app_timer_init%28%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20initializing%20power%20management.%0D%0A%20%2A%2F%0D%0Astatic%20void%20power_management_init%28void%29%0D%0A%7B%0D%0A%20%20%20%20ret_code_t%20err_code%3B%0D%0A%20%20%20%20err_code%20%3D%20nrf_pwr_mgmt_init%28%29%3B%0D%0A%20%20%20%20APP_ERROR_CHECK%28err_code%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%40brief%20Function%20for%20handling%20the%20idle%20state%20%28main%20loop%29.%0D%0A%20%2A%0D%0A%20%2A%20%40details%20If%20there%20is%20no%20pending%20log%20operation%2C%20then%20sleep%20until%20next%20the%20next%20event%20occurs.%0D%0A%20%2A%2F%0D%0Astatic%20void%20idle_state_handle%28void%29%0D%0A%7B%0D%0A%20%20%20%20if%20%28NRF_LOG_PROCESS%28%29%20%3D%3D%20false%29%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20nrf_pwr_mgmt_run%28%29%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%0D%0A%20%2A%20%40brief%20Function%20for%20application%20main%20entry.%0D%0A%20%2A%2F%0D%0Aint%20main%28void%29%0D%0A%7B%0D%0A%20%20%20%20%2F%2F%20Initialize.%0D%0A%20%20%20%20log_init%28%29%3B%0D%0A%20%20%20%20timers_init%28%29%3B%0D%0A%20%20%20%20leds_init%28%29%3B%0D%0A%20%20%20%20gap_params_init%28%29%3B%0D%0A%20%20%20%20power_management_init%28%29%3B%0D%0A%20%20%20%20ble_stack_init%28%29%3B%0D%0A%20%20%20%20advertising_init%28%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%20Start%20execution.%0D%0A%20%20%20%20NRF_LOG_INFO%28%22Beacon%20example%20started.%22%29%3B%0D%0A%20%20%20%20advertising_start%28%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%20Enter%20main%20loop.%0D%0A%20%20%20%20for%20%28%3B%3B%20%29%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20idle_state_handle%28%29%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0A%0D%0A%2F%2A%2A%0D%0A%20%2A%20%40%7D%0D%0A%20%2A%2F%0D%0A]&lt;/p&gt;&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=740&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: How should I not ask my question?</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-should-i-not-ask-my-question</link><pubDate>Sat, 29 Jun 2019 08:26:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cfb45d0-7fdb-4bc4-b91a-f1875661e864</guid><dc:creator>Abbyon</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=740&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>