Group Details Private

Moderator

User moderators

Member List

  • RE: Omega 2S+ Image Size

    @matiaslao You can paste the CustomConfig to https://paste.mozilla.org/

    posted in Omega Talk
  • RE: Omega 2S+ Image Size

    @matiaslao Please post each step you are using to build your firmware so we duplicate your issue.

    posted in Omega Talk
  • RE: Custom web page for IO Monitoring etc

    @SpiderKenny Another method is to access the GPIO as a file, which you can also do using PHP or other method, here is how I do it in C. Not all my code, but can't recall the original author to credit.

    #define GPIO_MAIN_DIRECTORY "/sys/class/gpio/"
    #define GPIO_ENABLE_FILE "/sys/class/gpio/export"
    #define GPIO_DISABLE_FILE "/sys/class/gpio/unexport"
    #define GPIO_MAX_NUMBER 30
    
    static int gpio_list[GPIO_MAX_NUMBER] = {0};
    
    int gpio_get(int gpio_number)
    {
        FILE *fp;
        char filename[50];
        char str[3];
        int value;
    
        if (gpio_list[gpio_number] != 1) {
            return EXIT_FAILURE;
        }
    
        snprintf("%sgpio%d/value", 50, GPIO_MAIN_DIRECTORY, gpio_number);
     
        fp = fopen(filename, "r");
        if (fp == NULL) {
            return EXIT_FAILURE;
        }
    
        value = getc(fp);
    
        fclose(fp);
    
        return value - 48; /* 48 is the ascii-value for '0' */
    }
    
    int gpio_set_direction(int gpio_number, char in_or_out[])
    {
        FILE *fp;
        char filename[50] = GPIO_MAIN_DIRECTORY;
        char str[3];
    
        if (gpio_list[gpio_number] != 1) {
            return EXIT_FAILURE;
        }
        
        snprintf("%sgpio%d/direction", 50, GPIO_MAIN_DIRECTORY, gpio_number);
    
        fp = fopen(filename, "w");
        if (fp == NULL) {
            return EXIT_FAILURE;
        }
    
        fprintf(fp, in_or_out);
        fclose(fp);
        return EXIT_SUCCESS;
    }
    
    int gpio_set(int gpio_number, int value)
    {
        FILE *fp;
        char filename[50] = GPIO_MAIN_DIRECTORY;
        char str[3];
    
        if (gpio_list[gpio_number] != 1) {
            return EXIT_FAILURE;
        }
    
        if (value > 0) {
            value = 1;
        }
    
        snprintf("%sgpio%d/value", 50, GPIO_MAIN_DIRECTORY, gpio_number);    
    
        fp = fopen(filename, "w");
        if (fp == NULL) {
            return EXIT_FAILURE;
        }
    
        sprintf(str, "%d", value);
        fprintf(fp, str);
        fclose(fp);
    
        return EXIT_SUCCESS;
    }
    
    int gpio_open(int gpio_number)
    {
        FILE *fp;
        const char filename[] = GPIO_ENABLE_FILE;
        char str[3];
    
        gpio_list[gpio_number] = 1;
    
        fp = fopen(filename, "w");
        if (fp == NULL) {
            return EXIT_FAILURE;
        }
    
        fprintf(fp, "%d", gpio_number);
        fclose(fp);
    
        return EXIT_SUCCESS;
    }
    
    int gpio_close(int gpio_number)
    {
        FILE *fp;
        const char filename[] = GPIO_DISABLE_FILE;
        char str[3];
    
        fp = fopen(filename, "w");
        if (fp == NULL) {
            printf("Could not open %s\n", filename);
            return EXIT_FAILURE;
        }
    
        fprintf(fp, "%d", gpio_number);
        fclose(fp);
        return EXIT_SUCCESS;
    }
    
    int gpio_close_all()
    {
        int i;
        for (i = 0; i < GPIO_MAX_NUMBER; i++) {
            if (gpio_list[i] == 1) {
                gpio_close(i);
                gpio_list[i] = 0;
            }
        }
        return EXIT_SUCCESS;
    }
    
    
    posted in Omega Talk
  • RE: Custom web page for IO Monitoring etc

    @SpiderKenny A simple method would be to write your pages in PHP and use the exec function to call fastgpio command to interact with the GPIO.

    posted in Omega Talk
  • RE: Omega 2S+ Image Size

    @matiaslao Do you have an Omega2S+ or an Omega2S? If you have 32mb flash then it means you have a 2S+, so when build your firmware ensure you select Omega2S+ then your image can be up to 32MB

    posted in Omega Talk
  • RE: Omega 2S+ Image Size

    @matiaslao You need to remove some items from your build, there is often a lot of stuff installed by default that you don't need. Depending on your purposes you may remove stuff like sound, I remove Python, perhaps there are other items you don't need.

    posted in Omega Talk
  • RE: Re-Booting Issue with Omega 2+ LTE - Need Assistance

    @MickB please post the boot log for the device(s) that are "bricked"

    posted in Omega Talk
  • RE: Using USB HUB to use two web cameras

    @kamiloade my first suspicion is that it is writing to the same file for both cameras, do you know where the files are being written? Or otherwise the two cameras are trying to create files/temp file that do exceed the device capacity. Have you looked at where these files are being written?

    posted in Projects
  • RE: USB Storage limits

    @Aidan-Connaughton I use an external USB SSD on an Omega2Pro, it's a Toshiba 1TB v636300, quite old drive but it works well as a backup device.

    posted in Omega Talk
  • RE: Onion lighttpd webdav setup not working

    @cosmonaut2919 I would first stop the light service lighttpd stop then run it in the console so you can see any output.. My guess is that the webdav module is either not loading and you should be able to see that in the console or you could check log using logread.

    You can also enable logging in lighttpd.conf, check the docs at lighttpd.net

    posted in Projects

Looks like your connection to Community was lost, please wait while we try to reconnect.