• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
netHAT as Ethernet/IP Adapter with Codesys
#1
Hello,

in a student's project we use the following configuration:
An RPI as a scanner. The Adapter-Function is realized by a RPI with a netHAT module.
Configuration Software is Codesys.

Codesys communicates with the scanner using the scanner's ETH1.
The adapter (netHAT port) connected to a switch communicates with  with the scanner's ETH0 connected to the same switch.
We like to monitor Ethernet/IP protocol with wireshark (no success of course).

Codesys requires the adapter's IP address to be specified, which we don't know, there is also no DHCP procedure
detectable.

We appreciate your help if possible

Thank you in advance
L. Stiegler
  Reply
#2
As the "getting started" documentation you find on the netHAT DVD image https://www.netiot.com/fileadmin/big_dat..._0_0_1.zip says you can't get a netHAT module that is running in EtherNet/IP adapter mode operative without a DHCP server. This is a quite usual setting for EtherNet/IP driven networks.

Using a DHCP server makes configuration of a netHAT module from the application view and driver very very easy since there is no need to configure an IP address.

So how did your RPI running the CODESYS along with the scanner has received its IP address? Usually across a DHCP server, right? So if the RPI with netHAT is connected to the same network it receives an IP address automatically too.

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

  Reply
#3
(May-18th-2020, 09:03 PM)lstiegler Wrote: Hello,

in a student's project we use the following configuration:
An RPI as a scanner. The Adapter-Function is realized by a RPI with a netHAT module.
Configuration Software is Codesys.

Codesys communicates with the scanner using the scanner's ETH1.
The adapter (netHAT port) connected to a switch communicates with  with the scanner's ETH0 connected to the same switch.
We like to monitor Ethernet/IP protocol with wireshark (no success of course).

Codesys requires the adapter's IP address to be specified, which we don't know, there is also no DHCP procedure
detectable.

We appreciate your help if possible

Thank you in advance
L. Stiegler

(May-19th-2020, 01:44 PM)lstiegler Wrote:
(May-18th-2020, 09:03 PM)lstiegler Wrote: Hello Armin,
Thank you for the rapid reply.

At first let me point out, we have no problems configuring Profinet, no problems configuring EtherCAT, but we never managed an Ethernet/IP connection. With Profit and EtherCAT we directly connect Master-RPI (ETH0) to one netHAT-Port.

Our Network is a Fritzbox and of course all connected RPIs get an IP address via DHCP.
If we connect the netHAT module (which is attached to the slave-RPI) to the network, it only broadcasts a boot request message once per minute and that's all.

The netHAT port is active on layer 1 but Fritzbox does not show any configured IP address for the connected port.
So we assume the netHAT port does not request any IP address via DHCP
Do you have any idea to solve this issue?
Would be great.

Thank you in advance
Leonhard 
  Reply
#4
Well I took the firmware installation deb file on the DVD named nxhat-eis-3.3.4.0.deb and extracted its content. Usually the files are installed to /opt/cifx/deviceconfig/FW/channel0/

I analyzed the nwid.nxd file specifically that is configuring the netHAT's TCP/IP stack when running in EtherNet/IP mode and I see in there two bits are set for BOOTP enabled and DHCP enabled.

So to be honest the configuration file looks good as it should. So let mit ask you this. Are you sure you have installed the EtherNet/IP deb-file package?

You can list it using the dpkg -l command.

And in the folder /opt/cifx/deviceconfig/FW/channel0/ after installation should be a file X070H000.nxf. Is it?

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

  Reply
#5
(May-19th-2020, 04:06 PM)Armin@netPI Wrote: Well I took the firmware installation deb file on the DVD named nxhat-eis-3.3.4.0.deb and extracted its content. Usually the files are installed to /opt/cifx/deviceconfig/FW/channel0/

I analyzed the nwid.nxd file specifically that is configuring the netHAT's TCP/IP stack when running in EtherNet/IP mode and I see in there two bits are set for BOOTP enabled and DHCP enabled.

So to be honest the configuration file looks good as it should. So let mit ask you this. Are you sure you have installed the EtherNet/IP deb-file package?

You can list it using the dpkg -l command.

And in the folder /opt/cifx/deviceconfig/FW/channel0/ after installation should be a file X070H000.nxf. Is it?

Thx
Armin

The files are : 
config.nxd; HILSCHER NXHAT52-RTE EIS V1.1.EDS; next.ico; noid.nxd and X070H000.nxf
So it seems everything should work.

Next step we try to monitor the traffic from netHAT port to the router directly with a TAP. 
Then I'll come back.
For now thank you very much for the rapid response.
Leonhard

(May-19th-2020, 06:35 PM)lstiegler Wrote:
(May-19th-2020, 04:06 PM)Armin@netPI Wrote: Well I took the firmware installation deb file on the DVD named nxhat-eis-3.3.4.0.deb and extracted its content. Usually the files are installed to /opt/cifx/deviceconfig/FW/channel0/

I analyzed the nwid.nxd file specifically that is configuring the netHAT's TCP/IP stack when running in EtherNet/IP mode and I see in there two bits are set for BOOTP enabled and DHCP enabled.

So to be honest the configuration file looks good as it should. So let mit ask you this. Are you sure you have installed the EtherNet/IP deb-file package?

You can list it using the dpkg -l command.

And in the folder /opt/cifx/deviceconfig/FW/channel0/ after installation should be a file X070H000.nxf. Is it?

Thx
Armin

The files are : 
config.nxd; HILSCHER NXHAT52-RTE EIS V1.1.EDS; next.ico; noid.nxd and X070H000.nxf
So it seems everything should work.

Next step we try to monitor the traffic from netHAT port to the router directly with a TAP. 
Then I'll come back.
For now thank you very much for the rapid response.
Leonhard

PS.: nxhat-drv (1.1.0.0) and nxhat-eis (3.3.4.0) are installed.
  Reply
#6
Yes the installation is like it should be.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#7
(May-19th-2020, 08:23 PM)Armin@netPI Wrote: Yes the installation is like it should be.

Good morning Armin,
thank you for the rapid answer.

Now I can provide you with additional information I took from the router.
It looks as if netHAT-module sends a bootp (DHCP request) message with an incorrect IP header:  TTL = 0.
This may explain why the router ignores the bootp request.
Attached please find the related Wireshark trace.

Can you please check this out?

Thank you in advance
Leonhard
  Reply
#8
Hello Leonhard,

I took a chance to look into our internal ticket system where bugs are reported and I found the very same problem as being corrected in our TCP/IP stack on 2017-08-28.

But a correction in the TCP/IP stack doesn't make a new EtherNet/IP IP firmware ... it is just a part of it.

Currently we deliver netHAT with firmware V3.3.4.0 but here I see the very latest version is 3.5.0.0 here https://kb.hilscher.com/x/ymVcAQ.

Since netHAT is a non-standard product you cannot find the netHAT firmware ready for downloading there. I need to get in touch with the product manager that he can trigger to compile the latest version also for netHAT. This may take time.

I'll be back to you.

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

  Reply
#9
(May-20th-2020, 06:40 AM)Armin@netPI Wrote: Hello Leonhard,

I took a chance to look into our internal ticket system where bugs are reported and I found the very same problem as being corrected in our TCP/IP stack on 2017-08-28.

But a correction in the TCP/IP stack doesn't make a new EtherNet/IP IP firmware ... it is just a part of it.

Currently we deliver netHAT with firmware V3.3.4.0 but here I see the very latest version is 3.5.0.0 here https://kb.hilscher.com/x/ymVcAQ.

Since netHAT is a non-standard product you cannot find the netHAT firmware ready for downloading there. I need to get in touch with the product manager that he can trigger to compile the latest version also for netHAT. This may take time.

I'll be back to you.

Thx
Armin
Thank you for your effort.
BR
Leonhard
  Reply
#10
Dear Leonhard,

I took a chance meanwhile to be after the firmware myself.

I turned the version V3.5.0.0 of netX52 software in a version that runs on netHAT as the verison 3.3.0.4 did before. I have appended it to this post. After unzipping it replace it with the existing one found in the folder /opt/cifx/deviceconfig/FW/channel0/.

Since I have no EIS master myself to check with I was able just to check the firmware is starting on my netHAT. So it is up to you now making in-deep checks yourself and give back a report if the behaviour has improved.

I did not follow all the tons of changes from 3.3.0.4 to 3.5.0.0 listed on the web page I gave you. I am just hoping that the DCHP issue has been solved in this very latest version. "More we do not have"...

I also have to say that all development activities has been freezed for netX52 chip since we have a successor netX90 chip meanwhile where our focus is set to now. So if the issue has not been solved there will be no chance at all to trigger a new version higher than V3.5.0.0 any more. Especially not for netHAT which is for us just a teaser product.

Thanks for your understanding.


Armin


Attached Files
.zip   X070H000.zip (Size: 203.23 KB / Downloads: 2)
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  NetHAT SPI configuration thp9 1 22 June-10th-2020, 02:05 PM
Last Post: Armin@netPI
  How can i set a EtherCAT node in netHAT 52-RTE? JGLee 6 38 June-9th-2020, 12:38 PM
Last Post: Armin@netPI
  cifX drivers EtherCAT read/write performance with NetHat over STM32 thp9 21 196 June-5th-2020, 10:17 AM
Last Post: Armin@netPI
  netHat configuration via config packets pitau 6 38 May-25th-2020, 02:21 PM
Last Post: Armin@netPI
  Using Powerlink firmware with netHAT and config nxd thp9 1 21 May-25th-2020, 06:40 AM
Last Post: Armin@netPI
  NetHAT temperature question thp9 1 10 May-14th-2020, 09:21 PM
Last Post: Armin@netPI
  Using netHAT drivers with custom linux (not Raspbian) FrankS 5 60 September-11th-2019, 06:16 AM
Last Post: Armin@netPI
  Ethernet/IP usage inovahw 3 42 February-18th-2019, 10:53 AM
Last Post: inovahw
  Use netPi firmware on netHAT zz_zesys 1 245 September-30th-2018, 08:04 PM
Last Post: Armin@netPI
  NetHat Labview richielfc 1 123 August-10th-2018, 12:08 PM
Last Post: Simon@netHAT

Forum Jump:


Users browsing this thread: 1 Guest(s)