Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiznet W5100 support #1316

Merged
merged 5 commits into from Jan 31, 2018
Merged

Wiznet W5100 support #1316

merged 5 commits into from Jan 31, 2018

Conversation

opichals
Copy link
Contributor

@opichals opichals commented Jan 21, 2018

I defined the _WIZCHIP_ to 5100 I got some compile time errors in Ethernet/socket.c so I went to upgrade the ./libs/network/wiznet/Ethernet folder to the latest Wiznet/ioLibrary_Driver v3.1.3.

It seems that the code is now too large to fit the flash on the original Espruino boards?

@opichals
Copy link
Contributor Author

The default W5500 build:

WIZNET=1 RELEASE=1 BOARD=ESPRUINOBOARD make
...
bash scripts/check_size.sh espruino_1v95.1392_espruino_1r3.bin
FAIL - size of 231460 is over 231424 bytes

The new W5100 build:

WIZNET=1 W5100=1 RELEASE=1 BOARD=ESPRUINOBOARD make
...
bash scripts/check_size.sh espruino_1v95.1392_espruino_1r3.bin
FAIL - size of 231884 is over 231424 bytes```

@opichals
Copy link
Contributor Author

opichals commented Jan 21, 2018

Please note that this PR is so far just blind software only work without any HW testing done.

@gfwilliams
Copy link
Member

That's very cool - thanks! I'll try and give this a go on some actual hardware when I get a chance.

It's always been really tight trying to get everything to fit in the original board, so I'm not super surprised about this - but I wonder what got added to the driver that bulked it out so much :(

@gfwilliams
Copy link
Member

Not having much luck here either. It looks like ctlwizchip(CW_GET_PHYLINK doesn't work for W5100 so can be commented out, but even after that I'm not able to set/get the IP with:

eth.setIP({
ip:"192.168.1.123",
subnet:"255.255.255.0",
gateway:"192.168.1.1",
dns:"8.8.8.8",
mac:"00:08:dc:ab:cd:ef"});
eth.getIP();

This should just be a matter of writing to SPI registers, so I'm not sure what's up. It might even be electrical since the shield is meant for 5v inputs... I wonder if it works so well off 3.3v data lines.

@gfwilliams
Copy link
Member

It works! It was because the shield I used actually had SPI on the tiny little header at the end - not on D11,12,13 like I was expecting.

@gfwilliams gfwilliams merged commit ccf40d0 into espruino:master Jan 31, 2018
@gfwilliams
Copy link
Member

All merged in - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants