Unable to receive 802.15.4 beacon frame when coordinator in beacon mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to receive 802.15.4 beacon frame when coordinator in beacon mode

1,975 Views
pg
Contributor I

I'm unable to receive 802.15.4 beacon frame when using beacon mode.

I have imported frdmkw41z_wireless_examples_ieee_802_15_4_mwa_coordinator_freertos as a coordinator and frdmkw41z_wireless_examples_ieee_802_15_4_mwa_end_device_freertos as end device.

My SDK version is 2.2.1 and Manifest version is 3.0.0.

I have set up a breakpoint of end_device in 

App_HandleScanActiveConfirm

to check the result of scanning.

When I'm using the coordinator as in the example, the scanning returns information about data from beacon frame sent as a response to active scanning.

But when I change the coordinator code to work in beacon mode (I have set BeaconOrder and SuperframeOrder both to 1 - as in "802.15.4 Media Access Controller (MAC) MyWirelessApp User’s Guide, Rev. 1.5"), scanning returns no information.

I haven't changed end_device code, because with BO=1 beacons should be sent every 30.72 ms and default scan time of end device is over 122.88ms. Also Active scan should yeild the same results as Passive in this case (to make sure I have tried both).

Well I have tried a lot of other things, but to make sure that my changes were not to blame, I have reverted to the pure examples.

I know that the example won't let me to associate to PAN coordinator, but the point is that I'm unable to find any network in the first place.

I don't even know whether the problem is the coordinator not sending beacons or end_device not receiving them.

Is there something obvious (or less obvious) that I'm missing ?

Labels (2)
Tags (1)
0 Kudos
6 Replies

1,861 Views
pg
Contributor I

Does it mean that your 802.15.4 stack does not support beacon mode?

0 Kudos

1,861 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Pawel,

The issue is because the example is selecting a different lib file that doesn't allow a periodic beacon.

 

Please look at the configuration and the changes that I did.

/* 
 * 802.15.4 MAC configuration 
 */
#define gMacFeatureSet_d gMacFeatureSet_06BEGTSM0_d //gMacFeatureSet_06M0_d [MC]

 

You have to add the lib802.15.4_mac_06begts_cm0.a lib file, you could copy from the SDK

"KW41SDK\middleware\wireless\ieee_802_15_4_5.3.8\mac\lib\lib802.15.4_mac_06begts_cm0.a"

 

pastedImage_1.png

 

Also, we have to add this lib in the linker file into the properties.

 

pastedImage_2.png

Regards,

Mario

0 Kudos

1,861 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Pawel,

I am still checking this particular issue. I will get back to you internally.

Regards,

Mario

0 Kudos

1,861 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Pawel,

I am sorry for my late response. I am checking your issue, and get back to you as soon as possible.

Regards,

Mario

0 Kudos

1,861 Views
pg
Contributor I

Hi Mario,

I was trying to describe my changes in the post, but maybe it'll be clearer if I paste them:

In coordinator example in file mwa_coordinator.c in function App_StartCoordinator I have changed lines 656-659 from:

    /* Beacon Order - 0xF = turn off beacons */

    pStartReq->beaconOrder = 0x0F;

    /* Superframe Order - 0xF = turn off beacons */

    pStartReq->superframeOrder = 0x0F;

to:

    /* Beacon Order - 0xF = turn off beacons */

    pStartReq->beaconOrder = 0x01;

    /* Superframe Order - 0xF = turn off beacons */

    pStartReq->superframeOrder = 0x01;

I did no more changes.

Unfortunately I don't have the sniffer, yet. But I have set up a third board to perform passive scanning in the loop. Each time it receives a beacon frame it toggles it's LED. I can see that the LED was chaging before the changes above. With the changes above, the LED stays in the initial state. So I assume that the issue is with the controller.

Scan request is a success - otherwise it won't be waiting for ScanConf (I have checked it with a debuger to confirm it).

In the end device I have set up a breakpoint in App_HandleScanActiveConfirm - just at the beginning of the function - line 760 in mwa_end_device.c:

  uint8_t panDescListSize = pMsg->msgData.scanCnf.resultListSize;

Vale of pMsg->msgData.scanCnf is:

status = gNoBeacon_c

scanType = gScanModeActive_c

channelPage = gChannelPageId0_c

resultListSize = 0

unscannedChannels = 0

Regards,

Paweł

0 Kudos

1,861 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Pawel,

I hope you are doing great.

Is it possible that you could provide the changes that you did?

Dop you have a sniffer? We could double-check if the coordinator is sending the beacon over the air.

Did you enter into debug mode and check the return value for the scanning API? is it a success?

Regards,

Mario

0 Kudos