A place to talk about anything and everything Omega related
I recompiled chirpstack gateway bridge as following the steps below:
root@OpenWrt:~# file /opt/chirpstack-gateway-bridge/chirpstack-gateway-bridge
/opt/chirpstack-gateway-bridge/chirpstack-gateway-bridge: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, Go BuildID=VcvuifmDnNysO-WpZUz5/FGFca5Lt5vpptRtlLTBo/l2QuqgekGwKVygyjsXAL/6lmuYGmDGU2RDGrxxamU, stripped
The result is the same doesn't work on openwrt 19.07...
Go-to resource for frequently asked technical questions
Software-based (bit-bang) SPI on the GPIOs is doable!
The hardware SPI can only drive 2 devices, as there is only CS0 (already used by internal flash) and CS1.
If you need more than 1 additional SPI device, you'll need to resort to software (GPIO based) SPI. (Also known as bit-bang SPI).
Setting up a Software I2C Bus
Install the required kernel modules
opkg install kmod-spi-gpio-custom
Then load the spi-gpio-custom kernel module:
# configure software GPIO SPI
insmod spi-gpio-custom bus0=1,11,5,4,0,100000,18
Y just numbers the software SPI "buses" controlled by spi-gpio-custom. If you need multiple software SPI, you need to specify all of them on the same insmod command line, and specify parameters like bus0=... bus1=... bus2=...
devid is the number X you'll have in the /dev/spidevX.0 name
SCK, MOSI, MISO, CS are GPIO numbers for the respective signals
mode is the SPI mode, usually 0
speedinHz is the speed. Note that software SPI speed is limited, you'll not get the HW SPI top speed with it
The example above will get you a /dev/spidev1.0 on pins 11,5,4 and 18, in mode 0 and with 100kHz speed.
Credit for this FAQ goes to @luz from this thread
@Zakrze Hmm that's pretty odd! One more check before we declare the hardware faulty.
Can you try running the checkCamera.py example program in Mode 2 where you specify the serial port:
python checkCamera.py --port <SERIAL PORT>
More info here: https://github.com/OnionIoT/tau-lidar-camera/tree/master/examples#mode-2---specifying-a-port