This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problem with beaconed 802.15.4 communications

I trying to establish communications with a (non Nordic) beaconed 802.15.4 coordinator.

I've used some code from the wireless_uart_raw example but did not use the FSM.

If I set a_rx_on_idle_set() to 1 I can associate with the coordinator fine. However it only sees the beacon for about 30 times and then does not see it any more (as reported by mlme_beacon_notify_ind). If I try syncing with the beacon (after association) it does not see it all and there is no sync error report. There seems to be no response to sync at all.

I'd expect mlme_beacon_notify_ind to report every beacon thats seen since a_rx_on_idle_set is 1.

I'd expect sync to do something.

Any idea whats going on.

I tried this with SDK 15.2.

kind regards

Liam

  • Hello,

    I am sorry. What do you mean by "syncing with the beacon"?

    Where are you looking at these beacons? Do you use a sniffer?

    It isn't really easy to say whats going on, since I don't know much about your application. Could you share a bit more on how you do it?

    Did you enable logging in your project? If so, does the log say anything? When you stop seeing the beacons, have you tried debugging? Is the application still running, or did it stop somewhere in an error handler or a hardfault?

    If you don't use the FSM, how do you trigger the beacon packets?

  • Hi Edvin,

     Thanks for getting back to me.

     I am working on an endpoint and am trying to get it to working with a beaconed coordinator. I'm just calling sys_task_run(); in my main loop. app_task_handler() is empty.

        uint32_t tick = u32ArgGet1ms_Ticks() + 1000;
        while (true)
        {
            sys_task_run();
    		
    		static teEndState last_state = 0xff;
    		teEndState state = tUpdateLinkState();
    
    		if (state != last_state)
    		{
    			last_state = state;
    			
    			NRF_LOG_INFO("State=%u", state );
    		}
    	}

     Logging is enabled. Output is below after associating after the passive scan. =PAN:0x889 is output in mlme_beacon_notify_ind(). After a few seconds they stop because mlme_beacon_notify_ind is not longer being called ( I put a breakpoint on it ). Definitely not a hard fault because I have a handler for that.

    <info> app: Wireless UART example started.
    <info> app: Hello
    <info> app: Init ...
    <info> app: Addr = 89ABCDEF
    <info> app: Addr = 8D1500
    <info> app: SAS:800  
    <info> app: SR:0, 0 
    <info> app: State=1
    <info> app: HAS:0,2, 
    <info> app: List sz=1 889
    <info> app: Pan:0x 889 Ch:0xB Starting Association
    
    <info> app: State=2
    <info> app: Associated,AD:1 
    <info> app: State=5
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889
    <info> app: =PAN:0x889

    By sync I mean setting the MAC to synchronise with the beacon from the coordinator. This I'd expect to call after the end of the passive scan - so I call 

    #include "mac_mlme_sync.h"
    
    void mlme_sync_loss_ind( mlme_sync_loss_ind_t * ind)
    {
    	NRF_LOG_INFO("Sync Loss :%u", ind->loss_reason );
    }
    
    void StartSync( uint8_t channel )
    {
    	static mlme_sync_req_t  sMlmeReqRsp;
    	sMlmeReqRsp.logical_channel = channel;
    	sMlmeReqRsp.track_beacon = true;
    	mlme_sync_req( &sMlmeReqRsp );
    }

    but I see no response either in the handler or my code.

    Hope that makes things a bit clearer

    regards

    Liam

  • Hi,

     Any update on this please?

     How am I supposed to use mlme_sync_req?

     I preceded it with 

      a_pan_id_set( PAN_ID );

    which I presume is enough for the sync to occur and then start association.

    kind regards

    Liam

  • Hi Liam,

    Sorry for the late reply. I took over this case after Edvin went out on vacation.

    I would start with checking if the coordinator for some reason stop sending beacons or if the device stops receiving them. To verify it I would use the nRF Sniffer for 802.15.4: https://github.com/NordicSemiconductor/nRF-Sniffer-for-802.15.4

    Check if beacons are generated when the device stops receiving them.

    One question for you, is the device in rx-on-when-idle or is it in rx-off-when-idle, could you clarify?

    Another question, is there an inactive period enabled in the superframe?

    Best regards,

    Marjeris

Related