Hi @GatuRatz ,
Hi @slorba ,
I don 't think you’re doing anything wrong. I am (/was) having the same problem. I’ve got an “old” LG(3)08P with SX1301 and SX1276. The newer LG308 doesn’t have the SX127x anymore and the (even more recent) LG308N is using the SX1302 instead I think.
I was able to track down the error to the file
root@dragino:/# ls -l /mnt/etc/init.d/board_detect
-rwxr-xr-x 1 root root 4438 29. Jun 2018 /mnt/etc/init.d/board_detect
looking into this file it says:
more code before just for context
[...]
SN=`hexdump -v -e '11/1 "%_p"' -s $((0x908)) -n 11 /dev/mtd6`
case $SN in
*"ig16"*)
logger "[Model Detected]: LIG16"
[...]
*"308n"*)
logger "[Model Detected]: LG308-N"
chip="sx1302"
[...]
*)
rmmod spi-gpio-custom
insmod spi-gpio-custom bus0=1,14,16,26,0,8000000,15 bus1=2,18,21,19,0,8000000,24
sleep 1
/usr/bin/spirw 8 0
if [[ "$?" == "0" ]]; then
logger "[Model Detected]: LG02"
[...]
else
/usr/bin/spirw 23 1
if [[ "$?" == "0" ]]; then
logger "[Model Detected]: LG01"
[...]
else
[...]
/usr/bin/spirw 12 1
if [[ "$?" == "1" ]]; then
chip="sx1301"
model="LG308"
pic="Dragino-LG308.png"
[...]
logger "[Model Detected]: LG308"
board="LG08"
else
logger "[Model Detected]: LG308P"
board="LG08P"
fi
fi
fi
;;
esac
echo $chip > /var/iot/chip
echo $model > /var/iot/model.txt
echo $pic > /var/iot/pic.txt
[...]
(I’ve reformatted the code a bit to be less confusing)
In other words: if spirw fails to communicate with the SX127x, then we’ve got the newer model of the LG308 with only the SX1301 and all variables are set to the correct values to be written into the files located in /var/iot/. Those files are used by all the other scripts to decide what they actually do.
If the communication with the SX127x succeeds, then we’re running on an LG(3)08P, but not all required variables are set correctly. This results in empty files in /var/iot and scripts and web-ui don’t work correctly.
After patching the script like this:
[...]
board="LG08"
else
chip="sx1301"
model="LG308"
pic="Dragino-LG308.png"
logger "[Model Detected]: LG308P"
board="LG08P"
fi
[...]
…the device is running nicely without (me noticing) any (uncommon) problems so far, yet RX and TX are both done through the SX1301 and the SX1276 isn’t used anymore (which really doesn’t bother me at all).
I was contacting Dragino support assuming that it is only a firmware bug, but they wrote back to me within no time, that the hardware is simply too old and can’t run the current firmware and I should buy a new one.
Honestly now I think it was done in purpose to render the old devices unusable with the latest firmware to boost sales.
Right now I didn’t fully check, whether downlink messages sent through the SX1301 are working properly, but would be great if anyone could confirm this.