Jump to content

serkam

Members
  • Posts

    9
  • Joined

  • Last visited

Everything 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 If I understood correctly, to have static IP working in eth0, I need to disable wlan0 or set it up as AP, for example? Sergio
  3. 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
  4. 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
  5. 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
  6. Hi jernej and martinayotte. Yessss, apparently worked. I put in Visual Studio's Project/Configuration Properties/Linker/Additional Options/-lpthread and immediately the compilation was done. I don't know if all the rest is OK. I will post the results soon. Thank you all. Sergio
  7. Hi jernej The problem is that I am using Visual Studio with Linux Extension Plugin to remotely compile my program and, despite the program is compiled inside OPi Zero environment, I don't know where in VS I can modify the compiling parameters to adjust -lpthread option. I am searching for how to place -lpthread option yet. Sergio
  8. I am using OPi Zero as a central controller for IoTs devices ( based in ESP8266 ). It will communicate with a smartphone ( Android or iPhone ) running MQTT protocol and will distribute commands over the IoTs network. Sergio
  9. Hi I am trying to compile a program test for my new OPi Zero that is running ARMBIAN. From a Hello World program test, I am trying to create a thread that will blink the led at PA17 gpio pin, but GCC's linker complains saying that can't locate pthread_create() function. I am using pthread.h. Somebody found similar issue? Sergio
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines