I use BitCloud v13 on ATZB-A24-UFL.
My problem is like this:
I have network with COORDINATOR(gateway to PC through UART) and few nodes ROUTERS or END DEVICES.
My application on COORDINATOR "crushes"(messed state machine I suppose) when I'm receiving something on UART(information sended from PC to some node) and in the same time I receive some
information on COORDINATOR form one node(doesn't matter which one) through APS_DataInd().
So UART communication is interrupted by APS_DataInd() function.
And also can be vice versa APS_DataInd() function is interrupted by USART.
So both actions(let's call it that way) UART and APS_DataInd() can happen at random times on COORDINATOR.
I use UART in callback mode.
I noticed that if I send 20 bytes of data to COORDINATOR by UART usartMessageReceived(uint16_t readBytesLength) function is called 20 times, so each time for each byte that is received.
Can I make it that usartMessageReceived(uint16_t readBytesLength) is called ONLY ONCE and then I have these 20 bytes?
How to achieve that?
Can I solve this problem by using APS_StartReq() and APS_StopReq() eg. when COORDINATOR starts receiving UART message, APS_StopReq() function is called in usartMessageReceived(uint16_t readBytesLength) to stop processing incomming messages
Or can you suggest me another way?
Thank you !
Best regards !