"sh: write error: Device or resource busy" error while running script on FX30 LTE Cat-1

Hello,

Our customer is testing Sierra FX30 LTE Cat-1 device with Talon’s WiFi/Bluetooth mirage card. However, they are getting error “sh: write error: Device or resource busy” when they run a script on FX30 device for Bluetooth. Please review the script log below:

Here is debug listing of this script

root@fx30:~# sh -x ./init-Mirage-WiFi-BT-IoT.sh

  • modprobe wlcore_sdio.ko

  • modprobe wlcore.ko

  • modprobe wl18xx.ko

  • modprobe hci_uart

  • modprobe bluetooth

  • modprobe rfcomm

  • modprobe hidp

  • modprobe bnep

  • [ ! -d “/sys/class/gpio33” ]

  • echo 33

  • echo out

  • echo 1

  • sleep 1

  • [ ! -d “/sys/class/gpio/gpio13” ]

  • echo 13

  • echo out

  • echo 1

  • sleep 1

  • [ ! -d “/sys/class/gpio/gpio8” ]

  • echo 8
    sh: write error: Device or resource busy
    ./init-Mirage-WiFi-BT-IoT.sh: line 39: can’t create /sys/class/gpio/gpio8/direction: nonexistent directory

  • echo out
    ./init-Mirage-WiFi-BT-IoT.sh: line 40: can’t create /sys/class/gpio/gpio8/value: nonexistent directory

  • echo 1

  • sleep 1

  • echo Mirage Wi-Fi BT IoT Card init complte
    Mirage Wi-Fi BT IoT Card init complte


As you can see here export fail to create gpio8 directory


root@fx30:~# echo 8 > /sys/class/gpio/export
sh: write error: Device or resource busy


and then you can’t configure it as output and assign value

Any suggestion/advise to get them going?

Thanks

what are the return of the followings?
ati3
ati8
AT+WIOCFG?

Thanks you. Here are the requested responses:

root@fx30:~# microcom /dev/ttyAT
ati3
Manufacturer: Sierra Wireless, Incorporated
Model: FX30(WP7611-1)
Revision: SWI9X07Y_02.37.06.00 b91e64 jenkins 2020/06/02 00:54:15
IMEI: 352588320126673
IMEI SV: 15
FSN: ZW224530160910
+GCAP: +CGSM

OK
ati8
Legato Ver: 19.11.5.cdc94bb9_fa5a606a7dc8c397dd98e6abdb975bac
Yocto Ver: SWI9X07Y_02.37.10.02 2022-02-17_11:09:54
OS Ver: Linux version 3.18.140 (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #1 PREEMPT Thu Feb 17 11:02:54 UTC 2022
LK Ver: 1.3.0_482d4b1057
RootFS Ver: SWI9X07Y_02.37.10.02 2022-02-17_11:09:54
UserFS Ver: unknown
MCU Ver: unknown

OK
AT+WIOCFG?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 4,3,0,0,1,0,0
+WIOCFG: 6,16,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,0,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,1,0,0
+WIOCFG: 23,4,1,1,0,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,16,0,0,1,0,0
+WIOCFG: 29,16,0,0,1,0,0
+WIOCFG: 30,16,0,0,1,0,0
+WIOCFG: 31,16,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 35,16,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0

OK

41114208_FX30 R16 Release Notes_r1 (1).pdf (133.1 KB)
Here is the release note of R16, you can have a look in page 4:

Thanks for your quick response!

I see: Some devices are unable to access GPIO8 from sysfs
These devices require configuration using the AT command: AT+WIOCFG=8,16,1,0

I will have customer configure GPIO 8 using +WIOCFG command.

I had customer change GPIO config using following AT command but still gpio8 gives error and not created.

AT+WIOCFG=8,16,1,0
OK
AT+WIOCFG=8,16,1,0
OK

Any other suggestions? Do they really need to have GPIO8 for Talon wifi/BT card working?

Thanks!

did you do a reboot after AT+WIOCFG=8,16,1,0

Hi,

Yes customer is saying yes they did reboot and it did not help. See their interesting comments below. Anything else might be wrong here?


I spend a lot of time today investigating gpio behavior,
And the answer is not that that you can’t use filesystem to talk to gpio.
before I run init-Mirage-WiFi-BT-IoT.sh script I can do
echo 8 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio8/direction
echo 1 > /sys/class/gpio/gpio8/value
and it works like a charm, but even if I do only “echo 8 > /sys/class/gpio/export”
then wifi client start would return an error.
#Load wifi drivers
modprobe wlcore_sdio.ko
modprobe wlcore.ko
modprobe wl18xx.ko
That part in the beginning of the script would make gpio8 inaccessible, and gives an error.
That means that

Take the IoT card out of reset

Set IoT card GPIO4(IOT GPIO4 = FX30-WP77 GPIO8) to high

if [ ! -d /sys/class/gpio/gpio8 ]; then
echo 8 > /sys/class/gpio/export
fi
echo out > /sys/class/gpio/gpio8/direction
echo 1 > /sys/class/gpio/gpio8/value
this part of the script can’t be executed and probably better comment it.
I don’t see how it can’t be used here.

root@fx30:~# microcom /dev/ttyAT
AT+WIOCFG?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 4,3,0,0,1,0,0
+WIOCFG: 6,16,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,1,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,1,0,0
+WIOCFG: 23,4,1,1,0,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,16,0,0,1,0,0
+WIOCFG: 29,16,0,0,1,0,0
+WIOCFG: 30,16,0,0,1,0,0
+WIOCFG: 31,16,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 35,16,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0

OK

I also don’t see any changes when using AT commands.


Thanks

I tested in mangoh green board, no problem is found with FX30 R16 FW:

root@fx30:~# cm info
Device:                        WP7609
IMEI:                          359782080112345
IMEISV:                        E
FSN:                           WA803370312345
Firmware Version:              SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
Bootloader Version:            SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
MCU Version:                   002.015
PRI Part Number (PN):          9908102
PRI Revision:                  001.000
Carrier PRI Name:              GENERIC
Carrier PRI Revision:          002.095_000
SKU:                           1103843
Last Reset Cause:              Reset, User Requested
Resets Count:                  Expected: 80     Unexpected: 0
root@fx30:~# modprobe wlcore_sdio.ko
root@fx30:~# modprobe wlcore.ko
root@fx30:~# modprobe wl18xx.ko
root@fx30:~# echo 8 > /sys/class/gpio/export