RFM69 433Mhz ISM band
-
Isn't that what the network ID is for though? I thought the network ID was the channel number within the band....or is it more analogous to the SSID in a WiFi type network?
-
Hi.
sure that's better to comply regulations.
It's like this because Mysensors still use Lowpowerlab rfm69 lib, but in future Mysensors rfm69 driver that will be available.
For the moment, you can maybe try something like this in your code :
_radio.setFrequency(your_freq);https://github.com/mysensors/MySensors/blob/development/drivers/RFM69/RFM69.h#L135
@Chester you can have multiple separated networks (with different id of course) for the same frequency. but sure, changing a little bit the freq is nice alternative too
-
Hi.
sure that's better to comply regulations.
It's like this because Mysensors still use Lowpowerlab rfm69 lib, but in future Mysensors rfm69 driver that will be available.
For the moment, you can maybe try something like this in your code :
_radio.setFrequency(your_freq);https://github.com/mysensors/MySensors/blob/development/drivers/RFM69/RFM69.h#L135
@Chester you can have multiple separated networks (with different id of course) for the same frequency. but sure, changing a little bit the freq is nice alternative too
Thanks for your feedback.
@scalz: I tried adding
#define RF69_EXACT_FREQ 433920ul
radio.setFrequency(RF69_EXACT_FREQ);
to the gateway and 2 nodes, but it did not seem to work. The nodes could not connect to the gateway. I reverted back for the moment and will do some other tests when I have a better dev environment.
-
Thanks for your feedback.
@scalz: I tried adding
#define RF69_EXACT_FREQ 433920ul
radio.setFrequency(RF69_EXACT_FREQ);
to the gateway and 2 nodes, but it did not seem to work. The nodes could not connect to the gateway. I reverted back for the moment and will do some other tests when I have a better dev environment.
-
@mfalkvidd Thank you, I misread the comment as kHz. Still not working though. I suppose setup is called only after mysensors initialization so nodes fail to connect since they are not set to the correct frequency.
-
@mfalkvidd Thank you, I misread the comment as kHz. Still not working though. I suppose setup is called only after mysensors initialization so nodes fail to connect since they are not set to the correct frequency.
@freynder I am not sure what order things are executed, but see if it helps putting radio.setFrequency in either preHwInit(), before() or presentation().
-
@freynder
oki. i didn't check the code.The radio frequency is initalized between Before() and Setup()
https://github.com/mysensors/MySensors/blob/development/core/MySensorsCore.cpp#L129But changing it like this in the sketch, i'm not sure how it would interact with the state machine, and if it may need to reinit the radio (have no time to test this for the moment).
Also, you can't use transportInitialise for overriding your settings.. because it's hard written in the rfm69 driver:
https://github.com/mysensors/MySensors/blob/development/drivers/RFM69/RFM69.cpp#L58So if you want to experiment, easier to change the 3 lines above in rfm69 driver.
But then, that will be overwritten when new Mysensors release will happen, as there will be a new driver.So you can experiment if you're in hurry to comply regulations, or you can wait and play with the settings as they are ;)
-
@mfalkvidd Thank you, I misread the comment as kHz. Still not working though. I suppose setup is called only after mysensors initialization so nodes fail to connect since they are not set to the correct frequency.
@freynder The best solution (for the moment) is to change these defines:
https://github.com/mysensors/MySensors/blob/development/drivers/RFM69/RFM69registers.h#L305-L307
to
#define RF_FRFMSB_433 0x6C #define RF_FRFMID_433 0x7A #define RF_FRFLSB_433 0xE1for 433.92 Mhz
As @scalz pointed out, the state machine will re-initialize the radio to the original values if using setFrequency() anywhere in the code. And of course, these changes will be overridden with a new release of MySensors.
-
Thank you all. I changed the register values directly in the RFM69 driver and it all seems to work.
Hopefully a new release will soon include this (as well as the ATC feature). Also, local legislation specifies maximum transmission power as 10mW for the 433 band, so I included the code below in my sketch. It would be good to be able to configure this in the future as well.
#ifdef MY_IS_RFM69HW _radio.setPowerLevel(16); // 10dBm for RFM69HW #else _radio.setPowerLevel(28); // 10dBm for RFM69W #endif