Hey,
I am trying to use the Jam Detection Feature of Openthread on my nrf52840 DK. The device is running as coap server with the example code
"simple coap server". I want to use the jamDetection in this code. I tried to put the code you see down in the main file but it doesn't compile. I enabled the jamDetection in the config file and in the openthread file.
How am I starting the Jamdetection? How can I put a Callback object in the otStartJamDetection function?
my function otJamDetectionIsEnabled(thread_ot_instance_get()) is alwys returning 0. Is this because there is no jamming at the moment or is it not really enanbled in the setting?
Or is there an example?
Best regards
Verena
#include <openthread/thread.h> #include <openthread/jam_detection.h> #include <openthread/cli.h> otCliOutputFormat("is enabled %d",otJamDetectionIsEnabled(thread_ot_instance_get())); otError otError = otJamDetectionSetRssiThreshold(thread_ot_instance_get(), aRssiThreshold); APP_ERROR_CHECK(otError); otCliOutputFormat("rssi treshold %d", otJamDetectionGetRssiThreshold(thread_ot_instance_get())); otCliOutputFormat("history bitmap %d", otJamDetectionGetHistoryBitmap(thread_ot_instance_get())); otStartJamDetection(thread_ot_instance_get(), otJamDetectionCallback aCallback,p_context); otCliOutputFormat("get state %d",otJamDetectionGetState(thread_ot_instance_get()));