Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ENC28j60 simulation in Proteus over Windows10

Status
Not open for further replies.

ebekman

Newbie
Joined
May 7, 2022
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Brazil
Activity points
42
Hi everyone.

I start write my network stack for PIC18F4550 + ENC28J60 for fun and test my code in Proteus.

I already wrote the frame layer, IP layer, ARP, ICMP, PING and all works great. The problem comes when a started the DHCP protocol.

After I send the DISCOVER packet and router send back the OFFER, my code dont recognise all received data.
Only first 100 bytes arrive, but WireShark shows a total of 598 byte on the wire.

All my preview code (frame layer, IP layer, ARP Protocol, ICMP, PING) uses less than 100 bytes of inbound traffic and all works nicelly.

To help the debug process, I enable the diagnostics of ENC28J60 in "Packets Send/Receive" option to "Full trace", then I notice that the incoming traffic in Proteus is limited to 100 bytes (length = 068 in debug line), the outbound trafic is normal.

To make a cross check of this issue, I try the sample project "Arduino with ENC28J60 Ethernet Shield", locate in proteus sample library.
And the simulation have same behavior, Proteus only see first 100 bytes of incoming data.

- I try to reinstall my copy of Proteus in my computer- Not work
- I try install on another computer - Not work, same issue
- I try disable the flowcontror of my network card (proteus help say to do for some reason) - No.......
- I try to install a brand new demo copy of Proteus 8.14 downloaded from LabCenter website and run the ENC28j60 sample project - Nop too
- I install the Microsoft loopback network adapter (virtual network card) help wireshark debug because its no internet traffic - Nooooo
- I google, I bing, I really try


Until ... I try a Windows 7 + Proteus 8.9 in a Virtual machine - This works.
Than I figure that are not error in my code, but a conflict between proteus and Windows 10


Anyone have a idea to solve this?

I use my laptop to develop all my projects and running a VM only for proteus is waste of battery time.


- Proteus in Windows 10:
Windows10.jpg

- Proteus in a Windows 7 Virtual Machine
Windows7_VM.jpg
 

I try this morning, change the npcap for the old Winpcap and works!

I use the npcat becase in winpcap website has an advice that newer windows versions is unsuported and ask to install npcap instead.

The combination between npcap and proteus truncate the packages in 100 bytes.

If your network simulations in proteus stop working do the same!
 

The npcap or winpcap don't matter, this is not the solution, either works.

The real problem is my Broadcom 802.11n wi-fi network card, that not provide support for capture traffic

Via wired network the wireshark get the full packet with no problems.

I use my laptop to developer and using a wired network makes no sense, then I install a virtual network adapter (loopback adapter), attached the ENC28J60 to the IP of virtual adapter and point WireShark to monitoring this IP.
 

My suggestion is to start using a real device. Proteus is a simulator and as such can have bugs of its own that the real device doesn't.
Also have you looked at the code on the Microchip site. I've not used their MCC but I certainly have had success using the MLA.
Susan
 

The npcap or winpcap don't matter, this is not the solution, either works.

The real problem is my Broadcom 802.11n wi-fi network card, that not provide support for capture traffic

Via wired network the wireshark get the full packet with no problems.

I use my laptop to developer and using a wired network makes no sense, then I install a virtual network adapter (loopback adapter), attached the ENC28J60 to the IP of virtual adapter and point WireShark to monitoring this IP.
Hi ebekman!
I've got exaclty the same problem with proteus under Win11. But still can't beat it. Could you please clarify your solution with more details.
I mean:
1. I attached a wired USB lan adapter to my laptop and bound ENC28j60 in proteus to it, but it still doesn't work.
2. I disabled checksum properties in network card driver as suggested by proteus manual. But all of this to no avail.

Please help if it works for you.
Many thanks in advance!!!!
Regards, uch.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top