Changing panId

Added by Julien D 5 months ago

Hello,

I'm building an coordinator app (running on CC2530) that will listen to radio data on panId 11 and output it through uart.

First step for me is getting frames from other end devices.

I started from zdo_startup test project. Here's what I did :

- commented out ZB_ED_ROLE from project defines. Result is:

ZB_PLATFORM_8051_SIM
ZB_CC25XX
ZB_IAR
ZB_SECURITY
xZB_ED_ROLE
xZB_TRACE_LEVEL=2
xZB_TRAFFIC_DUMP_ON

- exclude from build : zdo_start_ze.c and zdo_start_zr.c

- include from build : zdo_start_zc.c

- Put a breakpoint in data_indication

- In MAIN function, I changed the line
" MAC_PIB().mac_pan_id = 0x1aaa;"
to
" MAC_PIB().mac_pan_id = 11;"

I also tried to replace this line by:
" zb_transceiver_set_channel(11);"

It compiles, executes. But the app never reaches the breakpoint in data_indication. I suspect it should be because I did setting panId in a wrong way or maybe a misconfiguration of the project.
What do you think?

Thanks
Julien


Replies (3)

RE: Changing panId - Added by DSR Support 5 months ago

Hello Julien,
It looks like from your message that you mixed up the channel and the PAN ID terms. The channel stands for the transceiver configuration - the frequency it's working on. The PAN ID is the identifier of a network created by your coordinator. It seems that it's the channel you're trying to switch and the function you're using is right, except the fact there is no reason to replace the PAN ID setting code with the channel one.
Regarding the data_indication problem, you need to make sure that the end device you're working with successfully joins your coordinator and sends the test data. It'll join regardless the PAN ID you select, the devices just must operate on the same channel in this particular test.

RE: Changing panId - Added by Julien D 4 months ago

Hello

Thanks for your answer.
Back to business!

If I understand you correctly, I kept only
zb_transceiver_set_channel(11);

and restored :
MAC_PIB().mac_pan_id = 0x1aaa;

The device I'm listening to is a "black box" but I'm sure it sends data. I can see it using CC2530 and TI packet sniffer.
Here's a screenshot of a frame:

Are there other parameters to set?

Thanks
Julien

sniffer2.jpg (89.9 kB)

RE: Changing panId - Added by Julien D 4 months ago

If it helps, the device is a green power device.

(1-3/3)