[Fx30] Using The GPIO expansion card from a custom firmware

Hello,

I would like to make use of the GPIO expansion card.
To use a GPIO from the expansion card I have to use the activation command on the modem: “AT!FWD=GPIOCFG,42,OUT”. This AT command is available in the official SWI firmware, but not on my custom firmware.

The support of this AT command seems to come from the Legato “columbiaAtService” application.

My custom firmware is a build from the Fx30 sources 16.10.1.
The image generated from those sources does not contain the Legato “columbiaAtService” application.

Traces from my custom image:
root@Fx30-DrBox:~# cm info
Device: FX30S
IMEI: 3539840800XXXXX
FSN: LL6475010XXXXX
Firmware: SWI9X15Y_07.11.22.00 r33729 CARMD-EV-FRMWR1 2017/01/11 18:04:06
Bootloader: SWI9X15Y_07.11.22.00 r33729 CARMD-EV-FRMWR1 2017/01/11 18:04:06
priIdPn: 9906770
priIdRev: 01.00
skuId: 1103232
root@Fx30-DrBox:~# microcom -E /dev/ttyAT
AT!FWD=GPIOCFG,33,OUT
ERROR

Could you tell me how to build the “columbiaAtService” Legato application for my environment or provide me with the application package (columbiaAtService.wp85.update)?

Best regards, Christian.

Hi Christian,
Here are the pre-built binaries. You will need to install both using the Legato tools.

columbiaAtService.zip (155.4 KB)

BR,
Chris

Hello Chris,

I installed both applications in my environment using the “update” Legato command.
Unfortunately, the AT command “AT!FWD?GPIOCFG,42” still does not work.
Here is the trace:

root@Fx30-DrBox:~# app status
[running] cellNetService
[running] dataConnectionService
[running] fwupdateService
[running] gpioService
[running] gsmConnect
[running] modemService
[running] positioningService
[running] powerMgr
[running] secStore
[stopped] tools
[running] columbiaAtService
[running] factoryRecoveryService
root@Fx30-DrBox:~# modem /dev/ttyAT 230400 AT!FWD?GPIOCFG,42

ERROR

There is nothing traced in the logread. Is-there an other module required to support this AT command?

Thanks for your help, Christian.

HI Christian,
Could you please try editing /etc/hostname? It looks like it’s been modified to be “Fx30”.
Try changing it to “fx30” and then reboot.

Then try the AT command again.

Thanks,
Chris

Hello Chris,

Thanks for your suggestion. It works.
With the default value of hostname, the AT command now works.

I still wish however to modify the hostname to differentiate more easily my products on the field.
I already had to modify the script initialising the GPIO (/etc/init.d/config_gpios) to replace the test on the hostname by a test on cat /sys/class/gpio/gpiochip200/label to allow modifying the hostname without interfering with the GPIO configuration.

I see now that the GPIO of the expansion card (42) can be activated by the command “$> echo 42 > /sys/class/gpio/export”. I think I will use this method to activate my GPIOs rather than using the AT command.

Regards, Christian.

Hi Christian,
Great, glad it worked. If you want to use the config_gpio script and change the value of hostname, just modify this file in your build:
meta-columbia-x/rootfs/recipes/sierra-initscripts/files/run.env

You’ll see the section where /etc/hostname is written. Just change the value that’s written and modify config_gpios to match.

BR,
Chris