Hello,
I am new in this embeded system and i need your help regarding simpilciti, i am using simplicit v.1.05 and cc2500 with MSP 430. I need your help on very simple matter, i am working on P2P bidirectional example. Just to experiment whats the purpose of link token or link id, i had change the Default Link Token for LinkListenTo and LinkTo smpl_nwk_config.dat file. Then i tried to connect both of my devices and they were connected (:). I am confused on this scenario, because according to the Simpliciti Developers note, Page 17 "The presence of an Access Point is optional. If it is not present the default Link tokens must match in the two End Devices or the listener will reject the Link message by simply not responding." Thats what i am using no AP in middle.I did not only change the Default Link Token in config.dat file but also in nwk_link.c. My question is
What is Link id and Link Token? Is there any difference between them?
According to my understanding one Linkid is initated by the device itself on smplStatus_t_SMPL_Link call. Then this same link id is used for the making the connection between talker device and listener.
Secondly i am trying to send my on own data from one device to another, i am using the same sending and receiving procedure defined for P2P example, but without using LED toggle routine. On compliation my programm didn't show any error or warning, but i am unable to view my output on my sniffer iterface ( i am using packet sniffer). The application payload field only show XXXXXX and nothing else.
Any one out there tried the same application with predefined data, kindly guide me where i am wrong.
static void linkTo()
{
uint8_t msg[2], delay = 0;
while (SMPL_SUCCESS != SMPL_Link(&sLinkID1))
{
// blink LEDs until we link successfully
//toggleLED(1);
//toggleLED(4);
toggleLED(2);
toggleLED(1);
toggleLED(4);
SPIN_ABOUT_A_SECOND;
}
// we're linked. turn off red LED. received messages will toggle the green LED.
if (BSP_LED3_IS_ON())
{
toggleLED(1);
}
// put LED to toggle in the message
msg[0] = 2; // toggle red
//msg
/*while (1)
{
SPIN_ABOUT_A_SECOND;
if (delay > 0x00)
{
SPIN_ABOUT_A_SECOND;
}
if (delay > 0x01)
{
SPIN_ABOUT_A_SECOND;
}
if (delay > 0x02)
{
SPIN_ABOUT_A_SECOND;
}*/
// delay longer and longer -- then start over
delay = (delay+1) & 0x03;
// put the sequence ID in the message
// msg[1] = ++sTxTid;
msg[1] = sTxTid--;
//SMPL_Send(sLinkID1, msg, sizeof(msg));
SMPL_Send(sLinkID1, "HELLO", 6);
Waiting for your kind reply.
Best Regards
R Soul