Changing panId

Added by Julien D 23 days ago


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:


- 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;"
" 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?


Replies (1)

RE: Changing panId - Added by DSR Support 20 days 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.