• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with NetHAT Configuration
#1
Hi,
I have raspberry pi 3 with NetHAT mounted on the top. I am using the latest driver and firmware for NetHAT.
I am thoroughly following the procedure for installing NetHAT driver and firmware written in the manual.
Connection to raspberry is via SSH from my laptop.
Firmware installed: Profinet
The output when I run the demo is:
State = 0x00000000
----------------------------------------------------
---------- Board/Channel enumeration demo ----------
Found Board cifX0
DeviceNumber : 7775000
SerialNumber : 20146
Board ID : 0
System Error : 0x0000000E
Channels : 1
DPM Size : 65536
- Channel 0:
Firmware : PROFINET IO Device
Version : 4.2.7 build 0
Date : 06/13/2016
Device Nr. : 7775000
Serial Nr. : 20146
netX Flags : 0x0000003E
Host Flags : 0x0000003C
Host COS : 0x00000000
Device COS : 0x00000003
State = 0x00000000
----------------------------------------------------
---------- System Device handling demo ----------
System Channel Info Block:
==========================
DPM Cookie : netX
DPM Size : 16384
Device Number : 7775000
Serial Number : 20146
HW Options : 0x0080 0x0080 0x0001 0x0001
Manufacturer : 1
Production Date : 4367
Device Class : 5
HW Revision : 2
HW Compatibility : 0
License Flags 1 : 0x00000000
License Flags 2 : 0x00000000
LicenseID : 0x0000
LicenseFlags : 0x0000
==========================
System Information:
===================
System Error : 0x0000000E
DPM Size : 16384
Mailbox size : 124
Device Number : 7775000
Serial Number : 20146
Open Count : 1
===================
System Control Block:
=====================
Command COS : 0x00000000
Reserved : 0x00000000
=====================
Waiting 2s to let cifX card calculate CPU load!
System Status Block:
====================
System COS : 0x80000000
System Status : 0x00000001
System Error : 0x0000000E
Time since start : 3285
CPU Load [%] : 2.32
====================

Trying to read Security Eeprom:
===============================
System Mailbox State: MaxSend = 8, Pending Receive = 0
Send Packet (Read Crypto Flash Zone 1):
Dest : 0x00000000 ID : 0x00000000
Src : 0x00000000 Sta : 0x00000000
DestID : 0x00000000 Cmd : 0x00001EBC
SrcID : 0x00000000 Ext : 0x00000000
Len : 0x00000004 Rout : 0x00000000
Data:
01 00 00 00
System Mailbox State: MaxSend = 8, Pending Receive = 1
Received Packet (Read Crypto Flash Zone 1):
Dest : 0x00000000 ID : 0x00000000
Src : 0x00000000 Sta : 0x00000000
DestID : 0x00000000 Cmd : 0x00001EBD
SrcID : 0x00000000 Ext : 0x00000000
Len : 0x00000020 Rout : 0x00000000
Data:
00 02 A2 3B FD E1 00 00 00 00 00 00 00 00 00 80
00 80 00 01 00 01 00 00 00 00 00 00 00 00 00 78
System Mailbox State: MaxSend = 8, Pending Receive = 0
===============================

State = 0x00000000
----------------------------------------------------
---------- Communication Channel demo ----------
Communication Channel Info:
Device Number : 7775000
Serial Number : 20146
Firmware : PROFINET IO Device
FW Version : 4.2.7 build 0
FW Date : 06/13/2016
Mailbox Size : 1596

Start put/get packet Demo!
Send Packet:
Dest : 0x00000000 ID : 0x00000000
Src : 0x00000000 Sta : 0x00000000
DestID : 0x00000000 Cmd : 0x00000000
SrcID : 0x00000000 Ext : 0x00000000
Len : 0x00000000 Rout : 0x00000000
Data:
Received Packet:
Dest : 0x00000000 ID : 0x00000000
Src : 0x00000000 Sta : 0xC0000004
DestID : 0x00000000 Cmd : 0x00000001
SrcID : 0x00000000 Ext : 0x00000000
Len : 0x00000000 Rout : 0x00000000
Data:

Start read/write IO-Data!
Error setting Bus state lRet = 0x800C0021!

--- Read / Write Block Information ---
Read CONTROL Block

02 00 00 00
Write CONTROL Block
Read COMMON Status Block

07 00 00 00
Write COMMON Status Block
Error writing to common status block. lRet = 0x800A0006
Read EXTENDED Status Block

00 00 00 00
Write EXTENDED Status Block
Error writing to extended status block. lRet = 0x800A0006

--- Event handling demo ---
Error: 0x800A001A, <>

--- Set Bus / Host State Demo ---
Set CIFX_HOST_STATE_READY!
CIFX_HOST_STATE_READ, state 1 !
Error CIFX_BUS_STATE_ON, state 1, error 0x800C0021 !
CIFX_BUS_STATE_OFF, state 1 !
Set CIFX_HOST_STATE_NOT_READY!
CIFX_HOST_STATE_READ, state 0 !
State = 0x00000000

Can you please help me out?

Regards,
  Reply
#2
I have also tried it with Ethernet/IP firmware installed. Cannot figure out whats going wrong?
Here is the result of running demo example:

Configuration file parameter:
- Device=[name of the spi interface]
Name of the SPI device. An operational connection is only guaranteed with devices based
on the Linux SPI-Device Framework -> spidev (e.g. spidev0.0). For available devices see
/sys/class/spidev/spidevX.X and refer to your hardware schematic.
- Speed=[speed of SPI connection]
- Mode=[Mode of SPI connection]
Mode=0 -> Do not change!
- ChunkSize=[size of chunks]
ChunkSize=0 -> Max. packet size (0=max,defined by SPI driver)

Troubleshooting:
1. No device enumerated...
a) Check if your configuration is present '/opt/cifx/plugins/netx-spm/config0'
b) Check if the configured device is present '/sys/class/spidev/spidevX.X'
c) Check if the configured device is a netX device
2. Failed to enumerate the device...
a) Check the error message given on the debug output
b) Check the debug output logged in the driver's log file '/opt/cifx/cifX[X].log' (e.g. /opt/cifx/cifX1.log)'
DPM status changed 0xFF (OK => 0x11)!
Error SPIReadChunk: DPM Addr=0x0 / Len=0x4
DPM status changed 0xFF (OK => 0x11)!
Error SPIReadChunk: DPM Addr=0x0 / Len=0x4
DPM status changed 0xFF (OK => 0x11)!
Error SPIReadChunk: DPM Addr=0x0 / Len=0x4
DPM status changed 0xFF (OK => 0x11)!
Error SPIReadChunk: DPM Addr=0x0 / Len=0x4
DPM status changed 0xFF (OK => 0x11)!
Error SPIReadChunk: DPM Addr=0x0 / Len=0x4
DPM status changed 0xFF (OK => 0x11)!
Error SPIReadChunk: DPM Addr=0x0 / Len=0x4

---------- Display Driver Version ----------
Driver Version: LinuxCIFXDrv V1.1.0, based on cifX Toolkit 1.2.0.0

State = 0x00000000
----------------------------------------------------
---------- Board/Channel enumeration demo ----------
Found Board cifX0
DeviceNumber : 7775000
SerialNumber : 20146
Board ID : 0
System Error : 0x0000000E
Channels : 1
DPM Size : 65536
- Channel 0:
Firmware : EtherNet/IP Adapter
Version : 3.3.4 build 0
Date : 06/17/2016
Device Nr. : 7775000
Serial Nr. : 20146
netX Flags : 0x00000032
Host Flags : 0x00000030
Host COS : 0x00000000
Device COS : 0x00000007
State = 0x00000000
----------------------------------------------------
---------- System Device handling demo ----------
System Channel Info Block:
==========================
DPM Cookie : netX
DPM Size : 16384
Device Number : 7775000
Serial Number : 20146
HW Options : 0x0000 0x0000 0x0000 0x0000
Manufacturer : 1
Production Date : 4367
Device Class : 5
HW Revision : 2
HW Compatibility : 0
License Flags 1 : 0x00000000
License Flags 2 : 0x00000000
LicenseID : 0x0000
LicenseFlags : 0x0000
==========================
System Information:
===================
System Error : 0x0000000E
DPM Size : 16384
Mailbox size : 124
Device Number : 7775000
Serial Number : 20146
Open Count : 1
===================
System Control Block:
=====================
Command COS : 0x00000000
Reserved : 0x00000000
=====================
Waiting 2s to let cifX card calculate CPU load!
System Status Block:
====================
System COS : 0x80000000
System Status : 0x00000000
System Error : 0x0000000E
Time since start : 3
CPU Load [%] : 2.42
====================

Trying to read Security Eeprom:
===============================
System Mailbox State: MaxSend = 8, Pending Receive = 0
Send Packet (Read Crypto Flash Zone 1):
Dest : 0x00000000 ID : 0x00000000
Src : 0x00000000 Sta : 0x00000000
DestID : 0x00000000 Cmd : 0x00001EBC
SrcID : 0x00000000 Ext : 0x00000000
Len : 0x00000004 Rout : 0x00000000
Data:
01 00 00 00
System Mailbox State: MaxSend = 8, Pending Receive = 1
Received Packet (Read Crypto Flash Zone 1):
Dest : 0x00000000 ID : 0x00000000
Src : 0x00000000 Sta : 0x00000000
DestID : 0x00000000 Cmd : 0x00001EBD
SrcID : 0x00000000 Ext : 0x00000000
Len : 0x00000020 Rout : 0x00000000
Data:
00 02 A2 3B FD E1 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 93
System Mailbox State: MaxSend = 8, Pending Receive = 0
===============================

State = 0x00000000
----------------------------------------------------
---------- Communication Channel demo ----------
Communication Channel Info:
Device Number : 7775000
Serial Number : 20146
Firmware : EtherNet/IP Adapter
FW Version : 3.3.4 build 0
FW Date : 06/17/2016
Mailbox Size : 1596

Start put/get packet Demo!
Send Packet:
Dest : 0x00000000 ID : 0x00000000
Src : 0x00000000 Sta : 0x00000000
DestID : 0x00000000 Cmd : 0x00000000
SrcID : 0x00000000 Ext : 0x00000000
Len : 0x00000000 Rout : 0x00000000
Data:
Received Packet:
Dest : 0x00000000 ID : 0x00000000
Src : 0x00000000 Sta : 0xC0000004
DestID : 0x00000000 Cmd : 0x00000001
SrcID : 0x00000000 Ext : 0x00000000
Len : 0x00000000 Rout : 0x00000000
Data:

Start read/write IO-Data!
Error setting Bus state lRet = 0x800C0021!

--- Read / Write Block Information ---
Read CONTROL Block

00 00 00 00
Write CONTROL Block
Read COMMON Status Block

07 00 00 00
Write COMMON Status Block
Error writing to common status block. lRet = 0x800A0006
Read EXTENDED Status Block

00 00 00 00
Write EXTENDED Status Block
Error writing to extended status block. lRet = 0x800A0006

--- Event handling demo ---
Error: 0x800A001A, <>

--- Set Bus / Host State Demo ---
Set CIFX_HOST_STATE_READY!
CIFX_HOST_STATE_READ, state 1 !
Error CIFX_BUS_STATE_ON, state 1, error 0x800C0021 !
CIFX_BUS_STATE_OFF, state 0 !
Set CIFX_HOST_STATE_NOT_READY!
CIFX_HOST_STATE_READ, state 0 !
State = 0x00000000

and with IP ADD SHOW, cifx interface is not showing as shown below;

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:0d:cf:0a brd ff:ff:ff:ff:ff:ff
inet 192.168.20.31/24 brd 192.168.20.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::ba27:ebff:fe0d:cf0a/64 scope link
valid_lft forever preferred_lft forever

Thanks in advance!
  Reply
#3
Hi,

The error code at the beginning of the read/write process 0x800C0021 is described as follows:

CIFX_DEV_NO_COM_FLAG Communication flag not set. The fieldbus protocol stack has no communication to the fieldbus devices. Either the cable is disconnected or no other device is connected to the wire (NCF_COMMUNICATING flag not set).

Thus, there is no communication to the connected partner. Please doublecheck your connection to the master device. Below you will find a link to the cifX API reference manual where all error codes are described.
https://kb.hilscher.com/pages/viewpage.a...d=33129549

Best regards,
Simon
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Using netHAT drivers with custom linux (not Raspbian) FrankS 5 53 September-11th-2019, 06:16 AM
Last Post: Armin@netPI
  Use netPi firmware on netHAT zz_zesys 1 233 September-30th-2018, 08:04 PM
Last Post: Armin@netPI
  NetHat Labview richielfc 1 122 August-10th-2018, 12:08 PM
Last Post: Simon@netHAT
  EtherCAT slave configuration? snortman 1 167 April-17th-2018, 09:25 AM
Last Post: Simon@netHAT

Forum Jump:


Users browsing this thread: 1 Guest(s)