Control GPIOs on Up Squared Board

mpetitjempetitje New Member Posts: 5


I am struggling to control the GPIOs of the Up Squared. I tried the MRAA libraries without success (I always get 'Invalid GPIO pin specified' as output). Is MRAA the way to go or is there some other way ? Is any additionnal configuration needed in order to use MRAA ?

I am running ublinux 3.0, and the output of uname -a is

Linux upsquared 4.4.0-ubi4-amd64 #1 SMP Debian 4.4.35-1 (2016-11-29) x86_64 GNU/Linux

Thanks a lot



  • mpetitjempetitje New Member Posts: 5

    A bit of update: I am able to toggle a GPIO using bash commands:

    cd /sys/class/gpio
    echo 433 > export
    echo out > gpio433
    while 1
    do  echo 1 > value; sleep 1
    echo 0 > value; sleep 1

    However, I can't a access the same GPIO using MRAA. My hypothesis is that the pinmap is not loaded properly. Indeed, when I run this simple C hello code, I am not able to recognize the board.

    #include "mraa.h"
    int main(int argc, char** argv)
        const char* board_name = mraa_get_platform_name();
        fprintf(stdout, "hello mraa\n Version: %s\n Running on %s\n", mraa_get_version(), board_name);
        return MRAA_SUCCESS;
  • Javier ArteagaJavier Arteaga Emutex Posts: 163 mod

    Hi @mpetitje,

    Sorry that I didn't see this thread before. As mentioned on the MRAA issue, that kernel simply does not include UP2 support. Please upgrade to ubilinux 4 or the Ubuntu 4.10 upboard kernel line to use MRAA on UP2.

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 331 admin

    Hi @mpetitje ,

    Is that discussion closed? Did you update your kernel using the custom UP kernel?


  • KahrenAKahrenA New Member Posts: 4

    Since I have the same problem, how do I update to Ubuntu 4.10 upboard kernel line? Thx.

  • KahrenAKahrenA New Member Posts: 4
Sign In or Register to comment.