Lora-net / lora_gateway

Driver/HAL to build a gateway using a concentrator board based on Semtech SX1301 multi-channel modem and SX1257/SX1255 RF transceivers.
Other
917 stars 742 forks source link

ERROR: Version of calibration firmware not expected, actual:66 expected:2 #94

Closed FrancoisP77 closed 6 years ago

FrancoisP77 commented 6 years ago

Hello.

I've got an issue with the loading of the firmware that I'd like to raise here.

Here is my setup.

I've crossed compiled the code successfuly and run it on the Pi Zero.

I've run util_spi_stress with the following parameters -t 1. It does seem to work properly as the tool doesn't return any error.

However, when I run lora_pkt_fwd I get the following error. ERROR: Version of calibration firmware not expected, actual:66 expected:2

Note that the version of the firmware is consistent (always 66).

I tried both a dedicated power supply (5V 2A) and my computer to power up the board and the Pi but it didn't make any difference.

I've been stuck on this issue for days now and I've really run out of ideas.

There's also something I'd like to clarify. Does the reset pin needs to be always low or high ? I've done a few trials and it seems that it needs to be low as when it's high it doesn't even load the firmware.

Thank you for help.

mcoracin commented 6 years ago

Hello, could you run the util_spi_stress test with -t 4 ?

It will test burst SPI read/write, which are used to load SX1301 firmwares.

FrancoisP77 commented 6 years ago

I ran the test and let it run. I got a mismatch after a few minutes. Could it be the wiring or some dark Microchip stuff ? I've checked the schematics but couldn't find anything odd.

mcoracin commented 6 years ago

Yes, it could be the wiring. Please refer to this post: https://github.com/Lora-net/packet_forwarder/issues/73#issuecomment-352389593

FrancoisP77 commented 6 years ago

I've managed to fix the issue by improving the wiring. Thanks for your help.

cdupont commented 3 years ago

I had this issue, I found that lowering the SPI_SPEED to 1000000 or 2000000 helped. https://github.com/Lora-net/lora_gateway/blob/master/libloragw/src/loragw_spi.native.c#L56