Help with Yun and Ethernet communication

Hey !

So I have this project in which I need to control some dc motors (the electronic part I already have all sorted out i really just need to get the signal out from my yun). This is actually gonna be working underwater so the control scheme kinda goes like this.

pc (py server to control the motors) >>>> linino (py receiver) >>>> leoardo (sketch receiving orders from serial1 port)

(The linino and leonardo part are in the yun)

so far I've been able to send data over wifi to the linino easly. But i need to do it thru ethernet (as wifi doesn't work too well underwater).

I've managed to comunicate by serial1 between linino and leonardo. But i just can't connect to my yun thru ethernet.

any recommendations ? maybe change the layout of my project ? you guys know way more than me so I'm open (and grateful) of all answers.

ps. After I manage this i'm supposed to read from sensors too and comunicate the readings back to pc server. thanks!

Shouldn't your title be "Help with Yun and Ethernet communication"? If you modify your Original Post you can change the title.

...R

Sorry yeah it was late at night, I'll do it right away. Still need help tho

anyone?

Are you saying you cannot connect via Ethernet ?

Is your YUN fully up to date for firmware etc ?

Mine is a FULL YUN but I can talk to it fine via Ethernet or WiFi on two seperate IP's.
It was a bit of a PITA doing the upgrades but it was worth it.

As Long as you have the Ethernet connected up properly, it should work exactly the same as the WiFi: none of the software needs to change, the only difference is the IP addresses you will use, as the WiFi and Ethernet interfaces each have their own address.

How do you have it physically hooked up? Are the PC and the Yun both connected to a regular network? Or do you just have a direct connection between the two with no router? If the latter, you probably don't have a DHCP server to hand out addresses. If this is the case, you will either have to assign compatible but different static addresses to the PC's and Yun's Ethernet ports, or you will have to set up a DHCP server on one or the other.

By default, the Ethernet port is set up as a client to get its address from a DHCP server, and if there isn't one on the wire, it will never get an address. When using WiFi, if the Yun is the hotspot, it is also a WiFi DHCP server, and if it connects to a hotspot, the hotspot provides access to the DHCP server.

Thank you ! I needed something like that. I haven't tried the server thing. I'll try it right away. I just thought that if my yún wa sending out a wifi network (like when you have to set it up) It would create a dhcp network as well. kinda like a full blown router.

I see that isn't the way, right?

and yes it's up to date! thanks for the answer tho !

Yes, the Yun can act as a full blown router, but that is not the default configuration. By default:

  • WiFi is a hotspot, and serves DHCP addresses to WiFi clients that are associated with its hotspot
  • Ethernet is a client configured to get an address from a DHCP server

When you set up the Yun's WiFi to be a client to connect to a WiFi network, it no longer serves DHCP addresses over the WiFi link.

I'm sure that you can set up the Yun to be a DHCP server, but I don't know the procedure. You may be able to get some ideas from the OpenWRT web site, or from someone with more Linux experience than I.