Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JCarv5
Novice
2,574 Views

How do you synchronize a sensor network with Galileo Gen 2 and RaspberryPi?

I am setting up a local wifi sensor network with a RaspberryPi and 5 Galileo Gen 2s. The Galileos collect the data to send to the Pi via a wifi router. The Pi is connected to the internet and I was able to set the time on the Pi using NTP; however, the Galileo boards are not connected to the internet and cannot be due to restrictions, so I must use the Pi to synchronize them rather than getting the time directly from the internet. What is the the best way to use the Pi to synchronize the Galileo boards?

Thank you

Tags (2)
0 Kudos
16 Replies
idata
Community Manager
200 Views

Hi milesZappa,

 

 

Thanks for interest in the Intel® Galileo™ Platform.

 

 

When you say synchronize do you mean to set the time in the 5 Galileo using the RaspberryPi? Please let me know in order to assist you.

 

 

We will be waiting for your reply, have a nice day!

 

 

Best Regards,

 

-Jose P.
JCarv5
Novice
200 Views

Hi Jose,

Thanks for responding. Yes, that is what I mean.

idata
Community Manager
200 Views

Hi milesZappa,

 

 

Since you don't have Internet access in your 5 Galileo, you are kind of limited. My suggestion would be to use some kind of communication protocol like Serial, SPI or I2C. Then use the RaspberryPi to send the time through one of these protocols, for one of the Galileo, then use this Galileo to send the time to another Galileo and so on. You will be creating like a chain between the Galileo's and you will need to use only one port from each Board.

 

 

Hope you find this information useful, have a nice day!

 

 

Best Regards,

 

-Jose P.
JCarv5
Novice
200 Views

Sorry, I was not clear enough in my description. Although I am restricted from connecting the Galileos to the internet, I can still use a router to wirelessly communicate between the Galileo boards and the Raspberry Pi. The Raspberry Pi hosts an MQTT (Mosquitto) server and subscribes to it, the Galileo boards can publish data to this server. Can MQTT be used to synchronize the boards?

idata
Community Manager
200 Views

Hi milesZappa,

Thanks for clarifying. Honestly, I don't have too much experience with MQTT, I found this thread where a user share code on how to create an MQTT Client for different sensors to the Intel® Edison™. In this code he extracts the time, so maybe it will be useful to you.

Hope you find this information useful, have a nice day!

Best Regards,

 

-Jose P.
FTinetti
Honored Contributor I
200 Views

Hi Jose P.

I read that post, and it seems to be the case in which the Edison is directly synchronized using Internet... which the Intel Galileo are not able to do in this case...

Fernando.

JHrib
New Contributor II
200 Views

Hi, all.

One possibility would maybe be to set up a NTP server on your Raspberry Pi as instructed http://raspberrypi.tomasgreno.cz/ntp-client-and-server.html here . However, you would have to find a way to install ntp and ntpdate on Galileo image. This would be tricky, as installing is not working for me. I have Yocto 3.8.7, iot-devkit version 3.5..

If you manage to install ntpdate and ntp on Galileo, you might get away easy by only setting a script on Raspberry Pi. But issue is that simply using opkg install ntpdate is not working. Is there any alternative on how to install the NTP client on Galileo.

Kind regards

Jernej

idata
Community Manager
200 Views

Hi Jernej,

Thanks for your interest in the Intel® Galileo™ Platform.

I personally haven't dealt with NTP software on the Intel® Galileo™, but I found this thread where a user was able to install it, maybe it will be useful to you.

Hope this helps, have a nice day!

Best Regards,

 

-Jose P.
JCarv5
Novice
200 Views

Hi,

I am also using the Yocto 3.8.7, iot-devkit version 3.5 image and I followed the thread that JernejH shared (/thread/47557 NTP Client). When I run the command:

cd /tmp && opkg install ntpdate_4.2.6p5-r6.0_i586.ipk ntp-tickadj_4.2.6p5-r6.0_i586.ipk ntp_4.2.6p5-r6.0_i586.ipk ntp-utils_4.2.6p5-r6.0_i586.ipk

I get the following error messages:

Collected errors:

* wfopen: ntpdate_4.2.6p5-r6.0_i586.ipk: No such file or directory.

* pkg_init_from_file: Failed to extract control file from ntpdate_4.2.6p5-r6.0_i586.ipk.

How can solve this error? Is there another way I can install an NTP client on Galileo?

Thank you

FTinetti
Honored Contributor I
200 Views

milesZappa wrote:

Hi,

I am also using the Yocto 3.8.7, iot-devkit version 3.5 image and I followed the thread that JernejH shared (/thread/47557 NTP Client). When I run the command:

cd /tmp && opkg install ntpdate_4.2.6p5-r6.0_i586.ipk ntp-tickadj_4.2.6p5-r6.0_i586.ipk ntp_4.2.6p5-r6.0_i586.ipk ntp-utils_4.2.6p5-r6.0_i586.ipk

I get the following error messages:

Collected errors:

* wfopen: ntpdate_4.2.6p5-r6.0_i586.ipk: No such file or directory.

* pkg_init_from_file: Failed to extract control file from ntpdate_4.2.6p5-r6.0_i586.ipk.

How can solve this error? Is there another way I can install an NTP client on Galileo?

Thank you

those files are inside a .zip file in the page referred to by the OP: http://www.kocianjiri.com/ntp_clock/index.html NTP clock based on Intel Galileo Gen2.

Fernando.

JCarv5
Novice
200 Views

Hi,

After downloading the files and copying them to my Galileo board's /tmp directory and running the command from before:

cd /tmp && opkg install ntpdate_4.2.6p5-r6.0_i586.ipk ntp-tickadj_4.2.6p5-r6.0_i586.ipk ntp_4.2.6p5-r6.0_i586.ipk ntp-utils_4.2.6p5-r6.0_i586.ipk

This happens, along with the errors:

Installing ntpdate (4.2.6p5-r6.0) on root.

Installing ntp-tickadj (4.2.6p5-r6.0) on root.

Installing ntp (4.2.6p5-r6.0) on root.

ntp: unsatisfied recommendation for iana-etc

Installing ntp-utils (4.2.6p5-r6.0) on root.

Collected errors:

* satisfy_dependencies_for: Cannot satisfy the following dependencies for ntpdate:

* libc0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *

* opkg_install_cmd: Cannot install package ntpdate.

* satisfy_dependencies_for: Cannot satisfy the following dependencies for ntp-tickadj:

* libc0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *

* opkg_install_cmd: Cannot install package ntp-tickadj.

* satisfy_dependencies_for: Cannot satisfy the following dependencies for ntp:

* libm0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) * libc0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *

* opkg_install_cmd: Cannot install package ntp.

* satisfy_dependencies_for: Cannot satisfy the following dependencies for ntp-utils:

* libc0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *

* opkg_install_cmd: Cannot install package ntp-utils.

Any idea how to resolve the missing dependencies?

Thank you

idata
Community Manager
200 Views

Hi milesZappa,

According to , if you have the latest image of the Galileo, you shouldn't have the errors stated above. In here you can find the latest image https://software.intel.com/en-us/iot/hardware/galileo/downloads Downloads for the Intel® Galileo Board | Intel® Software .

We will be waiting for your reply, have a nice day!

Best Regards,

 

-Jose P.
JCarv5
Novice
200 Views

Hi,

I have been using the latest image. However, I still get that error message. To be certain that nothing got unexpectedly corrupted during my usage of the board, I set up a new image and followed the same instructions as before to download ntpdate, but I got the same error messages.

Is there another way to resolve this? Is there another way to install an NTP client on Galileo?

Thank you

idata
Community Manager
200 Views

Hi milesZappa,

Like I mention in one of my previous replies, I personally haven't dealt with the NTP software. Nevertheless, I browse through the community and found this thread , where the user KurtE offers a workaround, maybe it will be useful to you.

Hope this helps, have a nice day!

Best Regards,

 

-Jose P.
JCarv5
Novice
200 Views

Hi,

This works. Thank you so much!

idata
Community Manager
200 Views

Hi milesZappa,

 

 

I'm glad to know that it worked! Don't hesitate to ask if any questions come up!

 

 

Have a great day!

 

 

Best Regards,

 

-Jose P.

 

Reply