Jump to content

serkam

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by serkam

  1. Hi tkaiser and martinayotte.

     

    The real problem I was facing was due incorrect static IP address. I was trying to use 192.168.1.100 without /24. Doing this, nmtui automatically places /32 and the IP MASK is set to 255.255.255.255 and broadcast IP to 192.168.1.100 ( the same IP of my device).

     

    Setting IP to 192.168.1.100/24, all the rest is adjusted correctly ( 255.255.255.0 and 192.168.1.255 ).

     

    I did the same for wlan0 ( 192.168.1.99/24 ) and now both (eth0, wlan0) are working fine.

     

    I did a test using Visual Studio with linux plugin that use SSH to communicate with OPi Zero at eth0 and all worked fine. 

     

    As I intend to use wlan0 as AP to control a MQTT's network of IoTs devices, I wonder that the routing issue will be solved too.

     

    Thank you all people. Your support are great!

     

    Sergio

  2. Hi Tkaiser

     

    My apologies about my misunderstanding that knowledge about Raspbian Jessie can not apply for Armbian Jessie. That is very confusing for me, as, until now, I wondered that linux was a unique thing around the world. For sure, Torvald is not happy regarding for such much "flavors" around *bian(s).

     

    Anyway, I just started with a fresh uSD card with the last Armbian Jessie ( from https://dl.armbian.com/orangepizero/) and configured the wifi.

     

    Both interfaces, eth0 and wlan0 are operating normally, with dynamic IP. I can ping both.

     

    But, if I try to fix the IP ( manual ) on eth0, using nmtui, the OPi Zero boots normally, logging as root, the eth0 shows the IP that I configured, but, it is not responding for ping. Wlan0 continues OK ( respond to ping ).

     

    Is it necessary more setup anywhere along nmtui?

     

    Any help will be welcome.

     

    Thanks.

     

    Sergio

  3. Hi

     

    I need to set static IP in eth0 and wlan0 in my OPi Zero using ARMBIAN Jessie.

     

    Googling around, I read a lot of controversial options, like edit /etc/network/interfaces and use nmtui, but, I couldn't set BOTH eth0 and wlan0 to a static IP. If I do it for eth0, wlan0 doesn't work and vice-versa.

     

    One guy said that after Debian Jessie version (https://nebulousthinking.wordpress.com/2016/02/25/setting-a-static-ip-for-raspbian-jessie-in-2016/), some things changed to set up static IP. Now, from Jessie, we need to edit  /etc/ dhcpcd.conf, but, where is it ( dhcpcd.conf )?

     

    Can someone instruct me about how to set static IP, please?

     

    Sergio

     

     

  4. Working perfectly:

     

    #include <unistd.h>
    #include <pthread.h>
    #include <cstdio>
    #include <stdlib.h>
    #include <stdio.h>
    #include <time.h>
    #include "string.h"
    #include "gpio_lib.h"
    
    void *thread_BLINKY(void *arg);
    
    
    
    int main()
    {
    	char status = 1;
    	char dado[80];
    	int ret = 0;
    	pthread_t s_thread_BLINKY;
    
    	printf("hello from ConsoleApplication1! %s %s\n", __DATE__, __TIME__);
    
    	ret = pthread_create(&s_thread_BLINKY, NULL, thread_BLINKY, (void *)NULL);
    	if (ret < 0)
    	{
    		printf("WARPTEC: nao conseguiu criar thread BLINKY\n");
    	}
    
    
    	while (status)
    	{
    		printf("comando = ");
    		scanf("%s", dado);
    
    		if (!strcmp("fim", dado)) status = 0;
    	}
    
        return 0;
    }
    
    void *thread_BLINKY(void *arg)
    {
    
    	sunxi_gpio_init();
    	sunxi_gpio_set_cfgpin(SUNXI_GPA(17), SUNXI_GPIO_OUTPUT);
    
    	while (1)
    	{
    		sunxi_gpio_output(SUNXI_GPA(17), 1);
    		usleep(200000);
    		sunxi_gpio_output(SUNXI_GPA(17), 0);
    		usleep(100000);
    		sunxi_gpio_output(SUNXI_GPA(17), 1);
    		usleep(200000);
    		sunxi_gpio_output(SUNXI_GPA(17), 0);
    		usleep(500000);
    	}
    
    }
    

    Thank you.

     

    Sergio

     

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines