Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years ago.
Receive Downlink message
Hi all !
I am using Senet gateways and I was wondering how can I parse/use the message sent by downlink through gateway ? Which function has ability to capture the message ? Is it in the user library or xdot library ?
Thank you
Question relating to:
1 Answer
7 years ago.
Hi Parshad,
I have a mDot but the process should be the same for a xDot.
If you look inside mDot.h you should find this function:
/**
- Fetch data received from the gateway
- this function only checks to see if a packet has been received - it does not open a receive window
- send() must be called before recv()
- @param data a vector to put the received data into
- @returns MDOT_OK if packet was successfully received
- / int32_t recv(std::vector<uint8_t>& data);
This function should be called after you have sent some data to the gateway.
You must first send a packet to the gateway dot->send(data); std::vector<uint8_t> recv_data; int32_t ret_value;
ret_value= dot->recv(recv_data);
Hi Jaco,
Thank you for the answer. Implementing that I was able to get the data but unable to fetch the data from recv_data. In other words, I am seeing the vector length of recv_data to be 0 everytime. Any suggestions ? I have posted another question with more details here:
https://os.mbed.com/questions/79512/Xdot-unable-to-capture-Downlink-message/
Thank you
posted by 13 Nov 2017