I am having some trouble configuring my Intel Galileo Gen 2 and I cannot find a solution with my traditional Linux concepts. I have followed the starting guide in this website to set a working IoT environment. I have correctly deployed some code examles to the board. This is my SO version:
# uname -a
Linux galileo 3.8.7-yocto-standard # 1 Thu May 12 08:17:14 PDT 2016 i586 GNU/Linux
I have correclty configured a static IP address and I see that even on reboot it keeps unchanged. When I set a default gateway (route add default gw x.x.x.x) It goes away on reboot.
I tried using connman but I get this error, as if the demon is not running, as I understand:
Error getting technologies: The name net.connman was not provided by any .service filesconnmanctl>
I tried to set the command but I cannot find no rc or init.d scripts, nor /etc/network/interfaces to set this route. I have temporally set a workaround using the /etc/profile script, but this implies loggin into the board to get the route working.
What I see is that I cannot understand how the boot process of the board works as my known linux references are not present. So these are my questions:
- How can I set the network configuration to be persistant?
- What is the system launching on startup?
- When I load an example from my eclipse C IDE it is just run while connectedor it is stored to be run on startup?
Thanks for reaching out!
Regarding the issue with connmanctl, it is simply that the service has not stated yet. In order to star it (and avoid this issue) you have to enter the command systemctl start connman. If you don't want to do this every time, you can enter the command systemctl enable connman, this should make the service start every time on boot.
Regarding your first question, you could try the guide found in https://communities.intel.com/docs/DOC-109753 https://communities.intel.com/docs/DOC-109753. It was written for Edison, but I believe it might also work on Galileo. The other option would be to create a system service that does the changes you require every time you boot the board. You can learn how to create system services in https://communities.intel.com/docs/DOC-111103 https://communities.intel.com/docs/DOC-111103.
You can check all the services that are enabled (that start on boot) if you enter the command: systemctl list-unit-files | grep enabled.
The scripts that are uploaded to Edison from Eclipse are stored in /tmp. This is a temporary directory, therefore, files stored in there are deleted when you power down the board. If you would like to store your script permanently on the board, I suggest you to use Eclipse only for developing and testing and once your project has reached a stable point, compile the project directly on the Edison from the terminal. If you need help compiling from the terminal, let me know the programming language you are using and I'll gladly help you.
I hope this information helps you.
Thanks for your response. The network now is correctly configured woth connman. I am developing on c with the "Intel System Studio IoT Edition" (Eclipse). I would be very grateful if you tell me how to compile and make permanent its execution.
The other part of my question on the boot process is related to the fact that I think that a test aplication I did with the Arduino IDE is being launched everytime the board boots. I have found that /sketch/sketch.elf is running and I would like to stop it. Is just deleting the script enough or I rather disable it in another way?
Sure, I'd be glad to!
If you would like to compile directly from Linux, let's say a simple blink in C, like following example:
# include "mraa/gpio.h"
int main(int argc, char** argv)
mraa_platform_t platform = mraa_get_platform_type();
mraa_gpio_context gpio, gpio_in = NULL;
int ledstate = 0;
gpio = mraa_gpio_init(13);
fprintf(stdout, "Welcome to libmraa\n Version: %s\n", mraa_get_version());
ledstate = !ledstate;
You will have to execute the following command (assuming that the code is called blink.c and that you are entering the command from the same directory where the script is stored):
gcc blink.c -o blink_executable -lmraa
And to run it you would use:
In case you would like to start your script from boot, you can do learn how to do it with this guide: https://communities.intel.com/docs/DOC-111103 https://communities.intel.com/docs/DOC-111103. Just remember to store your script in a directory different than /tmp or the same thing will happen, for example, /home/root would be a good place.
If you would like to disable the Arduino IDE, I suggest you to remove its package, you can do it by entering the command:
opkg remove clloader
Let me know if this information helps you.