SPI is not working
We get an ILRA01 , based on Up Board, and we follow the steps shown in the wiki. We were able to run the OS. We downloaded the lora gateway and packet forwarder and we could compile them but the packet forwarder fails when starting the concentrator.
We use the script to reset the concentrator. By default is set on GPIO7. We try this script in all available GPIO pins, but it is still not working.
Any ideas?
Comments
-
@alsaro
What’s BIOS & OS version you use? May I know which part of the wiki you refer to about the LoRa? -
BIOS: AIOT-ILRA01 R2.0 (ALR1AM20)
OS: Ubuntu 20.04 (I tested with 16.04 and 18.04 also)In up-shop.org you can find a video of Danielle Cleri configuring a LoRa Server: https://up-shop.org/up-lora-edge-computing.html ("More Info" section).
Below the video you can find some links. There is a link for the packet forwarder and another one for the lora gateway system. In the video, Daniele says that we have to download these files:
- Video: https://www.youtube.com/watch?v=5R7eH8qCNyQ
- Packet Forwarder: https://github.com/AAEONAEU-SW/packet_forwarder
- LoRa Gateway: https://github.com/AAEONAEU-SW/lora_gateway
In Pinout section there's no information about how to configure SPI (https://github.com/up-board/up-community/wiki/Pinout).
I have worked previously with the LoRa Board that you use in AILRA01, the IMST ic880a. In order to start the concentrator we have te reset the ic880a using SPI port and then the board starts to work. I found information how to communicates with SPI in Up Squared Pinout section: https://github.com/up-board/up-community/wiki/Pinout_UP2.
The script to reset SPI is like this: https://github.com/rnicolas/lora-box/blob/master/start.sh . As you can see, the script sends 0, 1 and 0 to the SPI port.
I tested this script in all the available ports.
-
@alsaro
please check the following two things.
1. Have you install the UP kernel on your system? If not, please refer to the link below for Ubuntu_20.04
https://github.com/up-board/up-community/wiki/Ubuntu_20.04
2. Please change the reset pin from 25 to 5 in the script and test again -
Hi @rogertsai(AAEON) , we have just tested with PIN 5 and the result is exactly the same. Related to the kernel, as I told you on the previous post, we installed the UP kernel, in the image below you can see a screenshot with the kernel version installed.
-
can you please type the following command and provide us the output?
ls /dev/spidev*
-
This is the result:
-
before compiling the user space driver, under libloragw/src/loragw_spi.native.c
make sure the correct spidev is selected:#define SPI_DEV_PATH "/dev/spidev2.0"
then modify the reset_lgw.sh script
make sure the correct reset pin is setIOT_SK_SX1301_RESET_PIN=5
-
As you say, the line was set in "/dev/spidev0.0" by default:
Now, the packet forwarder is working.