Martin Pelletier
Forum Replies Created
-
AuthorPosts
-
Martin PelletierParticipant
I found my problem 🙂 The mdot was not concerned!!!
The mdot works good under -20°CMartin PelletierParticipantHi Mark,
your libmdot and mbed are correct!!i dont know if it could help you!!
But my code here works…mDot* dot;
Main()
{
static DigitalIn ATBIn(XBEE_CTS);
InterruptIn event(XBEE_CTS);
ATBIn.mode(PullDown);
While (1)
{
dot->sleep(intervalSleep, mDot::RTC_ALARM_OR_INTERRUPT, false);
//note: wake up on rising edge only
}
}Regards,
MartinMartin PelletierParticipantOk
thx for the info 🙂Best regards,
MartinMartin PelletierParticipanti found something posted by Lucian Corduneanu 20 Jul 2017.
Concerning the analog input does not work after a sleep(). It is about the ADC clock …
I put this code just after the sleep function and it works!!
// Enable the HSI (to clock the ADC)
RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
HAL_RCC_OscConfig(&RCC_OscInitStruct);Martin PelletierParticipantHi Simon,
Tx frequency is 0!! ->AT+TXF=your frequency. I believe if you dont have the right frequency for your mdot, it will not support it!! Check the model description just to be sure.Other thing the mdot library has to follow the mbed-os
ie lib mdot 3.0 for mbed-os 5.4.7 (otherwise you could get some weird behavior)regards,
MartinMartin PelletierParticipantHi Mike,
thx for your helps!!I found a simple manner to sync each slave and give them a time slot where it will be (one – one). Now, the RX error CRC has disappeared.
Hence, we could make multi-slaves to one master, if we manage the sync between them. Otherwise, we could encounter some erratic bug!!!
cheers,
MartinMartin PelletierParticipantHi Mike,
it is possible to sync up all slaves! (it means start at the same RTC) and after gave a slice of time for each slave (the first 100ms for the first and so and so)do you have any examples? or which function do you take?
best regards
MartinMartin PelletierParticipantHi Mike,
is it possible to put the mdot just in transmitter (receiver disable)?I have a better idea why i got the CRC error:
The Rx CRC happens when the mdot sends a message and at the same time it receives another message (as full duplex). After this state, the transmitter sends nothing (send failed) until the receive a good message.Cheers,
MartinMartin PelletierParticipantHi Mike,
version 2.0.16 with 5.3.4
building my own program with send(), recv() and sleep(1, mDot::RTC_ALARM, false)
after attempting LoRa communicationis it possible to bypass the CRC? or Checking error in order to send all the time even if something is bad because if the crc error is detected then the next send message will be failed and need to reset the mdot.
In debug mode, i got this:
Radio Rx CRC error
Link state 6
Rx error
mdotEvent- Rx error
Send with tx timeout 5000
Send failed: code 10
Entering sleep (stop) mode 0000037
Send with tx timeout 5000
Send failed: code 10
Entering sleep (stop) mode 0000037
Send with tx timeout 5000
Send failed: code 10regards,
MartinMartin PelletierParticipantHi Mike,
i made other tests with debug mode and trace mode.
and when i got this error ‘Radio Rx CRC error’ after that the mdot generate ‘send failed: code 10’ for the next radio sending and more.If i disable the CRC ( dot->setCrc(false) ), the slave interface works pretty good. I don’t need the CRC because on my own peer to peer star network, i already manage it!!
regards,
Martin PelletierParticipantHi Mike,
if i got send error, do i need to do something if i want to send it again?
(add delay, clear buffer, init something??)
if i have 3 send errors in a row, i do this: dot->resetCpu() but it is drastic!!!Ack_timer.start();
while ((_dot->getIsIdle() == false) && (Ack_timer.read_ms() < timeout));
Ack_timer.stop();
Ack_timer.reset();
if (_dot->getIsIdle())
{
status = _dot->send(SendVector,false);
if (status == mDot::MDOT_OK)
…..
}regards,
Martin PelletierParticipantGreat thanks Mike for your help!! Very appreciated 🙂
I am gonna replace it with getIsIdle() and see it…Concerning the battery issue, we have tested a slave at least 4 times with a discharged battery and sounds good up to now.
regards,
Martin PelletierParticipantHi Mike,
if i increase the interval, yep the issue goes away!But i use this function before to use the send()
if (!_dot->getIsTransmitting()) //true if currently transmitting
…Should i use other thing? ie getIsIdle() to be sure the receiver is ok too. Because i think if i use multiple slaves, each slave receives the packet of the other slaves not only the master ack. So if the slave try to send a packet while the receive a packet from other slaves, is it possible this will generate the send error??
Note: I have my own protocole and slaves packet are always rejected from slave receiving because it waits for specific ack packet.
regards,
Martin PelletierParticipantAnother subject:
I used peer to peer with 4 slaves (wake up every second and send their status) and one master (receives their messages and send them an ACK).
It is working!!But sometime I got this error on one slave debug port: [ERROR] Send failed : code 10. Do you know what does it mean? Is it because it sends a message at the same time than another slave?
regards,
Martin PelletierParticipantOk i will be aware about matching both of them. I am using the API.
i was a bootloader firmware and i erased my flash and reprogrammed my node id and now it is working fine 🙂
so i am little afraid because i was last update!!
i will put the mbed-os 5.3.4 and i will make some test with batteries almost discharged.
regards,
Martin PelletierParticipantThx Mike,
very appeciated!!My software used this library:
mbed-os -> 2742:5faf4b2
libmdot-dev-mbed5 -> 80:e85c370is it correct? or should i used somthing else?
regards
Martin PelletierParticipantHi M.Reiss,
i use recv() function in peer to peer modehere a sample of my code:
bAckReceived = false;
status = _dot->send(SendVector,false);
if (status == mDot::MDOT_OK)
{
// wait for send to finish
int cntA = 0;
while (_dot->getIsTransmitting() && (cntA < 10))
{
cntA++;
osDelay(10);
}
if (cntA < 10)
{
data.clear(); //5dec16
Ack_timer.start();
while ((bAckReceived == false) && (Ack_timer.read_ms() < 200))
{
if (_dot->recv(data) == mDot::MDOT_OK)
{
bAckReceived = true;
DecodeRX(data, foundAA, found49, index);
}
}
Ack_timer.stop();
Ack_timer.reset();
}
}
else
{
_dot->getSerialClearOnError();
osDelay(15); //5dec16
}thx a lot !!
Martin PelletierParticipantHi M.Hussian,
i used the node id. Each mdot has its own node id of 8 bytes (see the label). this ID is located into the flash. It is possible to modify it if you want but need a special firmware.once we use it, the master can receive all node messages but if it knows which ID is waiting it could filter all other messages.
Regards
Martin PelletierParticipantHi Farrukh,
i am developing hybrid system (canbus and rf in peer to peer) and i used one master (display) and up to 4 slaves (RF sensors). I use a my specific protocol. My master knows each address of each sensor. And i have my own ack (ex. 0xAA, ID low, ID high, CS).
And to avoid 2 send at the same time, i use a random timer for each one.If you want to use a specific address for each mdot, you need to get the bootloader firmware in order to make what you want.
Martin PelletierParticipantHi Jason,
ACK is not enabled. I have my own Ack. If i got a tx error then the sx1272 stops to send any data but the program still turns. Can i reset the sx1272?thx for your answer
Martin PelletierParticipantThx Bryan,
my system is peer to peer with 3 slaves and 1 master. And if one slave has this error after trying to send a message to the master (MDOT_TX_ERROR = -2) then it will not be able to send again! Can i reset this flag or flush the send buffer in order to send again?
Martin PelletierParticipantI import the new program “Dot-AT-Firmware” with the new libmDot-mbed5 into my program workspace and i made my modification and it is working!!!
thx a lot for your support! very appreciated 🙂
Martin PelletierParticipantHi M.Fiore,
now i downloaded your mdot firmware and it shows me
Firmware: 2.0.16-mbed127
I did at&f, at&w and atz and i reconfigured my mdot’s device and it works 🙂
The mdot sees the xdot.What do i need to do about my program in order to get the same thing?? Change the libmdot? change the mbeb? Change the command terminal?
thx
Martin PelletierParticipantFirmware du xdot: 2.0.14
Firmware du mdot: Master-1.0TxF is 915,500,000 for both of them. At 915,525,000 for the xdot, it does not work
-
AuthorPosts