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.

SimpliciTI broadcast & PacketSniffer



Hi

 

I'm trying to send a broadcast message to all devices in my network. Reading another threads I've found that to send a broadcast message, I must use:

SMPL_SendOpt(SMPL_LINKID_USER_UUD, g_msg_rafaga, MAX_APP_PAYLOAD, SMPL_TXOPTION_ACKREQ);

My question is, that to verify that this message is sent, I've used Packet Sniffer, and I haven't received any broadcast message, although I can see broadcasts messages when one ED tryes connecting to my AP.

Another problem is that I haven't received the broadcast message in my devices. So, what's the problem?

I must use SMPL_Receive(SMPL_LINKID_USER_UUD, msg, &len) to receive the message? I can't use instead SMPL_Receive(sLinkID1, msg, &len)???

If this last issue is true, what I must to receive messages from the AP, and broadcast messages?

 

Thanks you in advance. All suggestions will be welcome.

Regards

 

  • Hello.

    ardoster said:
    I haven't received the broadcast message in my devices. So, what's the problem?

     

    The most likely issue is that EDs default to RX off when the radio comes on. A radio that is on with RX enabled uses way more power. The idea is to turn RX on only when necessary for EDs. You need to be sure that you have turned RX on using the appropriate ioctl call. There are many examples in the sample applications.

    ardoster said:
    I must use SMPL_Receive(SMPL_LINKID_USER_UUD, msg, &len) to receive the message?

     

    Yes. If you want to receive a broadcast message at the application layer that is how you do it.

     

    ardoster said:
    I can't use instead SMPL_Receive(sLinkID1, msg, &len)???

    What would you use as a Link ID value as the input argument to the call? The only way to get a valid Link ID is to have established a connection using the link/linklisten transaction which as a result will return a valid Link ID to each side of the connection. The whole point of the Unconnected User Datagram UUD) Link ID is that you don't need to have estblished a connection previously. Since it isn't connection based everyone can receive it...it behaves like a broadcast.

    lfriedman

     

  • Well, thanks you for your reply.

    In my ED, I've always enabled RX. The purpose of my test is that an AP could send a broadcast message to all its connected ED.

    So, if I've understood you, in the main loop of the EDs, I must add the lines:

    SMPL_Receive(sLinkID1, msg, &len) -> to receive messages from the AP to ONE ED

    SMPL_Receive(SMPL_LINKID_USER_UUD, msg, &len) -> to receive the broadcast messages

    Could you confirm is this correct? Do you have any idea about why I can't see the SMPL_LINKID_USER_UUD messages with the Packet Sniffer?

    Thanks you in advance

    Regards

  • Hello.

    ardoster said:
    In my ED, I've always enabled RX. The purpose of my test is that an AP could send a broadcast message to all its connected ED.

    OK. Good.

    ardoster said:

    So, if I've understood you, in the main loop of the EDs, I must add the lines:

    SMPL_Receive(sLinkID1, msg, &len) -> to receive messages from the AP to ONE ED

    SMPL_Receive(SMPL_LINKID_USER_UUD, msg, &len) -> to receive the broadcast messages

    Could you confirm is this correct?

    Yes, assuming that the first case was a connection created using the Link/LinkListen transaction and the Link ID is valid.

    ardoster said:
    Do you have any idea about why I can't see the SMPL_LINKID_USER_UUD messages with the Packet Sniffer?

    Sorry, no  I don't. There is nothing special about those frames that would prevent the sniffer from seeing them. Have you verified that the transmitting side is actually sending the frame and that there is no point in the sending execution thread a non-success occurs?

    lfriedman

     

  • Thanks you for your replies.

    I've corrected the code in my ED to add the SMPL_Receive(SMPL_LINKID_USER_UUD.... ) and now looks like that works: I can receive the broadcast frame. But it's a little strange that I can't see this frame using Packet Sniffer. Rare, no?

    Thanks you!