• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect without DHCP
#1
Hello,

Is it possible to Connect directly to the netpi without DHCP, similar to the Edge Gateway?

Thanks in advance
Sebastian
#2
The default setting of netPI is DHCP always. This means netPI needs to get operative a DHCP server in any case.

But if you got connected you can of course change the default setting a static ip address incl. subnet mask gateway address and DNS server in netPI's web GUI.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

#3
Does this mean that it is not possible to connect the netpi directly to i.e. a database server or computer?
#4
This means if you have received a fresh netPI that it needs in any case a DHCP server, cause else it is getting no ip address. Later if you have set up a static ip address, then you can connect it to a computer directly, but not be default.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

#5
There are freeware Windows DHCP Servers available for download. Once you do connect with DHCP, before changing LAN to static IP, set up and connect to the wifi connection. THEN change your LAN connection to a static IP (doing this from the wifi connection). It just gives you an optional way to be connected in case something doesn't go right. The other option is don't set up the wifi, change to static IP, and, not being able to connect you will have to start all over by reloading the firmware.
#6
Hi,

We are currently testing a netPI CORE 3 and facing the following issue while trying to switch from DHCP to static for the ethernet LAN and vice versa with WiFi.

The netPI is refusing to change the settings and going back to it's original state. It's running the netpi-raspbian image on Docker. We have tried changing the IP settings both from the web interface and from the netpi-raspbian container through SSH (not sure if it's possible).

This is our setup:
-netPI connected to WiFi
-netPi connected to an external IO device through Modbus/TCP through the ethernet LAN interface (static IPs)
-programming with Node-RED
-MQTT for cloud communication

Can you please advise?

Thanks.
#7
Hello,

first of all I have to tell you that changing any LAN settings within a Docker container will have no effect on the Docker host.

Whenever a container is deployed it will be getting always an "internal" IP address (172.17.0.2 typically) by Docker service itself in mode "bridged" or in case of mode "host" the container will share the existing host interfaces (eth0,wlan) directly without receiving a separate IP address.

Now back to what I have understood from your post. You are telling that changing the LAN setting the netPI's Edge Gateway Manager does not work. By default it is DHCP and you changed it to static but netPI falls back to DHCP. Is my understanding correct?

Next what I understood is that you are using Wifi simulanously. Which mode are you using? Access point or client. I can't find that information published.

Now let me also understand what the expected data flow shall be: There is a Modbus TCP (up and running in a container as client or server doesn't matter) using an IP address range that is within the LAN port settings range. This application is running fine as far as I have understood. But you want now also send those data over Wifi to another place (via a router for example)? Is my understanding correct? And both in combo does not work? Is that what your expectation is?

Have you maybe configured overlapping ip address ranges? Could it be that you configure a gateway in the LAN settings and in thw Wifi settings the same time? This will cause a confict. You have to have a gateway active in the Wifi dialog only if this goes to the router.

Thx
Armin

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

#8
Hi Armin,

Thanks for the reply. We have resolved the Internet connection issue by removing the gateway from LAN and we are able to communicate with MQTT. To answer your questions:

- netPI falls back to DHCP or whatever the initial state is after we put the system in use and then try to change the network settings from the web interface. When we change the same settings on a fresh netPi, then the problem does not occur. Is this how it's supposed to work?
- we are using WiFi in client mode
- we don't have a special container for Modbus TCP. Modbus is set up directly from Node-RED running on the raspbian container. Do we need to change anything here?

Thanks,
Afet


#9
Hi Afet,

first of glad to hear that netPI and the internet connectivity is working as expected now.

Using Modbus TCP in a container makes no problems. There is nothing to be changed. Node-RED, respectively node.js underneath will send TCP/IP traffic (MQTT or Modbus) to the IP destination addressed and Linux will based on the subnetworks automatically route traffic to the right interface ... if it is Wifi or LAN doen't matter for the app.

To the DHCP problem: you say you "put the system in use". Can you please tell which the three parameters IP address, gateway and subnet mask you enter in this case for LAN and Wifi. And then I understood you change the LAN settings again to "another" value range and ... then independent of what you enter DHCP is enabled by netPI software by mistake? Is my understanding correct?

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

#10
Hi Armin,

You will see the LAN and WiFi parameters attached. The I/O device connected to netPI has a static IP of 192.168.0.212. Please let us know if you notice anything wrong.

Re the DHCP problem: the netPi was refusing to switch from DHCP to static and vice versa after the initial configuration was complete and once we loaded our application.

Thanks,
Afet


Possibly Related Threads...
Thread Author Replies Views Last Post
  Errormessage when trying to connect to wifi. BFH_SAM2 11 384 September-24th-2018, 12:52 PM
Last Post: Armin@netPI
  Connect to PLC without knowing IP paubau 12 428 August-22nd-2018, 03:06 PM
Last Post: Armin@netPI
  Node-Red MQTT with SSL/TLS can't connect to broker BFH_SAM2 6 243 May-18th-2018, 08:48 AM
Last Post: Armin@netPI
  DHCP/DNS issue: Couldn't access NetPI3 out-of-the-box zulliger@software-natives.ch 5 191 March-14th-2018, 06:47 PM
Last Post: adeeljsid

Forum Jump:


Users browsing this thread: 1 Guest(s)