Closed Naesstrom closed 4 years ago
Does TX power have any relevance in this project? We are receiving data only, no need to transmit.
Does TX power have any relevance in this project? We are receiving data only, no need to transmit.
Ah true, so then it's only the setup we need to add and assign rst to a free pin!
Great! This is probably the more correct way of doing this, rather than the crude RST-to-GND hack.
We need to make sure to not be too specific to the Adafruit BoB. I think many people are using the plain RFM69HCW module and it would be great to have everything somewhat general. As far as I understand, the whole RST issue was only experienced using the Adafruit BoB. Can we generalize the code and/or the wiring?
Hmm, the wiring will probably have to be 2 different drawings since the module doesn't have that one but the code could be the same i guess... No coder tough but the program shouldn't stop if nothing happens when enabling rst?
Yeah, two different wirings or an explanation of the main differences is probably enough.
I can look into setting up something robust for the code.
On Tue, Jan 22, 2019, 11:26 Erik Näsström <notifications@github.com wrote:
Hmm, the wiring will probably have to be 2 different drawings since the module doesn't have that one but the code could be the same i guess... No coder tough but the program shouldn't stop if nothing happens when enabling rst?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bphermansson/EspSparsnasGateway/issues/31#issuecomment-456348363, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWy_LBicfkIZs9EG60eqbl189Caezltks5vFudQgaJpZM4aKN-c .
I've done some quick tests and I am not convinced on the ground -> rst issue.
Without it connected radio does not start.
21:53:12.445 -> Sensor id sub: 2731498642
21:53:12.445 -> In initialize, frequency = 867990000
21:53:12.445 -> Adjusted freq: 14221148
21:53:12.445 -> 61.04
21:53:12.478 -> ERROR: Failed setting syncvalue1 1st time
21:53:12.511 -> Unable to initialize the radio. Exiting.
So with the ground connected and started I disconnect ground and then it stops transmitting data.
21:51:43.760 -> Sending to mqtt: {"seq":57524,"watt":1009.419,"total":279.793,"pulse":"279793","battery":100,"rssi":"-81","power":"3652"}
21:51:43.760 -> wifi connected: True
21:51:43.760 -> shits good, lets go!
21:51:43.760 -> Data here????
21:51:47.362 -> Got rf data
21:51:48.296 -> client.loop
21:51:48.296 -> client is availale
21:51:48.296 -> len: 2
21:51:48.296 -> Time to MQTTPINGRESP
21:51:58.761 -> Got rf data
21:51:58.761 -> Memory usage: 43376
21:51:58.761 -> Sending to mqtt: {"seq":57525,"watt":1001.195,"total":279.797,"pulse":"279797","battery":100,"rssi":"-87","power":"3682"}
21:51:58.761 -> wifi connected: True
21:51:58.761 -> shits good, lets go!
21:51:58.761 -> Data here????
21:51:58.861 -> Got rf data
21:52:06.401 -> Got rf data
21:52:10.294 -> client is availale
21:52:10.294 -> len: 2
21:52:10.294 -> Time to MQTTPINGRESP
21:52:13.761 -> Got rf data
21:52:13.761 -> Memory usage: 43376
21:52:13.761 -> Sending to mqtt: {"seq":57526,"watt":1006.663,"total":279.801,"pulse":"279801","battery":100,"rssi":"-76","power":"3662"}
21:52:13.761 -> wifi connected: True
21:52:13.761 -> shits good, lets go!
21:52:13.761 -> Data here????
21:52:14.827 -> Got rf data
21:52:18.829 -> Got rf data
21:52:25.560 -> Got rf data
21:52:28.167 -> Got rf data
21:52:28.766 -> Got rf data
21:52:28.766 -> Memory usage: 43376
21:52:28.766 -> Sending to mqtt: {"seq":57527,"watt":1005.565,"total":279.805,"pulse":"279805","battery":100,"rssi":"-81","power":"3666"}
21:52:28.766 -> wifi connected: True
21:52:28.766 -> shits good, lets go!
// disconnected ground around here. Before here you can see a message every ~ 15 seconds.
21:52:28.766 -> Data here????
21:52:30.766 -> Got rf data
21:52:32.295 -> client is availale
21:52:32.295 -> len: 2
21:52:32.295 -> Time to MQTTPINGRESP
21:52:52.279 -> client is availale
21:52:52.279 -> len: 2
21:52:52.279 -> Time to MQTTPINGRESP
// ======= RESET pushed. its nearly 45 seconds without a message.
21:53:10.781 -> ;l�d⸮⸮|�⸮$⸮|⸮d⸮c|ǃ⸮⸮{⸮c⸮b⸮⸮og⸮l'o⸮⸮⸮#x⸮⸮l{ ```
Open this again if it's still relevant.
So reading up on the manual for the BOB I found a couple of pieces that might be interesting here.
Define a rst pin
Setup
We begin by setting up the serial console and hard-resetting the RFM69
Setting the transmit power needed for the HCW board
Initializing Radio
For transmission power you can select from 14 to 20 dBi. Lower numbers use less power, but have less range. The second argument to the function is whether it is an HCW type radio, with extra amplifier. This should always be set to true!
And after that it's just the normal transmit code but I think we could use some of these changes for this one since it's the RFM69HCW that's listed in the materials section!