How to access gpio from Linux commands?


#1

Hello,

I try to access gpio from Linux command as explained in the user guide.
I’m particularly interested by the user LED, so gpio 47 and 48.

but ls /sys/class/gpio/ only gives me:
export gpiochip1/ gpiochip100/ gpiochip88/ gpiochip94/ unexport

not any individual port.

What’s the problem?

Alain


#2

Hi Alain,
Sounds like you are running an FX30, but what version are you running? Could you please send the output of “fwupdate query”?

Are you running stock WP firmware or FX30 firmware?

BR,
Chris


#3

Hi Chris,
WP I suppose, I’m running a yocto image based on source

And looking at the syslog, I can see:

2018-08-14T15:03:42.238629+00:00 (none) Legato:  INFO | gpioService[532]/sysfsGpio T=main | gpioSysfs.c _sysfsGpio_COMPONENT_INIT() 9397 | Skipping starting GPIO Service for Pin 47 - pin not available or disabled by config
2018-08-14T15:03:42.239911+00:00 (none) Legato:  INFO | gpioService[532]/sysfsGpio T=main | gpioSysfs.c _sysfsGpio_COMPONENT_INIT() 9414 | Skipping starting GPIO Service for Pin 48 - pin not available or disabled by config

#4

Hi Alain,
You’ll need to run the FX30 firmware, the WP stock will not support these GPIO. Try the R14 FX30 firmware from the Source.
BR,
Chris


#5

Unfortunately, building my app with FX30 source code fails :frowning:!

build log

Alain

PS: you asked me for the firmware version and I didn’t answer you:

So fwupdate query says:
Firmware Version: SWI9X15Y_07.12.14.00 r34472 CARMD-EV-FRMWR1 2017/11/29 18:24:42
Bootloader Version: SWI9X15Y_07.12.14.00 r34472 CARMD-EV-FRMWR1 2017/11/29 18:24:42
Linux Version: 3.14.29ltsi-961ca71325_a0464d543a #2 PREEMPT Thu Aug 16 10:25:56 CEST 2018


#6

Hi Alain,
Ya you’re running stock WP firmware so that won’t work.
When you build R14.0.4.002, have you modified anything?
Looks like you need to install python-m2crypto on your Ubuntu machine.
BR,
Chris


#7

Yes, I added my layer which builds fine with WP source on the same host. So, is it normal?