<?xml version="1.0" encoding="UTF-8" ?>
<?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/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70813/user-description-in-pc-ble-driver-py</link><description>When trying to add a user description to the BLEGattsCharMD() I get this error: 
 TypeError: in method &amp;#39;ble_gatts_char_md_t_p_char_user_desc_set&amp;#39;, argument 2 of type &amp;#39;uint8_t const *&amp;#39; 
 
 This is a code snippet causing this error: 
 props = BLEGattCharProps</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Mar 2021 07:13:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70813/user-description-in-pc-ble-driver-py" /><item><title>RE: User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/thread/298565?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 07:13:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56442ef3-4e07-47ac-8f41-4e70eb0d8a8e</guid><dc:creator>gnf</dc:creator><description>&lt;p&gt;In my other issue there is also garbage showing up. Maybe these two issues are related:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71774/device-name-shows-garbage-using-pc_ble_driver_py"&gt;devzone.nordicsemi.com/.../device-name-shows-garbage-using-pc_ble_driver_py&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/thread/297512?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 13:02:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c000f29c-de0c-4e7d-97db-ecc24a5c8942</guid><dc:creator>gnf</dc:creator><description>&lt;p&gt;&lt;span&gt;Oh, that didn&amp;#39;t look too good.&amp;nbsp;I am running Ubuntu 20.04.2 LTS, Python 3.8.5.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edit: And just to be clear, the version of pc-ble-driver-py is 0.15.0&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/thread/296979?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 16:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd716bf9-e7e1-4fd3-95d2-1fe4424d7803</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Which Python and OS versions are you running this on? I&amp;#39;m getting an error after a few seconds:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Fatal Python error: could not acquire lock for &amp;lt;_io.BufferedWriter name=&amp;#39;&amp;lt;stdout&amp;gt;&amp;#39;&amp;gt; at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=010BEDC0)

Thread 0x000052b8 (most recent call first):
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 306 in wait
  File &amp;quot;C:\Python\Python38-32\lib\queue.py&amp;quot;, line 179 in get
  File &amp;quot;C:\Python\Python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py&amp;quot;, line 2336 in ble_event_handler_thread
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 870 in run
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 932 in _bootstrap_inner
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 890 in _bootstrap

Thread 0x0000314c (most recent call first):
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 306 in wait
  File &amp;quot;C:\Python\Python38-32\lib\queue.py&amp;quot;, line 179 in get
  File &amp;quot;C:\Python\Python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py&amp;quot;, line 2287 in status_handler_thread
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 870 in run
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 932 in _bootstrap_inner
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 890 in _bootstrap

Thread 0x00004f80 (most recent call first):
  File &amp;quot;C:\Python\Python38-32\lib\logging\__init__.py&amp;quot;, line 1084 in emit
  File &amp;quot;C:\Python\Python38-32\lib\logging\__init__.py&amp;quot;, line 950 in handle
  File &amp;quot;C:\Python\Python38-32\lib\logging\__init__.py&amp;quot;, line 1649 in callHandlers
  File &amp;quot;C:\Python\Python38-32\lib\logging\__init__.py&amp;quot;, line 1587 in handle
  File &amp;quot;C:\Python\Python38-32\lib\logging\__init__.py&amp;quot;, line 1577 in _log
  File &amp;quot;C:\Python\Python38-32\lib\logging\__init__.py&amp;quot;, line 1500 in log
  File &amp;quot;C:\Python\Python38-32\lib\site-packages\pc_ble_driver_py\ble_adapter.py&amp;quot;, line 786 in on_rpc_log_entry
  File &amp;quot;C:\Python\Python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py&amp;quot;, line 2321 in log_message_handler_sync
  File &amp;quot;C:\Python\Python38-32\lib\site-packages\wrapt\decorators.py&amp;quot;, line 445 in _synchronized
  File &amp;quot;C:\Python\Python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py&amp;quot;, line 2327 in log_message_handler_thread
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 870 in run
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 932 in _bootstrap_inner
  File &amp;quot;C:\Python\Python38-32\lib\threading.py&amp;quot;, line 890 in _bootstrap

Current thread 0x00002bb4 (most recent call first):
&amp;lt;no Python frame&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/thread/295109?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 13:21:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb870633-5b84-4da6-9dac-c342e4bdec67</guid><dc:creator>gnf</dc:creator><description>&lt;p&gt;This is a sample application showing the issue (pc_ble_driver_py version 0.15.0):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;import logging
import sys
import time
from threading import Condition, Lock
from pc_ble_driver_py.observers import BLEDriverObserver

BASE_UUID_DICT                 = {&amp;#39;BV_BASE_UUID&amp;#39;: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                               0x10, 0x00, 
                               0x80, 0x00, 
                               0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB]}
SERVICE1 = ((&amp;quot;MyService1&amp;quot;      , 0x3000),
                                ((&amp;quot;Char1&amp;quot;               , 0x3001, 1,   [0x00], &amp;quot;Desc1&amp;quot;),
                                 (&amp;quot;Char2&amp;quot;                , 0x3002, 2,   [0x02, 0xFA], &amp;quot;Desc2&amp;quot;),))

DEVICE_INFORMATION_SERVICE = ((&amp;quot;Device Information&amp;quot;   , 0x180A),
                                ((&amp;quot;Manufacturer name&amp;quot;    , 0x2A29, 20,   b&amp;quot;Name&amp;quot;, None),
                                (&amp;quot;Model name&amp;quot;           , 0x2A24,  20,   b&amp;quot;Model1&amp;quot;, None),
                                (&amp;quot;Firmware version&amp;quot;     , 0x2A26,  20,   b&amp;quot;v_0.0.1&amp;quot;, None),))

SERVICES_CONFIG = ( DEVICE_INFORMATION_SERVICE,
                    SERVICE1,
                     )

logger = logging.getLogger(__name__)

def init(conn_ic_id):
    # noinspection PyGlobalUndefined
    global BLEAdapter, BLEDriver, BLEAdvData, BLEConfigGapDeviceName, BLEEvtID, BLEEnableParams, config, driver, BLEAdvData, BLEGattsHVXParams, BLEService, BLEUUIDBase, BLEUUID, BLEGattsAttr, BLEGattsAttrMD, BLEGattHandle, BLEGattsCharHandles, BLEGattsCharMD, BLEGattCharProps, BLEConfig, BLEConfigCommon
    from pc_ble_driver_py import config

    config.__conn_ic_id__ = conn_ic_id
    # noinspection PyUnresolvedReferences
    from pc_ble_driver_py.ble_driver import (
        BLEDriver,
        BLEAdvData,
        BLEConfigGapDeviceName,
        BLEEvtID,
        BLEEnableParams,
        BLEGattsHVXParams,
        BLEService,
        BLEUUIDBase,
        BLEUUID,
        BLEGattHandle,
        BLEGattsAttr,
        BLEGattsAttrMD,
        BLEGattsCharHandles,
        BLEGattsCharMD,
        BLEGattCharProps,
        BLEConfig,
        BLEConfigCommon,
        driver,
    )
        # noinspection PyUnresolvedReferences
    from pc_ble_driver_py.ble_adapter import BLEAdapter


class Peripheral:
    def __init__(self, adapter):
        self.adapter = adapter
        logger.info(
            &amp;quot;Peripheral adapter is %d&amp;quot;,
            self.adapter.driver.rpc_adapter.internal,
        )
        self.char_128_handles_dict = {}
        self.serv_128_handle_dict = {}
        self.uuid_128_base_dict = {}
        self.serv_128_uuid_dict = {}

    def _add_char(self, base_uuid, service_uuid, char_uuid, max_len, value, user_desc_str):
        &amp;quot;&amp;quot;&amp;quot;Add characteristic&amp;quot;&amp;quot;&amp;quot;
        char_128_handles = BLEGattsCharHandles()
        char_128_uuid = BLEUUID(char_uuid, self.uuid_128_base_dict[base_uuid] )
        
        max_len=16
        
        props = BLEGattCharProps(notify=True, read=True, write=True)
        if user_desc_str:
            user_desc = list(user_desc_str.encode())
            desc_md = BLEGattCharProps(read=True)
            char_md = BLEGattsCharMD(char_props=props, user_desc=user_desc, desc_md=desc_md)         
        else:
            char_md = BLEGattsCharMD(char_props=props)            
        
       
        attr_md = BLEGattsAttrMD()
        attr = BLEGattsAttr(uuid=char_128_uuid, attr_md=attr_md,
                            max_len=max_len, value=value)
        self.adapter.driver.ble_gatts_characteristic_add(
                            self.serv_128_handle_dict[service_uuid].handle,
                            char_md, attr, char_128_handles)
        self.char_128_handles_dict[char_uuid] = char_128_handles

    def _add_service(self, base_uuid, service_uuid):
        &amp;quot;&amp;quot;&amp;quot;Add specific service&amp;quot;&amp;quot;&amp;quot;       
        if not base_uuid in self.uuid_128_base_dict:
            uuid_128_base = BLEUUIDBase(BASE_UUID_DICT[base_uuid])
            self.uuid_128_base_dict[base_uuid] = uuid_128_base
            self.adapter.driver.ble_vs_uuid_add(self.uuid_128_base_dict[base_uuid])

        self.serv_128_handle_dict[service_uuid]= BLEGattHandle()
        self.serv_128_uuid_dict[service_uuid] = BLEUUID(service_uuid, self.uuid_128_base_dict[base_uuid])
  
        self.adapter.driver.ble_gatts_service_add(
            driver.BLE_GATTS_SRVC_TYPE_PRIMARY, self.serv_128_uuid_dict[service_uuid], self.serv_128_handle_dict[service_uuid])
 
    def setup_services_128bit(self):
        &amp;quot;&amp;quot;&amp;quot;Setup services&amp;quot;&amp;quot;&amp;quot;
        for (_, service_uuid), chars in SERVICES_CONFIG:
            self._add_service(base_uuid=&amp;#39;BV_BASE_UUID&amp;#39;, service_uuid=service_uuid)
            for (_, char_uuid, max_len, value, user_desc_str) in chars:
                self._add_char(base_uuid=&amp;#39;BV_BASE_UUID&amp;#39;, 
                           service_uuid=service_uuid, 
                           char_uuid=char_uuid, max_len=max_len, value=value,
                           user_desc_str=user_desc_str)
def main(serial_port):
    print(&amp;quot;Serial port used: {}&amp;quot;.format(serial_port))
    ble_driver = BLEDriver(serial_port=serial_port, 
                       baud_rate=1000000,
                       auto_flash=True,
                       log_severity_level=&amp;quot;debug&amp;quot;)
    adapter = BLEAdapter(ble_driver)
    observer = TimeoutObserver()

    adv_data = BLEAdvData(short_local_name=&amp;quot;MyDevice&amp;quot;)

    ble_driver.observer_register(observer)
    ble_driver.open()
    if config.__conn_ic_id__.upper() == &amp;quot;NRF51&amp;quot;:
        ble_driver.ble_enable(
            BLEEnableParams(
                vs_uuid_count=0,
                service_changed=0,
                periph_conn_count=1,
                central_conn_count=0,
                central_sec_count=0,
            )
        )
    elif config.__conn_ic_id__.upper() == &amp;quot;NRF52&amp;quot;:
#         configCommon = BLEConfigCommon()
#         configCommon.vs_uuid_count = 1
#         driver.ble_cfg_set(BLEConfig.uuid_count, configCommon)
#         cfg = BLEConfigGap()
#         cfg.device_name = &amp;quot;test123&amp;quot;
#         cfg.device_name_read_only = False
#        ble_tester.driver.ble_cfg_set(BLEConfig.device_name, cfg)
        
        configName = BLEConfigGapDeviceName(device_name=&amp;quot;0000000000&amp;quot;,device_name_read_only=False)
        ble_driver.ble_cfg_set(BLEConfig(driver.BLE_GAP_CFG_DEVICE_NAME), configName)
#         ble_driver.ble_cfg_set(BLEConfig.device_name, cfg)
        #sd_ble_gap_device_name_set()
        ble_driver.ble_enable()
        
    peripheral = Peripheral(adapter)
    peripheral.setup_services_128bit()
       
    ble_driver.ble_gap_adv_data_set(adv_data)
    ble_driver.ble_gap_adv_start()
    observer.wait_for_timeout()

    while(True):
        time.sleep(10)
    print(&amp;quot;Closing&amp;quot;)
    ble_driver.close()


class TimeoutObserver(BLEDriverObserver):
    def __init__(self, *args, **kwargs):
        super(BLEDriverObserver, self).__init__(*args, **kwargs)
        self.cond = Condition(Lock())

    def on_gap_evt_timeout(self, ble_driver, conn_handle, src):
        with self.cond:
            self.cond.notify_all()

    def on_gap_evt_disconnected(self, ble_driver, conn_handle, reason):
        with self.cond:
            self.cond.notify_all()

    def wait_for_timeout(self):
        with self.cond:
            self.cond.wait()


if __name__ == &amp;quot;__main__&amp;quot;:
    logFormatter = logging.Formatter(&amp;quot;%(asctime)s [%(levelname)-7s][%(name)s] %(message)s&amp;quot;)
    rootLogger = logging.getLogger()
     
    fileHandler = logging.FileHandler(&amp;quot;ble_test.log&amp;quot;)
    fileHandler.setFormatter(logFormatter)
    rootLogger.addHandler(fileHandler)
     
    consoleHandler = logging.StreamHandler(sys.stdout)
    consoleHandler.setFormatter(logFormatter)
    rootLogger.addHandler(consoleHandler)
     
    rootLogger.setLevel(logging.DEBUG)
    
    id = &amp;quot;NRF52&amp;quot;
    serial_port = &amp;quot;/dev/ttyACM0&amp;quot;
    init(id)
    main(serial_port)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note the following changes that is made to BLEGattsCharMD in ble_driver.py:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;class BLEGattsCharMD(object):
    def __init__(self, char_props, user_desc=None, pf=None,
                 desc_md=None, cccd_md=None, sccd_md=None):
        assert isinstance(char_props, BLEGattCharProps)
        self.char_props = char_props
        self.user_desc = user_desc
        self.pf = pf
        self.desc_md = desc_md
        self.cccd_md = cccd_md
        self.sccd_md = sccd_md

    def __str__(self):
        return str(self.__dict__)

    def to_c(self):
        char_md = driver.ble_gatts_char_md_t()
        char_md.char_props = self.char_props.to_c()
        if self.user_desc:
            user_desc_array=util.list_to_uint8_array(self.user_desc)
            user_desc_array_cast = user_desc_array.cast()
            char_md.p_char_user_desc = user_desc_array_cast
            char_md.char_user_desc_size = len(self.user_desc)
            char_md.char_user_desc_max_size = len(self.user_desc)
        if self.pf:
            char_md.p_char_pf = self.pf.to_c()
        if self.desc_md:
            char_md.user_desc_md = self.desc_md.to_c()
        if self.cccd_md:
            char_md.p_cccd_md = self.cccd_md.to_c()
        if self.sccd_md:
            char_md.p_sccd_md = self.sccd_md.to_c()
        return char_md&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;nRF Connect shows the following in Characteristic User Name:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/800x600/__key/communityserver-discussions-components-files/4/user_5F00_desc2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/thread/291739?ContentTypeID=1</link><pubDate>Thu, 28 Jan 2021 10:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:306fd229-0f53-4625-9925-3b14b6079d5f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Have you tried setting the size and max_size manually, to see if that makes any difference?&lt;/p&gt;
&lt;p&gt;Could you share a sample application that we can use the reproduce and debug this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/thread/291593?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2021 17:30:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:012fe40f-d7c6-4b1e-91b9-0bee32c08025</guid><dc:creator>gnf</dc:creator><description>&lt;p&gt;I tried setting user_desc to a list but the error is still there. The&amp;nbsp;&lt;em&gt;&lt;span&gt;char_md&lt;/span&gt;.&lt;span&gt;char_user_desc_size&amp;nbsp; &lt;/span&gt;&lt;/em&gt;seems to be correct in both cases&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit: Aha! I found one issue. It is missing&amp;nbsp;&lt;span&gt;char_user_desc_max_size. Adding it gets rid of the&amp;nbsp;NRF_ERROR_DATA_SIZE&amp;nbsp;error:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; char_md.char_user_desc_size = len(self.user_desc)&lt;br /&gt;&amp;nbsp; &amp;nbsp; char_md.char_user_desc_max_size = len(self.user_desc)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can now connect to the peripheral but the user description contains all 0x00 (&lt;span&gt;len(self.user_desc)&amp;nbsp; number of 0x00 bytes)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/thread/291346?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 16:19:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef4eff1c-476e-4092-90a4-d4e9458323bd</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you tried&amp;nbsp;setting&amp;nbsp;&lt;span&gt;user_desc&amp;nbsp;to a list, and not a&amp;nbsp;bytearray()? The function&amp;nbsp;list_to_char_array seems to expect a list.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The code you use may not set the size (&lt;em&gt;&lt;span&gt;char_md&lt;/span&gt;.&lt;span&gt;char_user_desc_size&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;span&gt;len&lt;/span&gt;(&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;user_desc&lt;/span&gt;)&lt;/em&gt;) correctly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: User description in pc-ble-driver-py</title><link>https://devzone.nordicsemi.com/thread/290836?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2021 22:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5be00ec-d045-4929-8a41-22c2f6697eb9</guid><dc:creator>gnf</dc:creator><description>&lt;p&gt;Ok, some progress. Instead of&lt;/p&gt;
&lt;p&gt;&lt;code&gt;char_md.p_char_user_desc = util.list_to_char_array(self.user_desc)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;this code at least doesn&amp;#39;t produce errors:&lt;/p&gt;
&lt;pre&gt;user_desc_array=util.list_to_uint8_array(self.user_desc)&lt;br /&gt;user_desc_array_cast = user_desc_array.cast()&lt;br /&gt;char_md.p_char_user_desc = user_desc_array_cast&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But now I get NRF_ERROR_DATA_SIZE when adding the characteristic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>