Home     Company     Products     Services     Community     Download     Store
    [Home arrow Community arrow Forum ]
Community
Community
Login Form





Lost Password?
No account yet? Register
Evidence Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:OpenZB module (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: Re:OpenZB module
#202
stefanelli (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:OpenZB module 3 Months ago Karma: 0  
Thank you for the demo.
Now the system works, anyway I still have a compiler error because it marks as not found the header Nwl.h, here there is the compilator error:
- nwl/Nwl.h: No such file or directory,
anyway the compilation terminate successfully, I think it's only a bug of the compiler and so I want to point out it.

I need to manage the radio channel and the GTS mechanism. I have difficulty to understand the code without a guide, so can you tell me how can I set the GTS?

Thanks,

Marco
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#203
chris (Moderator)
Moderator
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Re:OpenZB module 2 Months, 3 Weeks ago Karma: 0  
For the compiler you are quite right, it shall be fixed in future, so don't care.

In order change the default radio channel, which is 26, you can use the this compiler directive -DOPENZB_CHANNEL=25; in this example I selected channel 25.
You can set this in the .oil (here there's an example).

Code: :

CPU mySystem {                  OS myOs {                                  LIB = ENABLE { NAME = "ieee802154"; };                 CFLAGS = "-DDEVICE_TYPE_COORDINATOR";                                 CFLAGS = "-DOPENZB_CHANNEL=25";         };          };



Now let's go the GTS problem.
Since the 802.15.4 stack has been released in preliminary version the GTS allocation mechanism is statically implemented in the library source code.
To allocate GTS you should modify the Mac.c file in the ieee 802.15.4 library path.

So open the file evidence_root_dir/ee/contrib/ieee802154/libsrc/mac/Mac.C, where evidence_root_dir is tipically c:EvidenceEvidence, end change the init_mac() function in the section reported below.
Code: :

#ifdef DEVICE_TYPE_COORDINATOR                 init_GTS_db();                 init_GTS_null_db();                 init_gts_slot_list();                 init_available_gts_index();                 //add_gts_entry(4,1,0x1234,7);                           //add_gts_entry(4,0,0x0002,7);                 add_gts_entry(1,1,0x1234,11);                 add_gts_entry(1,0,0x0002,11); #endif


You can explicitly specify the allocation of the GTSs by means of the add_gts_entry() function.
The usage of the function is:

add_gts_entry(gts_length, direction, dest_address, start_slot_index)

  • gts_length: Number of slots to allocate (max 15)

  • direction: 0=send, 1=receive

  • dest_address: destination address

  • start_slot_index: starting slot for the allocation of the GTSs (from 1 to 15)




NOTE:

  • The start_slot_index is a test parameter, sorry ,and it shall be removed in future. Set this so that the gts_length does not overflow the 15th slot.

  • The addresses are statically defined in the source code: 0x1234 is the coordinator, 0x0002 is the device.

  • The allocation of the GTS must be done for both transmission and reception.


Let's consider the example above to make it clear.
Code: :

add_gts_entry(1,1,0x1234,11); add_gts_entry(1,0,0x0002,11);


The first line allocate one GTS in reception mode for the coordinator in the 11th slot, the second line allocate the same GTS in transmission mode for the coordinator.
Don't forget that to send in GTS mode you have to set to one the last parameter in the openZB_send_bytes() function.

I hope that's will help you.
Regards,
Christian.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/11 10:23 By chris.
  The administrator has disabled public write access.
#283
stefano (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:OpenZB module 2 Months ago Karma: 0  
Hello,

I have two c2420 radios connected to two Flex.
I use for the comunication the demo released in this topic and I have followed your instructions to set the GTS mechanism, but it does't work correctly. Whithout GTS the comunication works, while using GTS the radios don't comunicate.
I have watched the code and I have seen that in file "mac.c" the function "start_coordinator_gts_send()" is fully commented and the task "send_gts_after_inter_frame_arrivalTask" probably isn't complete.
So I want ask you if the GTS mechanism is completly implemented in the demo or not. If not, what is done?

Bye,

Stefano
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Evidence S.r.l. - PIVA: 01638690501
Via Carducci 64/A - Ghezzano - Pisa - Italy
Privacy Policy