-
Notifications
You must be signed in to change notification settings - Fork 51
AdvancedWebServer example give me wrong ip HTTP EthernetWebServer is @ IP : 0.0.0.0 #62
Comments
This means the W5100 board is not connected correctly and is not initialized.
Show how you connected (M0 pin <-> W5100) |
Try the simplest WebClient example from Ethernet library and be sure working before moving to more complex libraries and examples. I'm closing the issue now, and won't reopen until you prove this is a bug of this library. |
Thank you for reply. I tried this with SAMD21 M0 board and with Arduino UNO. Both with the same ethernet shield Wiznet W5100, Arduino original shield and WebClient example from Ethernet Library. This is monitor from UNO:
This is monitor from SAMD21 M0:
|
You have to modify these lines 73-80 from EthernetWebServer/examples/HelloServer/defines.h Lines 73 to 80 in 4fa2bca
to
or
If not working, you have to connect directly from
If not working, you can ask on Arduino Forum for help (M0 card bad SPI pins, M0 bad ICSP connection, etc) Good Luck, |
You can also try the new EthernetWebServer v2.2.1, which will try to auto-select the Releases v2.2.1
|
Hi, thank you for help.
My next step was update library to 2.2.1, open in examples WebClient, edit Serial to SerialUSB
The third step, I can not found this pins 16-23 on the board. |
Hi @proasnet It seems that your If you have the multimeter, you can check the M0 ICSP is connecting to which pins. The remaining way is to read the docs, ask around the Arduino Forum, to match the SPI pins Somewhere you can find the SPI pins used for that special M0 board. |
Its the same |
For M0, Pin 10 <=> PA18 Pin 16 <=> PB09 <=> A2 With your latest test, it seems that M0 is communicating OK with W5100 (no more no chip error).
Possibly M0 is bad (SPI, etc.) It's better you buy W5500 and connect directly to M0 to try. I suggest you use RP2040 + W5100S or W5500, such as WIZNET_5500_EVB_PICO, WIZNET_5100S_EVB_PICO. More powerful and integrated. |
So, my next experimet was, that I use a example Ethernet 2.0.1 library, WebClient, this working.
Webserver example print:
In URL 192.168.0.122 with firefox I get this page and its live values: |
Good news, I'll check why we have M0 problem getting correct IP address.
If you're willing to spend some time to help test and fix the bug (as I currently don't have the same SAMD21 M0 board), I'll reopen this issue. Steps to test
|
Hi, I can continue at next week at wednesday, because to this time I am at
home without a board and time to do it.
Dne pá 26. 8. 2022 20:12 uživatel Khoi Hoang ***@***.***>
napsal:
… Good news, I'll check why we have M0 problem getting correct IP address.
Possibly recent update in Ethernet_Generic v2.4.0
<https://github.com/khoih-prog/Ethernet_Generic/releases/tag/v2.4.0> is
not compatible with Arduino SAAMD core ???
Releases v2.4.0
1. Using *raw_address()* as default instead of *private IPAddress data*
2. Add missing LibraryPatches for ESP32
3. Update Packages' Patches
If you're willing to spend some time to help test and fix the bug (as I
currently don't have the same SAMD21 M0 board), I'll reopen this issue.
------------------------------
Steps to test
1. Install *Ethernet_Generic v2.3.1*
<https://github.com/khoih-prog/Ethernet_Generic/releases/tag/v2.3.1>
to replace *Ethernet_Generic v2.4.0*
<https://github.com/khoih-prog/Ethernet_Generic/releases/tag/v2.4.0>
2. Use the same example code of this latest *EthernetWebServer* v2.2.1
<https://github.com/khoih-prog/EthernetWebServer/releases/tag/v2.2.1>
—
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASIIEIXC5D2V35RYEOWJIJLV3ECKJANCNFSM57OU2M7A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @proasnet Please try using the latest Ethernet_Generic v2.5.0 with better compatibility to other cores Releases v2.5.0
|
Hi @khoih-prog ,
Example from Ethernet library - WebClient and WebServer working. |
Can you use the the following test code (using Ethernet or EthernetLarge library) 1) File WebClient_SAMD21_M0.ino
2) defines.h
and see if OK. If OK, then to recheck with Ethernet_Generic library, modify a line in the
to
I need some more debug info as I won't have the M0 board here until several weeks (just ordered). |
Hi @khoih-prog
If I comment this both lines, compile working, then after test, this is monitor:
Then I edit defines.h to monitor:
|
You forget to patch the core. Anyway, add to defines.h
Great. You did it. Then change to use |
I updated previous comment, please see up. Thanks |
Try comment out to see if better ???
|
It not help, the same result.
|
OK, I think I found out the issue. Try to add to
such as
and put back after OK to test
The reason is |
in ino:
in monitor:
|
Dear @khoih-prog , |
Thanks. Sorry, one more step ( to reduce clock to 8MHz from 14MHz) before we have to wait Change from
to
|
This header file I found in my computer at
|
The actual issue is that the W5100 is too old and it's better to use W5500. If you're using W5100, you can use Ethernet library, without problem. |
Thank you for the information. I bought my shield 3 months ago, there are a lot of them in e-shops. I also looked at the W5500, but I couldn't find one for a normal price as a shield, which is not on the wires, but as a plug-in module. |
I would also like to ask you if you would not modify the WebServer example with the ethernet.h library so that it is clean only for my SAMD21 M0 board, without the maze of else, else if endif, etc. It would take me a long time to clean it up . |
One more change, if you have time to help Comment out
Will do later |
compile error:
|
Sorry again, replace with
|
Working:
|
Good news. That's really because of the too old W5100 requires slow clock. I have another W5100 but never have this kind of slow-clock issue. I'll make some notes and user configurable settings for W5100 in the new release. |
Good. Thank you. |
Will do. |
### Releases v2.5.1 1. Slow SPI clock to `8MHz` and select `SPI_MODE0` for old W5100 shield using SAMD Zero. Check [AdvancedWebServer example give me wrong ip HTTP EthernetWebServer is @ IP : 0.0.0.0 #62](khoih-prog/EthernetWebServer#62) 2. Default to `W5100` to be safe. To change if using `W5200, W5500, W5100s` or testing faster SPI clock speeds
HI @proasnet The new Ethernet_Generic releases v2.5.1 has just been published. Your contribution is noted in Contributions and Thanks Best Regards, Releases v2.5.1
|
Hi @proasnet As promised, hereafter is the code for HTTPBasicAuth_SAMD_M0
|
Hi @khoih-prog , I am sorry for later answer.
Without IP adress again. |
Sorry, I think I forgot some lines of code because I didn't have the M0 board then. Please add at the beginning
PS: Bad luck that I just received the M0 board and it broken at the first try. So |
Thank you @khoih-prog
The last lines was after a long time, some minutes.
|
I'm sure missing some lines somewhere. Still OK with Ethernet_Generic's You have to wait some time until I receive the new boards ;={{ |
Okay, I am waiting :) |
Hi @proasnet Just received the boards. Try this
I'm OK here. Be sure to select
|
hi @khoih-prog, |
Missing
That's why the library tried to use the more aggressive SPI timings for newer boards, and SAMD Zero can't take it. |
Dear @khoih-prog , if this working fine, I trying find example with some form, for example as in old library, that I used in my project and I am reworking all for your library - setting ethernet parameters by web, setting other program values stored in flash. After login to server, user or admin can display web form with traditional network settings, that is saved to eeprom in the mega case, with SAMD M0 to flash. |
HI @proasnet You can check the POST-related examples in this library, such as If you need help, I suggest that you do some little Google-research, or post the issue on Good Luck, |
Describe the bug
I have a new board SAMD21 M0 size as Arduino UNO, compatible with Arduino M0, native port, with ethernet shield Wiznet W5100.
I tried example code Hello World, edit all serial.print to serialUSB.print and load to cpu over Native USB port, I have selected Arduino M0 board in Arduino IDE. Then, I get this from serial monitor:
I have a company network on 192.168.0.x with DHCP. Before, this shield I used with MEGA and webduino, working.
Thank you.
The text was updated successfully, but these errors were encountered: