I had queries regarding operating the mDot in European Channel. I know there are more air time/duty cycle restrictions on the European LORA channel. I was looking the Multitech’s github examples for programming against mDot. Here is the code below in dot_util.cpp.
int send_data(std::vector<uint8_t> data) {
int32_t ret;
ret = dot->send(data);
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 {
logInfo("successfully sent data to %s", dot->getJoinMode() == mDot::PEER_TO_PEER ? "peer" : "gateway");
}
return ret;
}
So my first question because of the air time/duty cycle restrictions in Europe don’t we need to call the mdot api like shown in the code below, which was something similar that used to be in the older dot examples. Don’t we need to call these api before calling the send method or the latest mdot api send method handles this internally?
if (m_dot->getNextTxMs() > 0 || m_dot->getIsTransmitting()) {
return;
}
Second question don’t you have to add the check while attempting to Join the network as well?
Thanks,
Ajay