This commit is contained in:
2024-10-10 19:45:45 +06:00
parent df9b2445bd
commit 8d0606462d
4 changed files with 51 additions and 24 deletions

View File

@@ -6,10 +6,10 @@ W5500 VERSIONR: 0x04
Registering DHCP callbacks...
Calling DHCP_run()...
> Send DHCP_DISCOVER
DHCP message : 192.168.102.1(67) 311 received.
DHCP message : 192.168.102.1(67) 311 received.
> Receive DHCP_OFFER
> Send DHCP_REQUEST
DHCP message : 192.168.102.1(67) 311 received.
DHCP message : 192.168.102.1(67) 311 received.
> Receive DHCP_ACK
> Check leased IP - OK
@@ -23,20 +23,49 @@ Calling DNS_init()...
Resolving domain name "hye.su"...
> DNS Query to DNS Server : 192.168.102.1
> Receive DNS message from 192.168.102.1(53). len = 21
> Partial DNS message: 11 23 81 82 00 01 00 00 00 00 00 00 03 68 79 65 00 00 00 02 73
> Partial DNS message: 11 23 81 82 00 01 00 00 00 00 00 00 03 68 79 65 00 00 00 02 73
DNS_run() failed, res = 0
```
w/ ch32v003fun
> Partial DNS message: `11 23 81 82 00 01 00 00 00 00 00 00 03 68 79 65 00 00 00 02 73`
**DNS_run() failed, res = 0**
> **DNS_run() failed, res = 0**
w/ WCH HAL (none-os).. I get a full response
> Receive DNS message from 192.168.102.1(53). len = 56
> Partial DNS message: `11 23 81 80 00 01 00 02 00 00 00 00 03 68 79 65 02 73 75 00 00 01 00 01 C0 0C 00 01 00 01 00 00 01 2C 00 04 68 15 33 7F C0 0C 00 01 00 01 00 00 01 2C 00 04 AC 43 B4 9A `
Result: 172.67.180.154
> Result: 172.67.180.154
`RCC_CTLR`, GPIO Registers, `SPIx_CTLR1` registers are identical
## LA
### ch32v003fun
![ch32v003fun](notes/2024-10-10-191033_1876x540_scrot.png)
```
00 00 34 11 27 01 00 00 01 00 00 00 00 00 00 03 68 79 65 00 00 00 02 73 75 00 00 00 00 01 00 01
```
- 32 bytes long
- (Post `68 79 65`): `00 00 00 02 73 75 00 00 00 00 01 00 01`
### none-os
![none-os](notes/2024-10-10-191043_1891x525_scrot.png)
```
00 00 34 11 27 01 00 00 01 00 00 00 00 00 00 03 68 79 65 02 73 75 00 00 01 00 01
```
- 27 bytes long
- (Post `68 79 65`): `02 73 75 00 00 01 00 01`
## none-os
```c
// Initialize GPIO for W5500 CS
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
@@ -80,4 +109,4 @@ Result: 172.67.180.154
SPI_Cmd(SPI1, ENABLE);
}
```
```