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 ?
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
When reception is not working, the status register value is 0x40, so RX_DR stay set.
I think the clear of RX_DR is not working very well. i will try to add
RF24_setStatus(_BV(RF24_RX_DR))
at the end of RF24_irqHandler function
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
@mfalkvidd
I want to use a switching regulator ta avoid too lost of current and heat (12v to 3.3V). A LC filter can solve my issue ?
Yes two first modules are switching regulator an the third is linear.
Nrf24l01+ are not compatible with switching regulator ?
Hello everybody,
When i powered nrf24l01+ with this module or this one the nrf24l01+ is not working (unable to send / received).
But if i use https://www.ebay.com/itm/200960749614 the same nrf24l01+ works perfectly.
All regulator deliver 3.3V so i don't know why it doesn't work. The input DC is 12V for all
Do you have a clue ?
Thank you for your help.
Hello @Mathea90, i have exactly the same issue. Do you find something to fix this issue?
@yveaux said in Gateway with signing = low memory:
#define MY_RX_MESSAGE_BUFFER_SIZE (10)
thank you @Yveaux et @mfalkvidd
I had the same result but when i add the two lines:
#define MY_RX_MESSAGE_BUFFER_FEATURE
#define MY_RF24_IRQ_PIN (2)
i have
Sketch uses 16296 bytes (50%) of program storage space. Maximum is 32256 bytes.
Global variables use 1693 bytes (82%) of dynamic memory, leaving 355 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.
A gateway without MY_RX_MESSAGE_BUFFER_FEATURE defined, can be problematic non ?
@mfalkvidd
So my only solution is to use an arduino with more memory ? do you have an exemple of arduino board i can use ?
@mfalkvidd said in Gateway with signing = low memory:
@snyfir use hardware signing or use an Arduino with more memory.
MY_SIGNING_ATSHA204 is not hardware signing ? i have connected an ATSHA204 to the arduino pin.
Hi,
I use MySensors V2.3.1 in an arduino nano has gateway.
my code is
#define MY_RADIO_RF24
#define MY_GATEWAY_SERIAL
#define MY_SIGNING_ATSHA204
#include <MySensors.h>
void setup()
{
}
void presentation()
{
}
void loop()
{
delay(10);
}
but when i upload with arduino IDE i have a warning message: "Low memory available, stability problems may occur"
how can i solve this issue ?
thank you for your help
@anticimex said in Send secured command to the gateway:
@snyfir It might work, but watch out so that you do ensure that nobody can spoof the device ID or somehow trick your GW to reassign the ID to a level where it will not verify the message.
if in the controller i verify the couple message / id of the node, it will be ok no ?
it's possible to trick the GW to reassign the ID ?
Thank you @anticimex i will do that
Maybe a proper way to avoid resetting EEPROM GW i can change the line https://github.com/mysensors/MySensors/blob/master/core/MySigning.cpp#L277 :
from
if (msg.destination == getNodeId()) {
to
if (msg.destination == getNodeId() && msg.sender >= 100) {
in that way i don't nead to use MY_SIGNING_WEAK_SECURITY to "downgrade" security and if i nead a node transmission from node to gateway to be secure i just assign it an id > 100
what do you think ?
Thank you for your answer @Anticimex
@anticimex said in Send secured command to the gateway:
Or more to the point: the GW will allow a node to set the bit in gw eeprom to indicate that it require the node to send signed messages, but it will never clear it.
The consequence of doing this is that if you at some point want to disable requirement for signatures for a node, you have to manually reset the eeprom flag in the GW.
That exactly what i want to do. But it seams not implemented like this in MySensors V2.3.1
Do you have an idea how to hack MySensors V2.3.1 to do this ?
Hi,
i build a keypad node which send a message to the gateway to activate or deactivate the alarm. To avoid somebody to send the message whithout the keypad device i use signing message described here : https://www.mysensors.org/apidocs-beta/group__MySigninggrpPub.html
in the keypad node i have:
#define MY_SIGNING_ATSHA204
#define MY_SIGNING_REQUEST_SIGNATURES
and in the gateway i have:
#define MY_SIGNING_ATSHA204
but if i understand well, only messages send from gateway to keypad node are signed. If i want signed messages send from keypad node to gateway i nead to put in the gateway:
#define MY_SIGNING_ATSHA204
#define MY_SIGNING_REQUEST_SIGNATURES
but when i do that all my nodes nead to sign here message but i want only the keypad node. I can used MY_SIGNING_WEAK_SECURITY but if the keypad node send non signed message, the message will be taking. and the security from my keypad node and the gateway is compromised.
How can i force the gateway to accept only signed message from keypad node but accept non signed message from other node ?
thank you for your help
@berkseo said in Node not working very well when MY_DEBUG not defined:
My problem is temporarily solved(nrf5). Delivery confirmation to the controller come steadily if the file MyTransport.ccp (line 723) add:
#if !defined(MY_DEBUG) wait(5); #endif
based on:
https://github.com/mysensors-rus/MySensors/commit/06f8083b785237b8d1b430a142fe3d9a3cd6f7ff
The bug will be fix in the 2.3.2 release i suppose so
@dbemowsk
I didn't change anything of my code. This is the one who don't work well when I comments #define MY_DEBUG
but if I don't comments this line it work well.
thank you @dbemowsk for your answer
my code is:
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_RF24
// Enable IRQ pin
#define MY_RX_MESSAGE_BUFFER_FEATURE
#define MY_RF24_IRQ_PIN (2)
// RF24 PA level
#define MY_RF24_PA_LEVEL (RF24_PA_HIGH)
// Enable repeater functionality
#define MY_REPEATER_FEATURE
// Define pins
#define SIREN 5
// Includes
#include <MySensors.h>
// Others
MyMessage msg(0, V_CUSTOM);
unsigned long _sirenTime = 0;
int _sirenState = 0;
int _bipNumber = 0;
int _sirenLevel = 100;
void before()
{
pinMode(SIREN, OUTPUT);
digitalWrite(SIREN, LOW);
stopSiren();
}
void setup() {
}
void presentation() {
sendSketchInfo("Siren", "1.0");
present(0, S_CUSTOM);
}
void receive(const MyMessage &myMsg)
{
if (myMsg.type == V_CUSTOM) {
String message = myMsg.getString();
if (message == "stop") {
stopSiren();
send(msg.set(F("stopped by user")));
} else if (message == "start") {
startSiren(5, 100);
send(msg.set(F("started")));
}
}
}
void loop() {
manageSiren();
wait(100);
}
void startSiren(char bipBumber, char level) {
_bipNumber = bipBumber;
_sirenLevel = level;
_sirenTime = 0;
_sirenState = 1;
}
void stopSiren() {
_sirenState = 0;
stopSirenSound();
}
bool isSirenOn() {
return _sirenState != 0;
}
void manageSiren() {
if (_sirenState == 0) {
// nothing to do
} else if ((_sirenState % 2 == 1 && _sirenState < _bipNumber * 2 + 2) && millis() - _sirenTime >= 1000) {
startSirenSound(_sirenLevel);
_sirenTime = millis();
_sirenState++;
} else if ((_sirenState % 2 == 0 && _sirenState < _bipNumber * 2 + 2) && millis() - _sirenTime >= 100) {
stopSirenSound();
_sirenTime = millis();
_sirenState++;
} else if ((_sirenState == _bipNumber * 2 + 2) && millis() - _sirenTime >= 60000) {
stopSiren();
send(msg.set(F("stopped")));
}
}
void startSirenSound(char level) {
analogWrite(SIREN, map(level, 0, 100, 0, 255));
}
void stopSirenSound() {
analogWrite(SIREN, 0);
}
I try with delay(1) but it doesn't change anything, maybe i should increase the delay.
I have an other node which have the same issue.
Hello everybody,
When MY_DEBUG is not defined in my node, the gateway doesn't received every time the ACK send by the node.
I use MySensors V2.3.1 is both gateway and node.
I use a nrf24l01+pa+lna with Socket Adapter Board with arduino pro mini 5V
@mfalkvidd i am so surprised there is no function in MySensors to put arduino to sleep without disable receipt function of the NRF24L01+ module.
Before using MySensors i was using Mirf library. I was able to put arduino to sleep and when a new message arrived, with the IRQ pin and interruption it wake up the arduino to deal with the new message arrived.
It seems not possible to do that with MySensors library.
I have in the setup() function:
attachInterrupt(digitalPinToInterrupt(3), keyboardInterrupt, FALLING);
and in the loop() function:
wait(60000)
The function keyboardInterrupt() is being call when the pin 3 is set to ground but the wait(60000) is not exit. Or i want the programme to sleep (but still receive mesage) until an interrupt append in the pin 3.
How can i do that ?
Hello everybody,
Why there is no function wait() with interrupt like sleep(const uint8_t interrupt, const uint8_t mode, const uint32_t sleepingMS = 0, const bool smartSleep = false) ?
I can't use sleep because it's a repeater noed.
Should i use basic interrupt function of arduino ?
Thank you for your help.
@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
The data is not send because VAL=1 means TX_FIFO not empty.
Maybe the flag to trigger the send data is not emit in the right time ?
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
Yes i use the same board. My gateway log (in debug) say that i received nothing.
Hello,
When i use my arduino pro mini 3.3V at 8Mhz everything works fine.
But after changing the fuses of my arduino to 1Mhz, the communication between the arduino and the gateway is note working:
196 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
311 TSM:INIT
327 TSF:WUR:MS=0
360 TSM:INIT:TSP OK
376 TSM:FPAR
4292 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
6389 !TSM:FPAR:NO REPLY
6406 TSM:FPAR
10321 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
12419 !TSM:FPAR:NO REPLY
12435 TSM:FPAR
16351 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
18448 !TSM:FPAR:NO REPLY
18464 TSM:FPAR
22380 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
24477 !TSM:FPAR:FAIL
My code:
#define MY_DEBUG
#define MY_BAUD_RATE (9600ul)
#define MY_RF24_SPI_SPEED (1000000ul)
#define MY_RADIO_RF24
#include <MySensors.h>
#define DOOR_ID 0
#define DOOR_PIN 2
MyMessage msg(DOOR_ID, V_TRIPPED);
void setup()
{
pinMode(DOOR_PIN, INPUT);
}
void presentation()
{
sendSketchInfo("Door 2", "1.4");
present(DOOR_ID, S_DOOR);
}
void loop()
{
uint8_t value;
static uint8_t sentValue = 2;
delay(50);
value = digitalRead(DOOR_PIN);
if (value != sentValue) {
send(msg.set(value == HIGH));
sentValue = value;
}
sleep(DOOR_PIN - 2, CHANGE, 0);
}
My fuses settings:
## Arduino Pro or Pro Mini (1.8V, 1 MHz) w/ ATmega328
## --------------------------------------------------
pro.menu.cpu.1MHzatmega328=ATmega328 (1.8V, 1 MHz)
pro.menu.cpu.1MHzatmega328.upload.maximum_size=30720
pro.menu.cpu.1MHzatmega328.upload.maximum_data_size=2048
pro.menu.cpu.1MHzatmega328.upload.speed=9600
pro.menu.cpu.1MHzatmega328.bootloader.low_fuses=0x62
pro.menu.cpu.1MHzatmega328.bootloader.high_fuses=0xD4
pro.menu.cpu.1MHzatmega328.bootloader.extended_fuses=0xFE
pro.menu.cpu.1MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_1MHz.hex
pro.menu.cpu.1MHzatmega328.build.mcu=atmega328p
pro.menu.cpu.1MHzatmega328.build.f_cpu=1000000L
I don't know why when my arduino is at 1Mhz the nrf24l01 is not working. When i put back my arduino to 8Mhz every thing works fine.
Do you have any idea ?
Thank you for your help
@mfalkvidd
I don't know i will try when the next release will get out
Hello,
I use an arduino pro mini 3V 8mhz and a nrf24l01+ to send temperature with a DALAS sensor.
I notice that when i add a delay(1) or a wait(1) before sending the value the range is much better.
Am i the only one who needed to do this ? if y use sleep(1) it doesn't work.
Hello,
I have a node which send a door status (open/close).
I want the message send to be received every time. For that if i send a message and no ack is received i want the node to change the parent node and resend the message.
How can i do that ?
tanks for your help!