HI,
I have two emonTX boards.
one board stopped at below
'+++' then [Enter] for RF config mode
also it can’t enter to RF config mode.
I did tested my FTDI board to another emonTX board working.
another One board works well and can enter to RF Config mode with my FTDI board.
at oscilloscope RX pin shows my +++ input key is send to emonTX.
Also I verified Fuse is same with another board like below.
Signature : 0x1E 0x95 0X0F
Fuse: 0xFD 0xD6 0xFF
LockBits: 0xCF
According to the source code on that forked github link (why are you using the fork and not the original?), you can update the the nodeID to 8, RF freq to 433 and group to 10 in the EEPROM by typing:
+++
i8
g10
b4
s
when you see that prompt.
If you already have a different one with node ID 8, use a different node-id
@Greebo
I was working on the premise that the .hex file is corrupt - therefore we have no assurance that the rest of the code is intact. That is why I suggested downloading the source and recompiling.
From the post above, it appears that the OP has recompiled (albeit from a forked repo, although I couldn’t find any changes in there to the two src files from the original repo…)
Reading through the source code, a corrupt RFfreq EEPROM setting will also cause this behaviour. It looks like somehow the 2nd and 3rd EEPROM bytes have been set to zero making the code think they had valid values in them.
Alternatively, the OP could run one of the myriad “clear EEPROM” Arduino sketches and try it again, which (according to the source code) will use the following defaults:
byte RF_freq=RF12_433MHZ; // Frequency of RF69CW module can be RF12_433MHZ, RF12_868MHZ or RF12_915MHZ. You should use the one matching the module you have.
byte nodeID = 8; // emonTx RFM12B node ID
int networkGroup = 210;
But a corrupt EEPROM didn’t explain why it won’t enter the reconfiguration routine ("+++"), whereas loading a corrupt .hex file might. As we appear to have ruled that out now, it’s looking very much like a hardware fault. I think an email to the shop is next: [email protected] .
Yes, it’s blocked at rf12_initialize(nodeID, RF_freq, networkGroup); // initialize RFM12B/rfm69CW
And I cant use Arduino or pio flash programmer by uncertain issue.
So I use AS4 ISP programmer.
When I erase flash , EEPROM data becomes 0xff so then it makes blocking RF12 initialize routine.
any idea for recover EEPROM , would be appreciated.
or i should modify source code.
If the EEPROM values read are all 0xff (255), a set of appropriate defaults are loaded instead. If that is still blocking at the initialize routine then as @Robert.Wall suggests you probably have a hardware fault.
NodeID = 0 DOES cause the RFM initialisation to block (as does the wrong RF module type - RFM12B instead of RFM69CW)
But NodeID = 255 does not - it reads it as 31 as expected.
If you can erase the EEPROM (with another sketch) to all locations = 0xFF, that will load the values in the sketch and it should allow you use the EEPROM normally.
The original EEPROM ended up setting nodeID to 255, RF_freq was 0 which was essentially undefined and networkGroup was 0.
If nodeID = 255 is interpreted as 31, then that shouldn’t have locked it up, networkGroup = 0 means all groups, so that shouldn’t have locked it up which only leaves the RF_freq being undefined as the root cause?
Apparently not. When I do that, the EEPROM config works normally, and after a restart the sketch runs, but I can’t say whether it transmits or not, as I’m monitoring 868 MHz and the emonTx I’m using is a 433 MHz RFM12B one.
But nevertheless, all bytes=0 is a lock-up that can be prevented, as 0 is an illegal value for our purposes for all 3 bytes. I’ve PM’d Glyn & you about this.