Hello,
Is there a function to wait for a software ack after a send.
I know i can do it in the receive function but i wondering if i can do it with wait function like so:
bool success = wait(300, C_INTERNAL, I_ACK);
thank you for your help
Hello,
Is there a function to wait for a software ack after a send.
I know i can do it in the receive function but i wondering if i can do it with wait function like so:
bool success = wait(300, C_INTERNAL, I_ACK);
thank you for your help
With 1Mhz (not working):
196 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
311 TSM:INIT
327 TSF:WUR:MS=0
344 RF24:INIT
360 RF24:INIT:PIN,CE=9,CS=10
393 RF24:WBR:REG=0,VAL=14
442 RF24:WBR:REG=3,VAL=3
458 RF24:WBR:REG=4,VAL=95
491 RF24:WBR:REG=5,VAL=76
524 RF24:WBR:REG=6,VAL=39
557 RF24:WBR:REG=16,VAL=115
589 RF24:WBR:REG=29,VAL=4
606 RF24:RBR:REG=6,VAL=39
638 RF24:RBR:REG=5,VAL=76
671 RF24:WBR:REG=2,VAL=2
704 RF24:WBR:REG=1,VAL=0
720 RF24:WBR:REG=28,VAL=3
753 RF24:FRX
770 RF24:FTX
786 RF24:WBR:REG=7,VAL=112
819 TSM:INIT:TSP OK
835 TSM:FPAR
851 RF24:SPL
868 RF24:WBR:REG=0,VAL=14
901 RF24:OWP:RCPT=255
933 RF24:WBR:REG=10,VAL=255
950 RF24:WBR:REG=16,VAL=255
983 RF24:TXM:TO=255,LEN=7
1015 RF24:FTX
4931 RF24:WBR:REG=7,VAL=48
4964 RF24:STL
4980 RF24:WBR:REG=0,VAL=15
5013 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
5095 RF24:RBR:REG=23,VAL=1
5128 RF24:RBR:REG=23,VAL=1
5160 RF24:RBR:REG=23,VAL=1
5193 RF24:RBR:REG=23,VAL=1
5210 RF24:RBR:REG=23,VAL=1
5242 RF24:RBR:REG=23,VAL=1
5275 RF24:RBR:REG=23,VAL=1
5308 RF24:RBR:REG=23,VAL=1
5341 RF24:RBR:REG=23,VAL=1
5373 RF24:RBR:REG=23,VAL=1
5406 RF24:RBR:REG=23,VAL=1
5439 RF24:RBR:REG=23,VAL=1
5472 RF24:RBR:REG=23,VAL=1
5505 RF24:RBR:REG=23,VAL=1
5521 RF24:RBR:REG=23,VAL=1
5554 RF24:RBR:REG=23,VAL=1
5586 RF24:RBR:REG=23,VAL=1
5619 RF24:RBR:REG=23,VAL=1
5652 RF24:RBR:REG=23,VAL=1
5685 RF24:RBR:REG=23,VAL=1
5718 RF24:RBR:REG=23,VAL=1
5750 RF24:RBR:REG=23,VAL=1
5783 RF24:RBR:REG=23,VAL=1
5816 RF24:RBR:REG=23,VAL=1
5832 RF24:RBR:REG=23,VAL=1
5865 RF24:RBR:REG=23,VAL=1
5898 RF24:RBR:REG=23,VAL=1
5931 RF24:RBR:REG=23,VAL=1
5963 RF24:RBR:REG=23,VAL=1
5996 RF24:RBR:REG=23,VAL=1
6029 RF24:RBR:REG=23,VAL=1
6062 RF24:RBR:REG=23,VAL=1
6094 RF24:RBR:REG=23,VAL=1
6127 RF24:RBR:REG=23,VAL=1
6144 RF24:RBR:REG=23,VAL=1
6176 RF24:RBR:REG=23,VAL=1
6209 RF24:RBR:REG=23,VAL=1
6242 RF24:RBR:REG=23,VAL=1
6275 RF24:RBR:REG=23,VAL=1
6307 RF24:RBR:REG=23,VAL=1
6340 RF24:RBR:REG=23,VAL=1
6373 RF24:RBR:REG=23,VAL=1
6406 RF24:RBR:REG=23,VAL=1
6422 RF24:RBR:REG=23,VAL=1
6455 RF24:RBR:REG=23,VAL=1
6488 RF24:RBR:REG=23,VAL=1
6520 RF24:RBR:REG=23,VAL=1
6553 RF24:RBR:REG=23,VAL=1
6586 RF24:RBR:REG=23,VAL=1
6619 RF24:RBR:REG=23,VAL=1
6651 RF24:RBR:REG=23,VAL=1
6684 RF24:RBR:REG=23,VAL=1
6717 RF24:RBR:REG=23,VAL=1
6733 RF24:RBR:REG=23,VAL=1
6766 RF24:RBR:REG=23,VAL=1
6799 RF24:RBR:REG=23,VAL=1
6832 RF24:RBR:REG=23,VAL=1
6864 RF24:RBR:REG=23,VAL=1
6897 RF24:RBR:REG=23,VAL=1
6930 RF24:RBR:REG=23,VAL=1
6963 RF24:RBR:REG=23,VAL=1
6995 RF24:RBR:REG=23,VAL=1
7028 RF24:RBR:REG=23,VAL=1
7045 RF24:RBR:REG=23,VAL=1
7077 RF24:RBR:REG=23,VAL=1
7110 !TSM:FPAR:NO REPLY
with 8mhz (working):
208 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
321 TSM:INIT
335 TSF:WUR:MS=0
354 RF24:INIT
368 RF24:INIT:PIN,CE=9,CS=10
399 RF24:WBR:REG=0,VAL=14
432 RF24:WBR:REG=3,VAL=3
458 RF24:WBR:REG=4,VAL=95
485 RF24:WBR:REG=5,VAL=76
512 RF24:WBR:REG=6,VAL=39
540 RF24:WBR:REG=16,VAL=115
569 RF24:WBR:REG=29,VAL=4
598 RF24:RBR:REG=6,VAL=39
624 RF24:RBR:REG=5,VAL=76
651 RF24:WBR:REG=2,VAL=2
677 RF24:WBR:REG=1,VAL=0
704 RF24:WBR:REG=28,VAL=3
731 RF24:FRX
745 RF24:FTX
759 RF24:WBR:REG=7,VAL=112
788 TSM:INIT:TSP OK
808 TSM:FPAR
823 RF24:SPL
837 RF24:WBR:REG=0,VAL=14
864 RF24:OWP:RCPT=255
886 RF24:WBR:REG=10,VAL=255
917 RF24:WBR:REG=16,VAL=255
946 RF24:TXM:TO=255,LEN=7
972 RF24:FTX
989 RF24:WBR:REG=7,VAL=48
1015 RF24:STL
1030 RF24:WBR:REG=0,VAL=15
1058 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
1136 RF24:RBR:REG=23,VAL=17
1165 RF24:RBR:REG=23,VAL=17
1196 RF24:RBR:REG=23,VAL=17
1224 RF24:RBR:REG=23,VAL=17
1253 RF24:RBR:REG=23,VAL=17
1284 RF24:RBR:REG=23,VAL=17
1312 RF24:RBR:REG=23,VAL=17
1343 RF24:RBR:REG=23,VAL=17
1372 RF24:RBR:REG=23,VAL=17
1402 RF24:RBR:REG=23,VAL=17
1431 RF24:RBR:REG=23,VAL=17
1460 RF24:RBR:REG=23,VAL=17
1490 RF24:RBR:REG=23,VAL=17
1519 RF24:RBR:REG=23,VAL=17
1550 RF24:RBR:REG=23,VAL=17
1579 RF24:RBR:REG=23,VAL=17
1607 RF24:RBR:REG=23,VAL=17
1638 RF24:RBR:REG=23,VAL=17
1667 RF24:RBR:REG=23,VAL=17
1697 RF24:RBR:REG=23,VAL=17
1726 RF24:RBR:REG=23,VAL=16
1757 RF24:RXM:LEN=8
1777 RF24:WBR:REG=7,VAL=64
1806 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
1863 TSF:MSG:FPAR OK,ID=0,D=1
1896 RF24:RBR:REG=23,VAL=17
1925 RF24:RBR:REG=23,VAL=17
1955 RF24:RBR:REG=23,VAL=17
1984 RF24:RBR:REG=23,VAL=17
2015 RF24:RBR:REG=23,VAL=17
2043 RF24:RBR:REG=23,VAL=17
2072 RF24:RBR:REG=23,VAL=17
2103 RF24:RBR:REG=23,VAL=17
2131 RF24:RBR:REG=23,VAL=17
2162 RF24:RBR:REG=23,VAL=17
2191 RF24:RBR:REG=23,VAL=17
2220 RF24:RBR:REG=23,VAL=17
2250 RF24:RBR:REG=23,VAL=17
2279 RF24:RBR:REG=23,VAL=17
2310 RF24:RBR:REG=23,VAL=17
2338 RF24:RBR:REG=23,VAL=17
2369 RF24:RBR:REG=23,VAL=17
2398 RF24:RBR:REG=23,VAL=17
2426 RF24:RBR:REG=23,VAL=17
2457 RF24:RBR:REG=23,VAL=16
2486 RF24:RXM:LEN=8
2508 RF24:WBR:REG=7,VAL=64
2537 TSF:MSG:READ,6-6-255,s=255,c=3,t=8,pt=1,l=1,sg=0:1
2594 RF24:RBR:REG=23,VAL=17
2625 RF24:RBR:REG=23,VAL=16
2654 RF24:RXM:LEN=8
2674 RF24:WBR:REG=7,VAL=64
2703 TSF:MSG:READ,4-4-255,s=255,c=3,t=8,pt=1,l=1,sg=0:1
2762 RF24:RBR:REG=23,VAL=17
2791 RF24:RBR:REG=23,VAL=17
2822 RF24:RBR:REG=23,VAL=17
2850 RF24:RBR:REG=23,VAL=17
2881 RF24:RBR:REG=23,VAL=17
2910 RF24:RBR:REG=23,VAL=17
2938 RF24:RBR:REG=23,VAL=17
2969 RF24:RBR:REG=23,VAL=17
2998 RF24:RBR:REG=23,VAL=17
3028 RF24:RBR:REG=23,VAL=17
3057 RF24:RBR:REG=23,VAL=17
3086 RF24:RBR:REG=23,VAL=17
3117 RF24:RBR:REG=23,VAL=17
3145 TSM:FPAR:OK
I see that the begining is the same. But after
TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
we have for the 1Mhz:
RF24:RBR:REG=23,VAL=1
and for the 8Mhz:
1136 RF24:RBR:REG=23,VAL=17
I want to have a network (A) which will not stop working when the power of the house is down. Because I have door sensor for the alarm of the house.
And I want another network (B) which can be down when the power is off because it is not for security (temperature, humidity sensor…). This network needs to used the repeater of the network A also.
That’s why I want nodes of network (A) use only repeaters of network (A), and nodes of network (B) use repeaters of networks (A) and (B)
@tekka said in NRF24L01 with Arduino Pro Mini at 1Mhz:
@snyfir Can you run the same tests using the latest release, i.e. 2.3.1?
It's working !
Thanks you very much @tekka and @mfalkvidd
@mfalkvidd said in Filter node:
@Snyfir if they can't work anyway, why do you want to filter them?
I don't want that repeaters without battery are used by security nodes (door status, PIR...). Because if the power of the house is down, security nodes while not works during a moment.
That's why i want repeaters without battery to reject security nodes
@yveaux said in Gateway with signing = low memory:
#define MY_RX_MESSAGE_BUFFER_SIZE (10)
thank you @Yveaux et @mfalkvidd
I have an arduino pro mini 5V connected to an nrf24l01+
my code is
#define MY_DEBUG
#define MY_RADIO_RF24
#define MY_RX_MESSAGE_BUFFER_FEATURE
#define MY_RF24_IRQ_PIN (2)
#define MY_REPEATER_FEATURE
#include <MySensors.h>
MyMessage msg(0, V_CUSTOM);
void setup()
{
}
void presentation()
{
sendSketchInfo("Test", "1.0");
present(0, S_CUSTOM);
}
void loop()
{
}
void receive(const MyMessage &myMsg)
{
if (myMsg.type == V_CUSTOM && myMsg.sensor == 0) {
send(msg.set(F("pong")));
}
}
i send every minute a message to the node. But after some time the node is not responding.
When i check the IRQ pin in the arduino (pin 2) and the nrf24l01+, this one is low. It means the nrf24l01+ has been received the last message but the interrupt has not been trigger.
How can i fix this issue ? do you have a clue ?
Thank you for your help
@snyfir
with this fix, everything work fine
Hello,
Why my node never sleep when Gateway is down and i use sleep(0) ?
if i do sleep(20000) my node will sleep after 10 seconds but when i do sleep(0) my node will never sleep. But i was expected it sleep after 10 seconds also.
Is it a bug ?
@mfalkvidd said in Filter node:
@Snyfir if they can't work anyway, why do you want to filter them?
I don't want that repeaters without battery are used by security nodes (door status, PIR...). Because if the power of the house is down, security nodes while not works during a moment.
That's why i want repeaters without battery to reject security nodes
@mfalkvidd said in Filter node:
@Snyfir thanks for explaining. How come you want the B sensors to be disabled when the power is off? Why can’t they be allowed to continue working?
I don't want the B sensors to be disable when the power is off. It's juste because sensors B is not on battery and if the power of the house is off, sensors B can't works
I understand what you said. For further project I wild I think used two channels.
But right now, I don’t want to change the hardware. If nobody can tell me if the solution i propose in post 2 works, I will try it.
I want to have a network (A) which will not stop working when the power of the house is down. Because I have door sensor for the alarm of the house.
And I want another network (B) which can be down when the power is off because it is not for security (temperature, humidity sensor…). This network needs to used the repeater of the network A also.
That’s why I want nodes of network (A) use only repeaters of network (A), and nodes of network (B) use repeaters of networks (A) and (B)
Thank you for your answer @BearWithBeard.
I don't want to use this solution because it will stuck my nodes to use only the same parent and i don't want because i have several repeaters, and my nodes are likely to move from room to another room.
Something like that can works ?
MyTransport.cpp::transportProcessMessage(void)
} else if (destination == BROADCAST_ADDRESS) {
TRANSPORT_DEBUG(PSTR("TSF:MSG:BC\n")); // broadcast msg
if (command == C_INTERNAL) {
if (isTransportReady()) {
// only reply if node is fully operational
if (type == I_FIND_PARENT_REQUEST) {
#if defined(MY_REPEATER_FEATURE)
#if defined(MY_REPEATER_FEATURE_WITHOUT_BATTERY)
if (sender < 100) {
return;
}
#endif
if (sender != _transportConfig.parentNodeId) { // no circular reference
TRANSPORT_DEBUG(PSTR("TSF:MSG:FPAR REQ,ID=%" PRIu8 "\n"), sender); // FPAR: find parent request
// check if uplink functional - node can only be parent node if link to GW functional
// this also prevents circular references in case GW ooo
if (transportCheckUplink()) {
_transportSM.lastUplinkCheck = hwMillis();
TRANSPORT_DEBUG(PSTR("TSF:MSG:GWL OK\n")); // GW uplink ok
// random delay minimizes collisions
delay(hwMillis() & 0x3ff);
(void)transportRouteMessage(build(_msgTmp, sender, NODE_SENSOR_ID, C_INTERNAL,
I_FIND_PARENT_RESPONSE).set(_transportConfig.distanceGW));
} else {
TRANSPORT_DEBUG(PSTR("!TSF:MSG:GWL FAIL\n")); // GW uplink fail, do not respond to parent request
}
}
#endif
return; // no further processing required, do not forward
}
} // isTransportReady
Hello,
I have two nodes repeater with battery and one node repeater without battery.
Instead of all node can pass throw all repeater nodes, i want for some particular node to pass throw only by repeater with battery.
Is it possible to do it, without modify a lot of code of MySensors ?
I was thinking to filter by node ID. For example, if a node as an ID below 100, the repeater without battery will not respond to I_FIND_PARENT message. So, the node will not use the repeater without battery. Is it a good approach?
Hello,
Is there a function to wait for a software ack after a send.
I know i can do it in the receive function but i wondering if i can do it with wait function like so:
bool success = wait(300, C_INTERNAL, I_ACK);
thank you for your help
@snyfir
with this fix, everything work fine