Using w7500 http client on W5100 gives bad requests
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Using w7500 http client on W5100 gives bad requests
by Eugeny ·
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.
RE: RE: Using w7500 http client on W5100 gives bad requests
by ToasTer86 ·
Well that is the funny thing I only see one HTTP in wireshark and that is the bad request:
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.
RE: Using w7500 http client on W5100 gives bad requests
by Eugeny ·
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?
RE: Using w7500 http client on W5100 gives bad requests
by ToasTer86 ·
Any idea where I should start looking ?
RE: Using w7500 http client on W5100 gives bad requests
by Eugeny ·
You should open packet #16 in wireshark, look at its data content yourself, and show it here so that we can also see what is in.
RE: Using w7500 http client on W5100 gives bad requests
by ToasTer86 ·
Hey , I have opend the packet, thanks so much for your help so far.
But I cant read what is in it.
RE: Using w7500 http client on W5100 gives bad requests
by ToasTer86 ·
if I copy the text as bytes I get the following :
ScEn@XhVPk;uPe|'?f(A/:($N_C4;G4xc!X4F>@2w3
or
0000 9c eb e8 53 63 06 00 08 dc 00 ab cd 08 00 45 00 …Sc…E.
0010 00 6e 00 06 40 00 80 06 f1 58 c0 a8 89 97 68 1f .n…@…X…h.
0020 56 cc cb cd 00 50 6b 3b 75 df 97 97 0e cf 50 18 V…Pk;u…P.
0030 10 00 8b 89 00 00 b2 65 c8 a8 be 7c c5 e8 00 27 …e…|…’
0040 0d 0b 94 f1 ed 91 bf 3f 66 28 41 d9 2f 3a 9d 28 …?f(A./:.(
0050 fb 24 ef 4e 5f c0 1e 00 b5 8d 43 34 3b f8 47 06 .$.N_…C4;.G.
0060 d6 34 ff b3 f1 1a f0 15 f4 78 84 63 ad 21 58 34 .4…x.c.!X4
0070 07 46 93 b9 3e 40 32 d2 9b 77 33 9a .F…>@2…
RE: Using w7500 http client on W5100 gives bad requests
by ToasTer86 ·
Packet export through wireshark
No. Time Source Destination Protocol Length Info
14 0.680129 192.168.137.151 104.31.86.204 TCP 124 52173 → 80 [PSH, ACK] Seq=1 Ack=1 Win=4096 Len=70
Frame 14: 124 bytes on wire (992 bits), 124 bytes captured (992 bits) on interface 0
Ethernet II, Src: Wiznet_00:ab:cd (00:08:dc:00:ab:cd), Dst: BizlinkK_53:63:06 (9c:eb:e8:53:63:06)
Internet Protocol Version 4, Src: 192.168.137.151, Dst: 104.31.86.204
Transmission Control Protocol, Src Port: 52173, Dst Port: 80, Seq: 1, Ack: 1, Len: 70
Source Port: 52173
Destination Port: 80
[Stream index: 1]
[TCP Segment Len: 70]
Sequence number: 1 (relative sequence number)
[Next sequence number: 71 (relative sequence number)]
Acknowledgment number: 1 (relative ack number)
0101 … = Header Length: 20 bytes (5)
Flags: 0x018 (PSH, ACK)
Window size value: 4096
[Calculated window size: 4096]
[Window size scaling factor: -2 (no window scaling used)]
Checksum: 0x8b89 [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
[SEQ/ACK analysis]
[iRTT: 0.006675000 seconds]
[Bytes in flight: 70]
[Bytes sent since last PSH flag: 70]
TCP payload (70 bytes)
Thanks again for all the help and pointers.
RE: Using w7500 http client on W5100 gives bad requests
by Eugeny ·
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?
RE: Using w7500 http client on W5100 gives bad requests
by ToasTer86 ·
Requestb.in should respond with a text format " Ok "
I will have to check about tx and the points, I am just using the httpClient.C library and the library for the wiznet chips as proposed on this github: BLE_to_TCP_W5500_Shield/examples/ble_central/ble_uart_c_to_tcpc/Wiznet at master · hooni1020/BLE_to_TCP_W5500_Shield · GitHub
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
RE: Using w7500 http client on W5100 gives bad requests
by ToasTer86 ·
Eugeny , so with the " garbage’" you mean that what I actually should see is just the header and post I am sending on the chip ?
Those weird signs and data is a sign that my chip is not functioning correctly ?