Problems Configuring Sensors in Time after Restart

29 views
Skip to first unread message

Sam Bradbury

unread,
Aug 28, 2024, 1:22:15 PM8/28/24
to PrivateEyePi
Hello!

I'm loving the products from Jem RF, this stuff is fantastic.

I'm having some issues configuring my sensors with an ID, reporting interval, etc. When I restart the sensor and run the config commands, all I get is the starting, stateoff, and sleeping responses, no confirmation of the config. I hooked them up to a 3v power supply and even then they still go to sleep before I can run the commands. I'm discharging the capacitor by bridging 3.3v and ground. Does anyone have some insight into getting the sensor to stay awake long enough to send commands? I just can't seem to make it in that 5 second window.

Here's the terminal output:

user@domain:~/rf_tools $ python3 rf_config.py 63 INTVL060

SENT     : 63INTVL060

RECEIVED : 63STARTED--

RECEIVED : 63STARTED--

RECEIVED : 63STARTED--

user@domain:~/rf_tools $ python3 rf_config.py 63 INTVL060

SENT     : 63INTVL060

RECEIVED : 63STATEOFF-

RECEIVED : 63STATEOFF-

RECEIVED : 63STATEOFF-

RECEIVED : 63SLEEPING-

user@domain:~/rf_tools $ python3 rf_config.py 63 INTVL060

SENT     : 63INTVL060

NO REPLY


Same thing happens regardless of the command. Awake, Wake, id change, all have the same reaction.

Below is an abridged version of what comes in serial_mon after discharging the capacitor and plugging into a 3v power supply. 

Wed Aug 28 09:25:40 2024 63 STARTED--
Wed Aug 28 09:25:40 2024 63 STARTED--
Wed Aug 28 09:25:40 2024 63 STARTED--
Wed Aug 28 09:25:40 2024 63 STARTED--
Wed Aug 28 09:25:40 2024 63 STARTED--
Wed Aug 28 09:25:45 2024 63 STATEOFF-
Wed Aug 28 09:25:45 2024 63 STATEOFF-
Wed Aug 28 09:25:45 2024 63 STATEOFF-
Wed Aug 28 09:25:45 2024 63 SLEEPING-

I'll take any input you might have.

Many thanks!
Sam

Glenn Seaton

unread,
Aug 28, 2024, 1:28:58 PM8/28/24
to PrivateEyePi
Sam,
You are doing it correctly. The only change is you need to wait about 2 seconds after powering up the sensor for it to get started before issuing the command.
It is not in listening mode until it finishes sending the "STARTED" messages.

Glenn

Sam Bradbury

unread,
Aug 28, 2024, 2:07:28 PM8/28/24
to PrivateEyePi
Glenn,

Thanks for the response! I've been at it for a couple of hours over the course of this week and I just can't seem to get in that interval. I either get a started message meaning I was too early or the stateoff/sleeping messages meaning I was too late. I just can't seem to hit that 1-2 second interval for the command to hit. I'm remotely logged into the Pi so that may be adding some extra latency, but i've tried about every timing with a stopwatch I can think of. 

I thought I read somewhere that attaching an external power supply to the 3v and ground sockets on the serial side will power the sensor in an always awake mode. Is that true? Is there a trick to getting that to work?

Thanks,
Sam

Glenn Seaton

unread,
Aug 28, 2024, 2:10:51 PM8/28/24
to PrivateEyePi
Sam,
It can be tricky sometimes to get the message at the right time.
There is no option for an external supply to change Wake mode. If you find a link that says you can, please send it to me so I can correct it.

Glenn

Sam Bradbury

unread,
Aug 28, 2024, 2:27:06 PM8/28/24
to PrivateEyePi
Glenn,

Sounds good, I'll keep at it. 

In looking back at the product page, I think I just misunderstood the description. I was thinking of the following quote from the Jem RF website: 

"Using an external power source it can operate in request/reply or publish mode. When asleep it is awoken by presence of water ,or water to no water, to send readings. If powered externally then the device can operate in a fully awake mode and can respond to requests for state in a request/reply fashion."

I think I mistook "can operate in that mode" for "will automatically operate in that mode". That's my mistake.

Thanks,
Sam

Sam Bradbury

unread,
Aug 28, 2024, 6:16:39 PM8/28/24
to PrivateEyePi
Hi Glenn,

I switched to trying to program via serial over Raspberry Pi GPIO. I have TX and RX on the receiver hooked up to the UART pins 8 and 10 on the Pi respectively. It didn't seem like the messages were going through. Below is the terminal output, it looks like the messages are getting reflected somehow. If this is correct configuration process, the changes don't seem to be taking once I remove the sensor from the GPIO and reinstate the wireless gateway system. 

I'm sure I look silly, but is there something I'm missing?

user@domain:~/rf_tools $ python3 rf_config.py 63 HELLO

SENT     : 63HELLO

RECEIVED : 63HELLOa63H

user@domain:~/rf_tools $ python3 rf_config.py 63 BATT

SENT     : 63BATT

RECEIVED : 63BATTa63BA

user@domain:~/rf_tools $ python3 rf_config.py 63 INFO

SENT     : 63INFO

RECEIVED : 63INFOa63IN

user@domain:~/rf_tools $ python3 rf_config.py 63 RBSON

SENT     : 63RBSON

RECEIVED : 63RBSONa63R

user@domain:~/rf_tools $ python3 rf_config.py 63 AWAKE

SENT     : 63AWAKE

RECEIVED : 63AWAKEa63A


Thanks for the help!

Sam


Glenn Seaton

unread,
Aug 28, 2024, 6:25:54 PM8/28/24
to PrivateEyePi
I am not sure what you did.  Did you connect the RPI Tx and Rx to the sensor Tx and Rx?
The sensor tx and Rx will not respond to commands, just echo them back.  The 'a' is added by the program as the start of the message sync character.
The configuration is done wirelessly from the RPI Gateway to the sensor.
Reply all
Reply to author
Forward
0 new messages