Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9880 Discussions

Client-Server Python-based code using Galileo

AEl-K
New Contributor I
1,509 Views

Hello everyone,

I'm working on a project that requires Galileo to be a client and my laptop to be a server and for them to communicate.

I was wondering about the best way to make them communicate? I've already written a client and a server code using raw sockets in Python and was wondering how I can upload the client code on the Galileo Gen2 Board and make it communicate with the server. (I dont know what to use instead of the raw sockets.)

and is it possible to use serial connections to make this communcaation happen? If so, how?

Thanks a lot

8 Replies
FTinetti
Honored Contributor I
226 Views

Hi A.Kerdany,

How are you booting Galileo? Do you already have Galileo Ethernet working (I.e. ping to the laptop)?

Fernando.

AEl-K
New Contributor I
226 Views

I'm booting it from an SDK card with the linux image.

No, I've been using the serial connection to upload simple python code (ex: Blink in Python)

FTinetti
Honored Contributor I
226 Views

A.Kerdany wrote:

I'm booting it from an SDK card with the linux image.

No, I've been using the serial connection to upload simple python code (ex: Blink in Python)

Connect the Galileo Ethernet to a switch o directly to a computer.

If you connect to a switch there should be a DHCP server (home switches-routers usually include one) and use ping to the IP server for checking everything is ok with the network.

If you connect directly to a computer, then you could take a look at for setting the Ethernet card/s. Do not hesitate asking.

Once Galileo is connected to the server, you just copy the python client and that should be all you need.

Please let us know the result.

Fernando.

AEl-K
New Contributor I
226 Views

so it should be working even if I'm using raw sockets in the code to connect the server and client?

FTinetti
Honored Contributor I
226 Views

A.Kerdany wrote:

so it should be working even if I'm using raw sockets in the code to connect the server and client?

hmmm... I don't understand what you mean by "raw sockets"... if you are asking about "just" python sockets then yes, it should work, it's python code, which is run as any other python code in Linux, which is running in Galileo... but maybe I misunderstood something. The worst problem you can find is related to firewalls... but it is usually not a problem in a (home) LAN environment.

Fernando.

AEl-K
New Contributor I
226 Views

I'll try it out and get back to you.

thanks

AEl-K
New Contributor I
226 Views

It worked! Thanks a lot

FTinetti
Honored Contributor I
226 Views

Great, you are welcome.

Fernando.

Reply