Xenon Ethernet Featherwing - Static IP - Connect to Server

Is there a way to assign a static IP to a Xenon with a Featherwing? My set-up is used in a large facility and it is not possible to configure the Featherwing IP through a router assignment.

Can the community direct me to sample code on how to use the Featherwing to connect to an Ethernet Server (basically an Ethernet Client application)? According to the docs, Ethernet.connect(); connects to the network rather than a server at an IP/port …

Thanks in advance.

@Jimmie, you are long enough around to know that there is a search feature you should employ
before asking an already answered question - it’s not the first time we pointed that out to you.

2 Likes

For the record: Ethernet and Xenon Mesh

3 Likes

I am sure you know that the search feature only works when you enter arguments actually found in a related post. Try entering "Static IP" and this specific post that @ninjatill linked to will not show up. FYI, I spent about 10 minutes looking for "Static IP" posts and could not find anything.

With that said, the post also included a request for information on connecting to a Ethernet Server. I also could not find anything in the posts ....

1 Like

I endorse this response.

In my experience, if you have a memory of a post, you can usually craft a search term to match; but searching blind is a crap-shoot, the signal to noise ratio is abysmal.

1 Like

Hmm, I took a few obvious search words from your post: ethernet static ip
and this is what came of it
https://community.particle.io/search?q=ethernet%20static%20ip

And the second result explicitly provides the answer

static ip is not the distinguishing term as it can occure in many contexts, but you specificly asked for an answer regarding ethernet so that will obviously discard many of the non-ethernet related results.
Other potential limiting terms may have been mesh, FeatherWing, Xenon, ...

Once you are connected to the network - irrespective of how you got onto it - it doesn't matter how your desired server is hooked up either.

Thank you @ScruffR for responding to my second question.

https://docs.particle.io/reference/device-os/firmware/xenon/#tcpclient

Ethernet is only the physical/data link layer in the media layers.

You want to talk a higher layer - the host layer - in particular the transport layer.
You already stated it is a TCP server you want to connect to so logically you want a TCPClient to connect to that TCP Server.

As I said, it doesn’t matter whether that server is plugged in via Ethernet or hooked up via WiFi or Cellular or satellite or …

1 Like

I read again @rickkas7 post regarding the Featherwing where I understood that the lack of ability to assign a static IP is a “current” situation which I am assuming may change with changes in the OS or firmware.

It is a bit disappointing that the Featherwing has been introduced with some serious shortcomings. Postings prior to its introduction were touting the ability of a “supported” wired connection to the cloud, something that had not been possible with Gen 2 devices.

However the current implementation suffers from the following shortcomings:

  1. Hard-coded use of pins that prevent the use of Serial2 on the Xenon.

  2. No ability to assign a static IP. With my limited programming skills especially in networking, I do not understand why it is not possible to have a variable in the connect method that specifies the requested IP (ala Ethernet.begin(mac, myEthernetIP);

Hopefully Particle will address those limitations.

I think this is just another case of "you'll have to wait a bit longer". Particle is still building this Gen 3 ecosystem and we just happen to be on the bleeding edge of the development. I'm sure it will be an added feature but not sure when.

1 Like

The Ethernet static IP address can’t be a parameter in user code, because then the static IP would not work in safe mode, which would make it impossible to upgrade system firmware OTA.

It needs to be stored in configuration flash, which is certainly possible but that requires a new API to get and set it, and ideally an update to Particle CLI to make it easier to set.

I think that and reconfiguration of the Ethernet pins are all planned together since they’re all things that need to be stored in configuration flash.

1 Like

Thank you @rickkas7 for the response and thank you @ninjatill for the reminder :-).

I realize that it is easy to complain and for this I want to say that Particle has done a wonderful job with Gen 3 devices and it is expected that any new product will have some hiccups.

It is just that with the promise of IoT, a common scenario (aka my scenario) there will be a large number of devices communicating to a data gateway which needs to have a hard address. It is highly unlikely that in large IoT implementations, that anyone will come close to being allowed to mess with router settings related to assigning IPs …

True, but it's also highly unlikely in such a scenario that anybody can just come in and plug in a device without first getting it "certified" with the IT division. At that point it's MAC can also be white listed and setup for a static route/IP (in my company also to prevent "rogue roaming" from one center to another).
After all you need to request the IP and get it reserved for your device and that's usually easier and "safer" for the IT staff to manage in their own management console than entrusting anyone outside to stick with the one IP they got and never "test" any other :wink:

2 Likes

Is there any update on static IP for ethernet on the Boron platform? There are a whole bunch of very valid use cases for the Boron/Xenon to have a static IP, and it seems simpler than implementing DHCP to be honest. To address why the previous responses don’t adequately solve this here’s two scenarios:

  1. Use of Ethernet in a closed system without DHCP as a primary uplink for a Boron with Cellular as a redundant connection. In this system I may still use Cellular as a periodic fallback for OTA in case of lost ethernet but prioritize ethernet so the IP & subnet can easily be a parameter in user code and OTA would still function but I get the benefit of Ethernet as a primary uplink if that’s my preference for other reasons.

  2. Interfacing with a device or hub of devices where no DHCP server is present. This is currently impossible without static IP assignment I think, and the Ethernet interface is perfect for certain applications of this type. A good example is a crossover connection to a single device with an ethernet interface and nothing else. Each device either expects a DHCP server or needs static IP assignment.

Has this been added to the API yet? The Adafruit Wiz5500 libraries seem to cover this as well as does the Arduino Ethernet libraries with the Adafruit Wiz5500 shield. Has anyone tried modifying them?


Any update on this for the Argon?

yes - the MAC address is white listed by my IP department and then a static IP address is assigned to the device and the mask settings. So we need a way to configure for secure inside firewall use. WiFi is not permitted.

There is currently no support for static IP addressing on Gen 3 devices. This includes Argon Wi-Fi, and either the Argon or Boron in the Ethernet FeatherWing.

It’s on a list of possible features, but it is not committed to, or scheduled for implementation, and is unlikely to be implemented in the near future.