Table of Contents |
---|
Configuration of the NIC 52-RE via FTP script
...
Please find the following Example attached to this Application Note:
View file | ||||
---|---|---|---|---|
|
Set IP address
To set the IP address of the netIC you can use , the netIdent protocol. protocol "netIdent" can be used.
The netIdent protocol was developed by Hilscher for easy configuration of Hilscher devices with Ethernet interfaces.
More information about it can be found in the document «NetIdentProtocol_OI_03.pdf»
To set the IP address only one UDP packet has to be send to the device.
...
PC UDP port: 25384
netIC UDP port: 25383
UDP Frame
Data (118 bytes)
IP address to be assigned to the netIC (C0 a8 01 0b = 192 168 1 11)
Serial number of the netIC (00 00 8c 82 = 35970)
ff ff ff ff ff ff c8 d3 ff e3 41 b1 08 00 45 00 00 92 fd 4f 00 00 80 11 00 00 c0 a8 01 0a ff ff ff ff 63 28 63 27 00 7e c2 41
48 49 4e 49 00 00 03 e8 00 00 00 03 00 00 00 01 00 00 20 7e 00 00 00 00 c0 a8 01 0a 00 00 63 28 c0 a8 01 0b 00
02 a2 4e cb a2 00 00 8c 82 00 00 10 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 ff ff ff 00
There are several possibilities to send TCP/UDP packets. On the next page there are
Please find below two command line examples for netcat and packetsender.
netcat
To send and receive udp packets you can use as for example the Tool netcat.:
For Linux and WSL:
echo -n -e "\x48\x49\x4e\x49\x00\x00\x03\xe8\x00\x00\x00\x03\x00\x00\x00\x01\x00\x00\x20\x7e\x00\x00\x00\x00\xc0\
...
-s IP address of the NIC, only necessary if you have multiple NICs
-p bind to UDP port
For Windows https://nmap.org/ncat
echo <hex to ascii> | ncat -u -w 1 -v -s 192.168.1.10 -p 25384 255.255.255.255 25383
packetsender
To send and receive udp packets you can use as example packetsender., for example the Tool packetsender can be used:
Packetsender can be used for Linux, Mac and Windows. https://packetsender.com/
...
-u for UDP
-x for hex data
-w 1000 for close connection after 1second
-b bind to UDP port
The example command works only with one NIC
FTP Script
Prerequisits are:→
- Connection to the device via Ethernet port
...
- FTP server active
...
- IP address set in the netIC
Install WinSCP
In this example WinSCP is used as FTP client.
Please find the Download and more information at https://winscp.net/.
After the installation the WinSCP installation path must be added to the Windows environment variable PATH.
e.g.
For example:
C:\Program Files (x86)\WinSCP
Create configuration data
Unfortunately, there is no possibility to create the configuration data directly.
The easiest way to create them is to configure the netIC with the netX Configuration Tool.
Once the netIC is configured, the required data can be downloaded via FTP (Filezilla or similar).
FTP files
*.nxf is the firmware file
*.nxd are the configuration files
In the path
/SYSVOLUME/Port_1/sx/pub
are , the web server files are stored.
FTP Script
The example script "script_netIC.txt" consists of two commands
...
For more information see https://winscp.net/eng/docs/guide_automation.
Calling the script
The script can be called via batch file. The script file is called with the following command:
...