<?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>802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86827/802-15-4-precompiled-library-limited</link><description>I based my project on the secure wireless uart example in the nrf5 SDK and linked to the precompiled gcc library 802_15_4_lib_gcc.a 
 I then tried to add multiple entries to the MAC tables in security.c using mac_table_item_set(). All goes well for the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Apr 2022 07:43:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86827/802-15-4-precompiled-library-limited" /><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/364615?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 07:43:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14699019-310f-4f5b-8398-93836ff08c96</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Allan,&lt;/p&gt;
&lt;p&gt;I am glad to hear that you managed to get it to work eventually. Thank you for sharing your solution here so others with the same issue can find it, it is highly appreciated!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/364546?ContentTypeID=1</link><pubDate>Sat, 23 Apr 2022 03:24:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:262f99b8-fc1d-4880-a81e-10d20a92b7ca</guid><dc:creator>Allanlo</dc:creator><description>&lt;p&gt;Hi Marte&lt;/p&gt;
&lt;p&gt;Sadly it did not work. The first device in the table was able to communicate as normal, but the second could only receive packets. Packets sent from this device were received, but failed to be decoded and returned the following error code:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;MAC_SECURITY_ERROR = 0xE4, /* 228 */ /**&amp;lt; Cryptographic processing of the&lt;br /&gt; received secured frame failed. */&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have just got it working and have all 3 devices communicating. They key was that if you have more than 1 device in the list, you have to set :key_device_descr.unique_device = false;&lt;/p&gt;
&lt;p&gt;For future reference, here is the whole file where I have added 4 devices to my tables:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;quot;sdk_config.h&amp;quot;
#include &amp;quot;802_15_4_config.h&amp;quot;
#include &amp;quot;main.h&amp;quot;

#include &amp;lt;string.h&amp;gt;
#include &amp;quot;fsm.h&amp;quot;
#include &amp;quot;mac_security.h&amp;quot;
#include &amp;quot;mac_common.h&amp;quot;
#include &amp;quot;mac_mlme_pib.h&amp;quot;
#include &amp;quot;mac_mlme_comm_status.h&amp;quot;

#define GET_BYTE(x, n) (((x) &amp;gt;&amp;gt; (n * 8)) &amp;amp; 0xFF)

typedef uint8_t key_data[KEY_LOOKUP_SIZE_FIVE_VAL];

/* Table of short addresses for my paired devices */
const uint16_t au16_ShortAddressTable[MAX_PAIR_DEV] = {0xAE3F, 0x8A32, 0x1BEB, 0xC7B8};
const uint8_t m_security_key[MAC_SECURITY_KEY_SIZE] = CONFIG_SECURITY_KEY;

void security_tables_init(void)
{
#if (CONFIG_SECURE == 1)
    uint8_t                    u8_cntr;
    pib_id_t                   id;
    bool                       security_enabled;
    mac_status_t               status;
    pib_id_t                   pib_id;
    mac_key_descr_t            key_descr;
    mac_key_id_lookup_descr_t  key_id_lookup_descr;
    mac_key_device_descr_t     key_device_descr;
    mac_key_usage_descr_t      key_usage_descr;
    mac_security_level_descr_t sec_level_descr;
    mac_device_descr_t         device_descr;
    key_data                   KeyLookupData = {GET_BYTE(CONFIG_PAN_ID, 0), GET_BYTE(CONFIG_PAN_ID, 1), 0, 0, 0};
    uint16_t                   u16_ShortAddr;

    id.mlme_id = MAC_SECURITY_ENABLED;
    security_enabled = true;
    mlme_set(id, 0, &amp;amp;security_enabled);

    /* Init the tables before adding to them */    
    mac_table_init(&amp;amp;key_descr.id_lookup_list);
    mac_table_init(&amp;amp;key_descr.key_device_list);
    mac_table_init(&amp;amp;key_descr.key_usage_list);

    key_id_lookup_descr.size = KEY_LOOKUP_SIZE_FIVE;

    /* Add our entries to the tables */
    for (u8_cntr = 0; u8_cntr &amp;lt; MAX_PAIR_DEV; u8_cntr++)
    {
        /* Get the next short address to add and build a lookup key for it */
        u16_ShortAddr = au16_ShortAddressTable[u8_cntr];
        KeyLookupData[2] = GET_BYTE(u16_ShortAddr, 0);
        KeyLookupData[3] = GET_BYTE(u16_ShortAddr, 1);

        /* Add it to the table at the next index */
        memcpy(key_id_lookup_descr.data, KeyLookupData, KEY_LOOKUP_SIZE_FIVE_VAL);
        status = mac_table_item_set(&amp;amp;key_descr.id_lookup_list,
                                    &amp;amp;key_id_lookup_descr.table_service,
                                    MAC_KEY_ID_LOOKUP_LIST, u8_cntr);
        ASSERT(status == MAC_SUCCESS);

        key_device_descr.blacklisted = false;
        key_device_descr.unique_device = false;
        key_device_descr.device_handle = u8_cntr;
        key_device_descr.table_service.idx = u8_cntr;
        status = mac_table_item_set(&amp;amp;key_descr.key_device_list,
                                    &amp;amp;key_device_descr.table_service,
                                    MAC_KEY_DEVICE_LIST, u8_cntr);
        ASSERT(status == MAC_SUCCESS);

        key_usage_descr.frame_type = MAC_DATA;
        key_usage_descr.cmd_frame_id = 0;
        status = mac_table_item_set(&amp;amp;key_descr.key_usage_list,
                                    &amp;amp;key_usage_descr.table_service,
                                    MAC_KEY_USAGE_LIST, u8_cntr);
        ASSERT(status == MAC_SUCCESS);

        memcpy(key_descr.key, m_security_key, MAC_SECURITY_KEY_SIZE);

        pib_id.mlme_id = MAC_KEY_TABLE;
        status = mlme_set(pib_id, u8_cntr, &amp;amp;key_descr);
        ASSERT(status == MAC_SUCCESS);

        sec_level_descr.security_min = CONFIG_DATA_SECURITY_LEVEL;
        sec_level_descr.frame_type   = MAC_DATA;
        sec_level_descr.override_min = true;

        device_descr.extended_address = CONFIG_IEEE_ADDRESS + u16_ShortAddr;
        device_descr.pan_id           = CONFIG_PAN_ID;
        device_descr.short_address    = u16_ShortAddr;
        device_descr.frame_counter    = 0;
        device_descr.exempt           = 0;

        pib_id.mlme_id = MAC_DEVICE_TABLE;
        status = mlme_set(pib_id, u8_cntr, &amp;amp;device_descr);
        ASSERT(status == MAC_SUCCESS);

        pib_id.mlme_id = MAC_SECURITY_LEVEL_TABLE;
        status = mlme_set(pib_id, u8_cntr, &amp;amp;sec_level_descr);
        ASSERT(status == MAC_SUCCESS);
    }

    fsm_event_post(E_SET_DONE, NULL);
    (void)status;
#endif
}

void mlme_comm_status_ind(mlme_comm_status_ind_t * ind)
{
    printf(&amp;quot;security status: %d\n\r&amp;quot;, ind-&amp;gt;status);
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/364218?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 12:24:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b09da9e-f8ad-4f73-a379-dcbcc883bcf9</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Allan,&lt;/p&gt;
&lt;p&gt;Good to hear that you are having progress! Have you been able to test to see if it works as expected, besides not crashing?&lt;/p&gt;
&lt;p&gt;My implementation was very close to yours. Instead of creating new items I simply added m_key_lookup_data to&amp;nbsp;a_KeyLookupData:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint8_t *a_KeyLookupData[MAX_PAIR_DEV] = {m_key_lookup_data,
									      m_key_lookup_data,
									      m_key_lookup_data,
									      m_key_lookup_data,
									      m_key_lookup_data,
									      m_key_lookup_data,
									      m_key_lookup_data,
									      m_key_lookup_data};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And then I copied your for loop and added a line for logging as well to make sure that it looped through all items.&lt;/p&gt;
&lt;p&gt;I did not see any issues when I tested at least, but I did not test thoroughly enough to be able to say that it works for certain.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/363735?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 02:27:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a427e73-cd94-4802-986e-74792464360d</guid><dc:creator>Allanlo</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know if it all works yet, but I don&amp;#39;t get the hard fault anymore. When I converted the function to be index based, I missed one instance.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    pib_id.mlme_id = MAC_KEY_TABLE;
    status = mlme_set(pib_id, 0, &amp;amp;key_descr);
    ASSERT(status == MAC_SUCCESS);
    
    *** should have been ***
    
    pib_id.mlme_id = MAC_KEY_TABLE;
    status = mlme_set(pib_id, u8_cntr, &amp;amp;key_descr);
    ASSERT(status == MAC_SUCCESS);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is the code that is no longer crashing (fingers crossed it works now).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define GET_BYTE(x, n) (((x) &amp;gt;&amp;gt; (n * 8)) &amp;amp; 0xFF)

typedef uint8_t key_data[KEY_LOOKUP_SIZE_FIVE_VAL];

static key_data a_KeyLookupData[MAX_PAIR_DEV] = {\
    {GET_BYTE(CONFIG_PAN_ID, 0), GET_BYTE(CONFIG_PAN_ID, 1), GET_BYTE(1, 0), GET_BYTE(1, 1), 0x00},\
    {GET_BYTE(CONFIG_PAN_ID, 0), GET_BYTE(CONFIG_PAN_ID, 1), GET_BYTE(2, 0), GET_BYTE(2, 1), 0x00},\
    {GET_BYTE(CONFIG_PAN_ID, 0), GET_BYTE(CONFIG_PAN_ID, 1), GET_BYTE(CONFIG_OTHER_ADDRESS, 0), GET_BYTE(CONFIG_OTHER_ADDRESS, 1), 0x00},\
    {GET_BYTE(CONFIG_PAN_ID, 0), GET_BYTE(CONFIG_PAN_ID, 1), GET_BYTE(12, 0), GET_BYTE(12, 1), 0x00},\
    };

const uint8_t m_security_key[MAC_SECURITY_KEY_SIZE] = CONFIG_SECURITY_KEY;

void security_tables_init(void)
{
#if (CONFIG_SECURE == 1)
    uint8_t                    u8_cntr;
    pib_id_t                   id;
    bool                       security_enabled;
    mac_status_t               status;
    pib_id_t                   pib_id;
    mac_key_descr_t            key_descr;
    mac_key_id_lookup_descr_t  key_id_lookup_descr;
    mac_key_device_descr_t     key_device_descr;
    mac_key_usage_descr_t      key_usage_descr;
    mac_security_level_descr_t sec_level_descr;
    mac_device_descr_t         device_descr;

    id.mlme_id = MAC_SECURITY_ENABLED;
    security_enabled = true;
    mlme_set(id, 0, &amp;amp;security_enabled);

    /* Init the tables before adding to them */    
    mac_table_init(&amp;amp;key_descr.id_lookup_list);
    mac_table_init(&amp;amp;key_descr.key_device_list);
    mac_table_init(&amp;amp;key_descr.key_usage_list);

    key_id_lookup_descr.size = KEY_LOOKUP_SIZE_FIVE;

    /* Add our entries to the tables */
    for (u8_cntr = 0; u8_cntr &amp;lt; MAX_PAIR_DEV; u8_cntr++)
    {
        memcpy(key_id_lookup_descr.data, a_KeyLookupData[u8_cntr], KEY_LOOKUP_SIZE_FIVE_VAL);
        status = mac_table_item_set(&amp;amp;key_descr.id_lookup_list,
                                    &amp;amp;key_id_lookup_descr.table_service,
                                    MAC_KEY_ID_LOOKUP_LIST, u8_cntr);
        ASSERT(status == MAC_SUCCESS);

        key_device_descr.blacklisted = false;
        key_device_descr.unique_device = true;
        key_device_descr.device_handle = 0;
        key_device_descr.table_service.idx = u8_cntr;
        status = mac_table_item_set(&amp;amp;key_descr.key_device_list,
                                    &amp;amp;key_device_descr.table_service,
                                    MAC_KEY_DEVICE_LIST, u8_cntr);
        ASSERT(status == MAC_SUCCESS);

        key_usage_descr.frame_type = MAC_DATA;
        key_usage_descr.cmd_frame_id = 0;
        status = mac_table_item_set(&amp;amp;key_descr.key_usage_list,
                                    &amp;amp;key_usage_descr.table_service,
                                    MAC_KEY_USAGE_LIST, u8_cntr);
        ASSERT(status == MAC_SUCCESS);

        memcpy(key_descr.key, m_security_key, MAC_SECURITY_KEY_SIZE);

        pib_id.mlme_id = MAC_KEY_TABLE;
        status = mlme_set(pib_id, u8_cntr, &amp;amp;key_descr);
        ASSERT(status == MAC_SUCCESS);

        sec_level_descr.security_min = CONFIG_DATA_SECURITY_LEVEL;
        sec_level_descr.frame_type   = MAC_DATA;
        sec_level_descr.override_min = true;

        device_descr.extended_address = CONFIG_IEEE_ADDRESS + CONFIG_OTHER_ADDRESS;
        device_descr.pan_id           = CONFIG_PAN_ID;
        device_descr.short_address    = CONFIG_OTHER_ADDRESS;
        device_descr.frame_counter    = 0;
        device_descr.exempt           = 0;

        pib_id.mlme_id = MAC_DEVICE_TABLE;
        status = mlme_set(pib_id, u8_cntr, &amp;amp;device_descr);
        ASSERT(status == MAC_SUCCESS);

        pib_id.mlme_id = MAC_SECURITY_LEVEL_TABLE;
        status = mlme_set(pib_id, u8_cntr, &amp;amp;sec_level_descr);
        ASSERT(status == MAC_SUCCESS);
    }

    fsm_event_post(E_SET_DONE, NULL);
    (void)status;
#endif
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/363723?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 00:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3faf0bd-3f7a-4919-a91e-dd3ca7ad3cab</guid><dc:creator>Allanlo</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;All 3 elements are identical in size, I just changed the index. I must be doing something wrong. Could you please post the snippet of your test code that worked? I might help me spot where I am going wrong. I suspect one of my items should be declared as an array, but as I can&amp;#39;t see what the library functions are doing, I am not sure what it is expecting.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Allan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/363506?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2022 09:43:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5f8e72f-4da8-48e8-8a1b-ac8118e601c3</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Allan,&lt;/p&gt;
&lt;p&gt;Unfortunately the stack used by the IEEE 802.15.4 MAC library is developed by another company. Because of this we do not have access to the whole stack, and we do not have expertise regarding this library. Our developers recommend using the nRF IEEE 802.15.4 radio driver if possible, however, this does not have a MAC layer.&lt;/p&gt;
&lt;p&gt;It does not seem like the issue is with the size of the MAC key lookup list, as I&amp;nbsp;was able to&amp;nbsp;add multiple items when doing something similar to&amp;nbsp;the code you shared here. I also used&amp;nbsp;a_KeyLookupData, setting the size of it and&amp;nbsp;MAX_PAIR_DEV to&amp;nbsp;CONFIG_MAC_KEY_ID_LOOKUP_LIST_SIZE. However, I filled each entry with&amp;nbsp;m_key_lookup_data, so&amp;nbsp;it is possible that the issue is related to your a_KeyLookupData. How does the third element of&amp;nbsp;a_KeyLookupData look like compared to the first and second, since this is the one that fails?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/363198?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 12:42:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b3df4b3-f9b8-4f71-ab02-dfaf5c87430c</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Allan,&lt;/p&gt;
&lt;p&gt;I am still looking into this, but I have not been able to find a solution yet. Due to holidays I will not be able to get in touch with the developers until the middle of next week, so it might take some time before I have a response unfortunately.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/362928?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 00:38:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3184ec5d-956d-4a3a-ab03-5e18edee46d9</guid><dc:creator>Allanlo</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For the first 2 calls, mac_table_item_set() returns MAC_SUCCESS. For the third call, it does not return &amp;ndash; it generates a hard fault.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The call I use is shown below:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    /* Init the tables before adding to them */
    mac_table_init(&amp;amp;key_descr.id_lookup_list);
    mac_table_init(&amp;amp;key_descr.key_device_list);
    mac_table_init(&amp;amp;key_descr.key_usage_list);

    key_id_lookup_descr.size = KEY_LOOKUP_SIZE_FIVE;

    /* Add our entries to the tables */
    for (u8_cntr = 0; u8_cntr &amp;lt; MAX_PAIR_DEV; u8_cntr++)
    {
        memcpy(key_id_lookup_descr.data, a_KeyLookupData[u8_cntr], KEY_LOOKUP_SIZE_FIVE_VAL);
        status = mac_table_item_set(&amp;amp;key_descr.id_lookup_list,
                                    &amp;amp;key_id_lookup_descr.table_service,
                                    MAC_KEY_ID_LOOKUP_LIST, u8_cntr);

        ASSERT(status == MAC_SUCCESS);

        …
        
    }&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The settings from my 802_15_4_config.h:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define CONFIG_MAC_KEY_TABLE_SIZE 8
#define CONFIG_MAC_DEVICE_TABLE_SIZE 8
#define CONFIG_MAC_SECURITY_LEVEL_TABLE_SIZE 8
#define CONFIG_MAC_KEY_ID_LOOKUP_LIST_SIZE 8
#define CONFIG_MAC_KEY_DEVICE_LIST_SIZE 8
#define CONFIG_MAC_KEY_USAGE_LIST_SIZE 8
#define CONFIG_IEEE_ADDRESS 0x0123456789ABCDEFULL&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Allan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 802.15.4 precompiled library limited</title><link>https://devzone.nordicsemi.com/thread/362876?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 13:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd200849-35a9-48f2-b7a4-1751d6be46b9</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Allan,&lt;/p&gt;
&lt;p&gt;What is the error code returned by mac_table_item_set()? This will tell you whether the issue is because the table index is out of range or because there is not enough dynamic memory to put the item into the security table.&lt;/p&gt;
&lt;p&gt;What are you sending in as parameters of&amp;nbsp;mac_table_item_set()? The id parameter is used to let mac_table_item_set() know the size of the new table item based on what type of table it is, such as MAC_KEY_TABLE, MAC_DEVICE_TABLE etc. If the table index parameter, idx, is larger than the size of the table item you will get an error that the table index is out of range, MAC_INVALID_INDEX. You can find the table sizes of the different types of tables in 802_15_4_config.h, such as CONFIG_MAC_DEVICE_TABLE_SIZE for MAC_DEVICE_TABLE.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>