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.
5 years, 10 months ago.
How to disable receiver in mdot?
I want my mdot to just transmit data without opening the receive window. Please tell me how to disable the receiver so that I can save power.
Question relating to:
2 Answers
5 years, 10 months ago.
I'm not sure you will be able to. The protocol requires those slots for MAC communication. The ADR scheme uses those slots to update the data rate that the device must use and when your device sends join requests it must be able to receive a response?
Thanks for the response. I am just trying to stop receiver after data transmission. For example, in class A the device opens a receive window after transmission. I am just curious that can we force the device not to open those receive windows. All other functions can stay untouched.
posted by 05 Feb 20195 years, 10 months ago.
See mDot.h functions send() and closeRxWindow().
Call dot->closeRxWindow() or put the device to sleep after a non-blocking send. If ACK is enabled the device cannot perform a non-blocking send.
The loss of network connectivity as described by Jaco should also be considered.
Thanks for your response. mdot.h says that closeRxWindow() can only be used with AT commands but I am using the standard mdot library.
I am using the ota-example template for the application. I already have my ACK disabled. Here is how I am calling send function.
send_data(tx_data); sleep_wake_rtc_or_interrupt(deep_sleep); } ////////////////////
void send_data(std::vector<uint8_t> data) { uint32_t ret; ret = dot->send(data); dot->cancelRxWindow(); / Shall I try using closeRxWindow() here? if (ret != mDot::MDOT_OK) { logError("failed to send data to %s [%d][%s]", dot->getJoinMode() == mDot::PEER_TO_PEER ? "peer" : "gateway", ret, mDot::getReturnCodeString(ret).c_str()); } else { dot->cancelRxWindow(); logInfo("successfully sent data to %s", dot->getJoinMode() == mDot::PEER_TO_PEER ? "peer" : "gateway"); dot->cancelRxWindow(); } }
Kindly suggest shall I call sleep function after dot->send(data) within the send_data? Isn't the send(data) function calling the receive function? I am fairly new to this technology kindly help.
posted by 05 Feb 2019