In the first topic someone rewritten the W7500 http client to the W5100, i have done so as well. but right now I am not able to send out valid requests, and the data I receive is in a weird format.
In the image below in the putty terminal you can see the header I am sending out over the W5100.
And in the wireshark behind you can see the bad request & and the message I receive.
The message I receive is also encoded so I cant really read it.
any help would be appreciated, I am trying to get this working
If it replies with bad request, then you make bad request to the server. Where’s screenshot of the request packet? Please attach it to see what your W5100 requests from server.
So the DHCP is the start up from the machine. The wiznet chip gets IP 192.168.137.151.
Then establishes a connection to 104.31.86.204 (https://requestb.in/)
But I do not see a outgoing HTTP request.
I think the library I am using has to be re written for the wiznet 5100 chip but I am not sure where.
Message #16 must be a request to server. As Wireshark does not classify it as HTTP, your driver is really sending something incorrectly. What is the content of this packet?
And what you think web server should respond for this request? Of course it responds with 400 bad request. You must now debug why W5100 sends this garbage instead of HTTP request you construct earlier. Do you copy the required data into TX buffer? Do you use correct pointers - memory and TX buffer?
I changed the SPI pins and the SPI mode to 0 and was able to iniatilize ethernet and a IP adress.
Also got DHCP working. I am using the user_ethernet.c & user_spi.c to write .
So I have not changed anything in w5100.c / wizchip_conf.h
I was opening socket 3 on the wiznet 5100. Now I changed it to socket 1 and it immediatly works.
How could this be the problem. It should have 4 sockets available right ?
prototype of the function :
uint8_t httpc_init(uint8_t sock, uint8_t * ip, uint16_t port, uint8_t * sbuf, uint8_t * rbuf);
call of the function httpc_init(3, back_end_ip, 80, g_send_buf, g_recv_buf);
Yes, it should have worked through socket 3. Search for problems in the code. Assuming you have 2K RAM allocation for each socket (0x55 in both memory registers), and according to your finding, I think it could be the case what you were writing data to the wrong socket TX location.
Is socket 3 already in use by another task, or is it possible that the socket was set to over 2kB in the initialization of the socket buffer?
The default value of TX and RX socket buffer size is 2KB each. For a W5100 chip with four hardware sockets, If you adjust the TX / RX buffer size of ‘socket 0’ to 4KB(x 2), the buffer size of ‘socket 3’ becomes 0 (Not available).