Skip to content

Accessing radio temperature causes lib code to hang. #56

@RobCranfill

Description

@RobCranfill

Hardware/CP: Adafruit CircuitPython 9.2.9 on 2025-09-07; Adafruit Feather RP2040 RFM with rp2040

Accessing the property .temperature the second time causes the code to hang - not return, no error - as demonstrated in the attached code.

test_rfm69_temp.py

If you change line 32, FORCE_IDLE = False to True, it works, otherwise it fails.

This happens whether the receiver gets a packet or not.

BTW, the code documentation does mention that accessing .temperature interferes with receiving/sending, but this just goes out to lunch.

@property
def temperature(self) -> float:
    """The internal temperature of the chip in degrees Celsius. Be warned this is not
    calibrated or very accurate.

    .. warning:: Reading this will STOP any receiving/sending that might be happening!
    """

This was discussed a bit at https://forums.adafruit.com/viewtopic.php?t=220388

Example output (sorry for the formatting glitches)

Successful run (FORCE_IDLE = True)

`
Adafruit CircuitPython 9.2.9 on 2025-09-07; Adafruit Feather RP2040 RFM with rp2040

soft reboot

Auto-reload is off.
code.py output:

RFM69 status:

radio.bitrate=250000.0
radio.frequency_deviation=250000.0
radio.rssi=-127.5
radio.temperature=30.0

Listening...
Got packet=None
RFM69 status:

radio.bitrate=250000.0
radio.frequency_deviation=250000.0
radio.rssi=-84.0
radio.temperature=31.0

Listening...
Got packet=None
RFM69 status:

radio.bitrate=250000.0
radio.frequency_deviation=250000.0
radio.rssi=-83.0
radio.temperature=31.0

Listening...
Traceback (most recent call last):
File "code.py", line 17, in
File "test_rfm69_temp.py", line 43, in
File "adafruit_rfm69.py", line 863, in receive
File "adafruit_rfm69.py", line 163, in check_timeout
File "adafruit_rfm69.py", line 731, in payload_ready
File "adafruit_rfm69.py", line 401, in _read_u8
File "adafruit_rfm69.py", line 391, in _read_into
KeyboardInterrupt:

Code done running.
`

Failed run (FORCE_IDLE = False)

`
RFM69 status:

radio.bitrate=250000.0
radio.frequency_deviation=250000.0
radio.rssi=-127.5
radio.temperature=30.0

Listening...
Got packet=None
RFM69 status:

radio.bitrate=250000.0
radio.frequency_deviation=250000.0
radio.rssi=-86.5

Traceback (most recent call last):
File "code.py", line 17, in
File "test_rfm69_temp.py", line 39, in
File "test_rfm69_temp.py", line 25, in show_radio_status
File "adafruit_rfm69.py", line 486, in temperature
File "adafruit_rfm69.py", line 244, in get
File "adafruit_rfm69.py", line 401, in _read_u8
File "adafruit_rfm69.py", line 391, in _read_into
KeyboardInterrupt:

Code done running.
`

That's all we get until ctrl-C is pressed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions