ElectronicCats / CatWAN_USB_Stick

An Open Source USB Stick compatible with LoRa and LoRaWAN with Cortex M0+. To connect, review and analyze packages of LoRa®
GNU General Public License v3.0
40 stars 13 forks source link

Unable to set Frequence on EU CatWan stick #29

Closed James-P-D closed 1 month ago

James-P-D commented 1 month ago

Hi, I bought an EU CatWan USB device directly from Electronic Cats, and calls to set_freq claim to set the frequency correctly, but when I next call get_freq or get_config it clearly hasn't changed:

Connected to COM10 at 9600 baud rate.

get_config
Radio configurations:
Frequency = 902.30 MHz
Bandwidth = 41.7 kHz
Spreading Factor = 6
Coding Rate = 4/5
Sync Word = 0x12
Preamble Length = 8
InvertIQ = disabled
TX Power = 17
Rx active = 0

set_freq 868
Frequency set to 868.00 MHz

get_config
Radio configurations:
Frequency = 902.30 MHz
Bandwidth = 41.7 kHz
Spreading Factor = 6
Coding Rate = 4/5
Sync Word = 0x12
Preamble Length = 8
InvertIQ = disabled
TX Power = 17
Rx active = 0

get_freq
Frequency = 902.30

Is there something obvious I'm missing here?

Eric286 commented 1 month ago

Hello @James-P-D

Could you please give me more information about your setup, such as the Arduino version you are using, as well as the CATWAN version you are using, since everything seems to be correct when I tested it, but I want to perform a test with your same configurations to see what could be happening.

The CATWAN version is on the back of the board, it could say USB-Stick 3.1

Have a nice day!

sabas1080 commented 1 month ago

Hi @James-P-D adjust min/max frequency for RFM95W module in pullrequest #28

James-P-D commented 1 month ago

Hi @sabas1080 and @Eric286 thanks for the quick response!

I've pulled the latest changes and am seeing:

LoRaSniffer:6:10: fatal error: Crypto.h: No such file or directory
 #include <Crypto.h>  // Library for cryptographic functions
          ^~~~~~~~~~
compilation terminated.
exit status 1
Crypto.h: No such file or directory

I was able to build before pulling, and I've checked the build instructions ( https://github.com/ElectronicCats/CatWAN_USB_Stick/wiki/4.-First-Steps-with-CatWAN-USB-Stick#downloading-and-installing-arduino-ide ) and there's no mention of a Crypto/AES library.

Of the many cryptographic libraries I can see in Arduino Library Manager, which do I need for the latest update to the firmware?

Eric286 commented 1 month ago

Hello @James-P-D

This is the library used

https://github.com/OperatorFoundation/Crypto

If you have any other errors or questions about the libraries please tell me.

Have a nice Day!

James-P-D commented 1 month ago

Hi @Eric286 thanks again for the quick response! All working now!

get_config
Radio configurations:
Frequency = 915.00 Mhz
Spreading Factor = 7
Bandwidth = 125 Khz
Rx active = 0

set_freq 868
Frequency set to 868.00 Mhz

get_config
Radio configurations:
Frequency = 868.00 Mhz
[...]

Many thanks again! And hope you have a good day also!