March-29th-2019, 10:32 AM
I have one thing in addition as a remark for you concerning databases on embedded devices like netPI.
You know that netPI includes an SD-card which is a NAND flash with limited write cycles by its very nature.
I posted a thread a while ago dedicated to this topic:
https://forum.hilscher.com/Thread-Memory-card-endurance
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
March-29th-2019, 11:29 AM
By the way I like your idea about the DHCP option. I am currenly evaluating the option to support it.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
March-29th-2019, 07:57 PM
DHCP mode is now supported by the container and can be configured through environment variables.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
Hey Armin,
thanks for the added feature.
When I'm not using DHCP-Mode but configure the adress manually, I've got a problem with the subnet_mask. It always shows "255.0.0.0" instead of the configured "255.255.255.0". I have this behaviour using the old and the new "dhcp-version" of the image. If I don't configure the IP-Adress but use the standard one, the subnet_mask is "255.255.255.0" though.
BR,
Andi
April-9th-2019, 07:23 PM
(This post was last modified: April-9th-2019, 07:28 PM by Armin@netPI.)
What do you mean exactly with "address manually"?
Do you mean the new implemented function to set those values across environment variables during container's start now?
And what do you mean with the standard one? In case you don't specify anything the container falls back to 192.168.253.1. Is it this address you mean as standard one?
The settings of what is configured is stored in the file /etc/network/interfaces.d/cifx0 dynamically during container's start. So in your case to make sure the file has the correct values use the embedded console of portainer.io web GUI to jump into the container and print out what's in the file.
The file is generated during the container's first start
Code:
# create the corresponding Ethernet configuration file
if [ ! -f /etc/network/interfaces.d/cifx0 ]
then
touch /etc/network/interfaces.d/cifx0
echo "auto cifx0" >> /etc/network/interfaces.d/cifx0
if [ -z "$IP_ADDRESS" ]
then
echo "iface cifx0 inet static" >> /etc/network/interfaces.d/cifx0
echo "address 192.168.253.1" >>/etc/network/interfaces.d/cifx0
echo "network 255.255.255.0" >>/etc/network/interfaces.d/cifx0
else
if [ "$IP_ADDRESS" == "dhcp" ]
then
echo "allow-hotplug cifx0" >> /etc/network/interfaces.d/cifx0
echo "iface cifx0 inet dhcp" >>/etc/network/interfaces.d/cifx0
else
echo "iface cifx0 inet static" >> /etc/network/interfaces.d/cifx0
echo "address" $IP_ADDRESS >>/etc/network/interfaces.d/cifx0
echo "network" $SUBNET_MASK >>/etc/network/interfaces.d/cifx0
echo "gateway" $GATEWAY >>/etc/network/interfaces.d/cifx0
fi
fi
fi
Thx
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
April-10th-2019, 03:23 PM
Dear Andi,
based on your last sentence "And the "Network"->"Lan"-Section of the Control Panel shows a subnet-mask of "255.0.0.0" for the "cifx0"-adapter." I see that your are NOT using a Hilscher netPI device as it is maintained in this forum. The device we are discussing here in the forum are of type NIOT-E-NPI3-51-EN-RE and NIOT-E-NPI3-EN.
The device your are using is of type NIOT-E-TPI51-EN-RE. This has a totally different software preloaded as netPI which comes with Docker only. Your device also hosts software like "Node-RED" etc. And this is indeed the problem. On your device the LAN container we are talking about is only working if you disable Node-RED cause Node-RED is using and accessing the same Industrial Network processor as the container and this will NEVER EVER work.
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
April-10th-2019, 04:40 PM
Hey Armin,
the device I am using is of type "NIOT-E-NPI3-51-EN-RE", as it is written on the box, the device and in the Info-Center in the Control Panel. The only service I can see in the "service list"-section is Docker.
The "cifx0"-adapter gets displayed on the "Network"-"Lan"-Section as soon as I have started the "netpi-netx-ethernet-lan"-Container, but it is not maintainable there, I just see the configured settings.
BR,
Andi
April-10th-2019, 05:16 PM
Wow that effect is totally new to me. I know the settings dialog of "cifx0" for device NIOT-E-TPI... and I am really wondering why it appears there on netPI cause the cifX0 is available on the container only and normally nowhere else. So this is why I am not wondering that the settings dialog you see has no influence on the settings made in the container.
Just let me ask you this. Do you use the network mode "host" when you start your container?
I made tests with the new container and set the ip settings via the environment variables. I set IP_ADDRESS to 192.168.0.1 and SUB_NETMASK to 255.255.255.0 and when I jump into the container with a shell and call "ip addr show" it says 192.168.0.1/24 as it should. I don't see the subnet mask misconfigured.
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)