[LW Mesh] Broadcast and unicast

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi !

I have problem with BROADCAST transmission in LW Mesh.

What I would like to do is sending BROADCAST and UNICAST(acknowledge) messages.
I know that BORADCAST in NOT ACKNOWLEDGED.

I have 2 nodes COORDINATOR(conected to PC via USART) and ROUTER.

Unicast works OK.
When I send BORADCAST message form COORDINATOR, ROUTER receives message OK, but then COORDINATOR gets stuck somehow.

When I reset COORDINATOR and send UNICAST to ROUTER it works OK and again when I send BROADCAST to ROUTER, COORDINATOR gets stuck.

That's why I think problem is COORDINAOTR.

Here is my code for sending message on COORDINAOTR:

static void sendMessage(uint16_t addr)
{
	.... // formating payload
	
	
	appNwkDataReq.dstAddr		= addr;							
	appNwkDataReq.dstEndpoint	= APP_ENDPOINT;
	appNwkDataReq.srcEndpoint	= APP_ENDPOINT;
	
	if(addr == 0xFFFF)
	{
		appNwkDataReq.options = NWK_OPT_ENABLE_SECURITY;		// don't reguest ack.
		
		appState = APP_IDLE_STATE;
	}
	else
	{
		appNwkDataReq.options	= NWK_OPT_ACK_REQUEST | NWK_OPT_ENABLE_SECURITY;
	
		appState = APP_STATE_WAIT_CONF;
	}
		
	appNwkDataReq.data		= (uint8_t *)&appMesage;
	appNwkDataReq.size		= sizeof(appMesage);
	appNwkDataReq.confirm		= appDataConf;
	
	NWK_DataReq(&appNwkDataReq)
}

Have I forgotten some parameter?

If you need additional information, please say.

Thank you !

Regards!

Last Edited: Fri. Oct 16, 2015 - 02:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You still need to wait for the confirmation even with broadcast messages.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:
You still need to wait for the confirmation even with broadcast messages.

Hi!

By confirmation you mean : appDataConf(NWK_DataReq_t *req) ?

Could you tell me what this parameter do:
appNwkDataReq.options = NWK_OPT_BROADCAST_PAN_ID;

Is this parameter obligatory when sending BROADCAST message?

Thank you !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, you need to change state to APP_STATE_WAIT_CONF in any case.

Broadcast PAN ID is exactly what it says - send a message to a broadcast PAN (0xffff). It is very unlikely that you need this parameter, it is not required to send a broadcast message.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.