What do you mean when there is no communication with the chip? Could you also show some code? I tested the ENC28 on the Spider both with no cable connected and the module itself unplugged, in both cases all three of the properties you listed returned false.
Assume a SPI that is connected to nothing - or assume that the ENC28 chip is dead or sick.
Then you create the ENC28 class and calls Open().
The property IsOpen then returns True - it should return False, no connection to ENC28 is opened and no communication was ever successful.
Next all other properties returns True aswell - like IsCableConnected etc. You do not know!
All you initializations of check properties should default be FALSE - always!
Then if you are 100% sure that evething acted as it should - like SPI commnunication OK, Values is received that 100% confirms that a cable is connected, Checksums OK etc. Then you returns a True - in all other cases FALSE.
The open call just prepares some things internally so that communication with the ENC28 can take place, which is why the IsOpen call returns true after you call open, regardless of whether or not the ENC28 is actually connected. When you read IsCableConnected, we read a register from the chip. If there is no chip connected, the SPI MISO line is left floating and the IsCableConnected bit could be either 0 or 1, we have no way of verifying if that bit is valid. There is no real way to validate that bit. The IsActivated property just tells you if the ENC28 network interface is the active interface in the system. To test presence of the chip, you should either try to send and receive data with it, or wait for the NetworkAddressChanged event if it is applicable.
The value is default false. If the bit we read is true because the line was floating and happened to be high at that moment, the value then becomes true. As I said, if you want to be sure that there is a chip present, try to send and receive data after the open and connected properties return true.
When there is no chip or a chip failure the you SPI communication failes.
Then your result value should be false - due to SPI failure.
Same as no cable!
I am also experiencing the same thing on EMX and 4.2.10.
EthernetBuiltin.IsCableConnected return true while there’s no cable… this is really confusing and has to be solved.
Can you try quickly using the latest firmware and can you show your code? Using an EMX with the latest firmware, IsCableConnected performed as it is supposed to for me, true when there is a cable connected, false otherwise.
I don’t know how much time it will take to change all my code on this SDK and how much new bugs this will involve. Seriously, I know that upgrading may solve this particular case but it will certainly break something else… I have no time right now for that.
This is what I noticed or may be I did something wrong. I explain: I have first uninstalled the previous sdk and then install the new one. I have opened my project without any modification (without reloading any references) and click on run and no errors!!! And the Cable Disconnect error seems to be solved.
The weird thing is that I did not update the GHI FW on the device (it still print 4.2.10), I just uploaded the appplication builded with 4.2.11…
EDIT:
I finally rechecked on 4.2.10 and it is working! I definitely shouldn’t code during two weeks after the new years eve party!