hi all
I'm using SimpliciTI1.2.0, with CC430F6137 as End-Device and CC430F6137 as Access Point.
I'd like to realize very easy network with only 1 AP and only 1 ED.This will be extended to be a AP and 15 ED's at the end of the day
I have several pairs AP+ED in my lab, and I'd like that the AP can receive data only from "its own" ED with the correct LINK/JOIN token.
I have changed each STAR network configuration to have its own LINK/JOIN TOKEN.
On each AP the JOIN/LINK TOKEN and Deveice Address is the same
On the ED's the JOIN/LINK TOKEN is the same as the AP but the Deveice address is different.
All the deveice work on the same frquence: 868MHz
The default LINK and JOIN token is changed with:
//JOIN TOKEN
//After getting DEFAULT_LINK_ADDRESS and DEFAULT_JOIN_ADDRESS from FLASH make sure to apply to IOCTL_OBJ_TOKEN
//set the join token via IOCTL
//ioctlLocalToken initialised above in main as type ioctlToken_t in nwk_type.h;
//First set what token type you want to get == TT_JOIN
ioctlLocalToken.tokenType = TT_JOIN;
//Now get the join token via IOCTL
SMPL_Ioctl(IOCTL_OBJ_TOKEN, IOCTL_ACT_GET, &ioctlLocalToken);
//Now set the new join token variable
memcpy(&ioctlLocalToken.token.joinToken, SERIAL_NO, 4);
SMPL_Ioctl(IOCTL_OBJ_TOKEN, IOCTL_ACT_SET, &ioctlLocalToken);
//LINK TOKEN
//After getting DEFAULT_LINK_ADDRESS and DEFAULT_JOIN_ADDRESS from FLASH make sure to apply to IOCTL_OBJ_TOKEN
//set the link token via IOCTL
//ioctlLocalToken initialised above in main as type ioctlToken_t in nwk_type.h;
//First set what token type you want to get == TT_LINK
ioctlLocalToken.tokenType = TT_LINK;
//Now get the join token via IOCTL
SMPL_Ioctl(IOCTL_OBJ_TOKEN, IOCTL_ACT_GET, &ioctlLocalToken);
//Now set the new join token variable
memcpy(&ioctlLocalToken.token.linkToken, SERIAL_NO, 4);
SMPL_Ioctl(IOCTL_OBJ_TOKEN, IOCTL_ACT_SET, &ioctlLocalToken);
Example:
STAR1:
AP1: JOIN TOKEN = 0xAAAAAAAA; LINK TOKEN 0xAAAAAAAA; DEVICE ADDRESS 0xAAAAAAAA
ED1: JOIN TOKEN = 0xAAAAAAAA: LINK TOKEN 0xAAAAAAAA; DEVICE ADDRESS 0xBBBBBBBB
STAR2:
AP2: JOIN TOKEN = 0xCCCCCCCC; LINK TOKEN 0xCCCCCCCC; DEVICE ADDRESS 0xCCCCCCCC
ED2: JOIN TOKEN = 0xCCCCCCCC: LINK TOKEN 0xCCCCCCCC; DEVICE ADDRESS 0xDDDDDDDD
If I power the STAR1 network first everything links and joins perfect
If I power the STAR2 network first everything links and joins perfect
If I power the STAR1 and STAR2 network simultaneously then I see duplicate messages for the JOINING and LINKING
See image: " Duplicate messages RF Packet sniffer.png"
I can see that both AP1 and AP 2 is replying to a joining/linking device although only one has a valid JOIN and LINK TOKEN
Then when doing a poll I see that the AP2 is replying to ED1 polling messages but the addresses in the sniffing messages is still that of the STAR2 network, but I can see that it is AP2 replying to ED1 polling messages because if tI move the sniffer closer to AP2 the RSSI is stronger that when closer to AP1,
Close to AP1
Close to AP2
Why is the AP's replying to ED's that does not have it unique STAR JOIN/LINK TOKENS
Thanks in advance, Martin
PS: Below SimpliciTI configuration.
SIMPLICITI NETWORK
DEFAULT_JOIN_TOKEN=0x06060708 //changed at run time to be unique for each STAR network
DEFAULT_LINK_TOKEN=0x02020304 //changed at run time to be unique for each STAR network
MAX_HOPS=3
MAX_HOPS_FROM_AP=1
MAX_NWK_PAYLOAD=9
MAX_APP_PAYLOAD=10
EXTENDED_API
BSP_NO_DEBUG
APP_AUTO_ACK
AP's
NUM_STORE_AND_FWD_CLIENTS=15
AP_IS_DATA_HUB
MRFI_CC430
NUM_CONNECTIONS=15
SIZE_INFRAME_Q=15
SIZE_OUTFRAME_Q=15
THIS_DEVICE_ADDRESS={0x78, 0x56, 0x34, 0x15}
NVOBJECT_SUPPORT
ACCESS_POINT
STARTUP_JOINCONTEXT_ON
TIASCRC
HOST_FLAG = BIT1
HOST_IFG = P2IFG
VECTOR=TIMER0_A1_VECTOR
TIMERA0_VECTOR=TIMER0_A0_VECTOR
ED's
THIS_DEVICE_ADDRESS={0x80, 0x56, 0x34, 0x15}
MRFI_CC430
NUM_CONNECTIONS=15
SIZE_INFRAME_Q=15
SIZE_OUTFRAME_Q=15
NVOBJECT_SUPPORT
END_DEVICE
END_DEVICE_WALLSTAT
RX_POLLS
VECTOR=TIMER0_A1_VECTOR
APP_AUTO_ACK

