Ok so I tried various commands:
cat /sys/class/gpio/gpiochip*/base | head -n1
512
The gpio pin specified in the quectel diagram is 13, so:
echo 1 > /sys/class/gpio/gpio525/value
(I actually tried various things prior to this command but this, according to the advice I received on the openwrt forum, set the gpio pin 13 to the correct value).
root@OpenWrt:~# cat /sys/class/gpio/gpio525/value
1
But, after restarting the device in openwrt I get:
Error: Unknown error (NO_REGISTRATION)
I was earlier concerned about the pin so I put in a deliberately wrong PIN and got:
Error: PIN code rejected
When I deleted the PIN completely and restarted the device the error message changed back to:
Error: Unknown error (NO_REGISTRATION)
After this I wanted to make sure that the SIM PIN was what I had set. So I tried the following, which I found confusing: (I am aware that all of the following might be wrong, but) although I am basically new to AT commands, I thought the +CPIN: READY response to AT+CPIN? meant there was no PIN set on the SIM, when I was sure I had set a PIN.
AT+CPIN?
+CPIN: READY
OK
AT+CLCK="SC",1,"1234"
+CME ERROR: 13
AT+CMEE=2
OK
AT+CPIN?
+CPIN: READY
OK
AT+CLCK="SC",1,"2345"
+CME ERROR: SIM failure
I changed the pin first to 1234, then to 2345 (because I just wondered if 1234 being a default pin for asda mobile was causingr something I didn’t expect to happen). Then finally I get ‘SIM failure’.
If the value of gpio525 is correct at 1 (I just tried it again and it is still set to ‘1’) could the SIM be corrupted somehow? It seems unlikely as the SIM connectts to the internet immediately in my phone (albeit over 4g), but I just wonder?