This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AP as Data HUb, ED does not join the AP

Other Parts Discussed in Thread: CC2500, MSP430FG4618, SIMPLICITI

in the AP as data hub application,  how does the ED know how to find the AP?

I think that the " smplStatus_t nwk_join(void)" function is where the ED "finds" the AP, and then starts trying to join it. However, the "apAddr " variable never fills with anything resembling the address that is in the "smpl_config_dat" file for the AP.  Is this how things are supposed to be? 

So basically, the ED cannot find the network that the AP is broadcasting, so it doesn't know what network to try and join.  (I think).

Any help?

CCSv4, Simpliciti, MSP430FG4618 exp board, CC2500 EMK, Ap as Data hub.  When trying to load this program on to the boards, they will not join together.   The behavior is that the LED's of the AP are on constantly, and the LED's on the ED's blink continuously.  Buttons do nothing.  Looking for help with this Debug,
Things I have checked:
Num_connections >0,
the semphore that allows the AP to listen for a new connection ("sJoinSem"), does not ever set
checking the ED for what it sees, when it gets to the function looking for apAddr, nothing returns as successful.

I have not changed any of the "out of box" code.

Paul

  • Hi Paul,

    You found the right place in the code, but the apAddr is not used when sending a join request. The ED will use a broadcast address when trying to join a AP (see ioctl_info.send.addr) that any AP that is up and running will respond to if the JOIN_TOKEN match. Once the ED gets a valid reply for the request, the apAddr will be populated with the address to the access point and then saved using the nwk_setAPAddress():

    The code examples have been tested on the platform you have chosen, so this is a little weird. I assume the, based on the description that static uint8_t sCB(linkID_t lid) is never called on the access point? What about the ED, does it ever leave the while (SMPL_SUCCESS != SMPL_Init(0)) statement?

    Regards,
    Kjetil

  • I will check this in the morning.  Is there a chance we could talk via phone or email?  This is a critical portion of the project I am working on and I have been held up for almost 2 months by this issue.

    I am reasonably sure that the issue is not hardware pased, because I can get the peer to peer application to work.  Is there a way I can revert to an older version of Simpliciti and try that?  Simpliciti will not let me delete/uninstall it for some reason, I had to install to "a location other than C drive" because I am on a 64 bit operating system and I got errors if I attemted anything other than this, but now I cannot delete and install a different version.

    I appreciate the fast response

    Thanks,

    Paul

     

     

  • Hi again Paul,

    Just post here and I'll try to be fast in my response here. A difference between the two examples is that the default setting for the AP as data hub use Frequency Agility while the peer-to-peer does not. Believe that the frequency agility one start off at the same frequency though, but might be something we will have to look into.

    Kjetil

     

  • It is possible that I just do not understand the syntax, but I cannot even find where that function is called in the program on the AP (static uint8_t sCB(linkID_t lid) .  Should it be called in the main?   I found the function definition, but not where it is supposed to be called. 

    this is the only place where I see it at all

    SMPL_Init(sCB); is this the function call?

    In the ED, (SMPL_SUCCESS != SMPL_Init(0))  is never successfully exited.

    Next step?

    thanks,

    paul

     

  • Hi Paul.

    sCB is called in the interrupt context. When the radio receives a message, the SimpliciTI stack processes this message e.g check that everything is OK with the package. decides if it is intended for this device, what simpliciTI port this message is intended for. If the end result is that this is for the application the sCB will be called. 

    Did you try disabling the frequency agility?

    Kjetil

  • Kjetil,

    sorry for the slow reply.  I cannot figure out how to disable frequency agility, I commented out the section that I think implements it, but then I get a bunch of errors when I try to compile/build the project.

     

    Paul

     

  • kjetil,

    actually, not sure what exactly it is that I did. But I got the connection working, however, the devices are not responding as I think they should. 

    According to the app note, when I press a button (1 or 2), the cooresponding LED should toggle on both the AP and the ED on which the button was pressed.  However, when I press either button, only one LED toggles (the Green one) on the ED, however, the correct LED toggles on the AP. 

     

    E.G. press button 1 on an ED, ED has green LED toggle, AP has Green LED toggle

    Press button 2 on ED, Green LED on ED, but Red on AP toggles.

     

    I guess this is kind of a minor problem, but do you have a suggestion for how to fix it so that the application works as intended?

     

    Also, where in the program should I insert my code

     (ADC samples sent to a buffer, when the buffer fills, it should get sent to the CC2500 and transmitted, on other side, it should be output to a buffer and sent out through a DAC, both of these are done using timer a (though, I think timer A is used in simpliciti, so it will be timer b) as the trigger for transfers)

    in order to get data transfered from point a to point b. 

     

    sorry for the barrage and thanks,

     

    Paul