Skip to content

Webrequest gets "Failed to make HTTP request: Tls(IoError)" or "Failed to send HTTP request: Network(ConnectionReset)" #4773

@RayLucchesi

Description

@RayLucchesi

I copied examples/rp/src/bin/webrequest.rs to examples/rp235x/src/bin/c_webrequest.rs... changed the DEFAULT_CLOCK_DIVIDER to RM2_CLOCK_DIVIDER and modified it to display error type on send HTTP request failure.

Added the examples/rp/Cargo.toml lines for webrequest.rs to the examples/rp235x/Cargo.toml.

I tried both TLS mode and non-TLS mode and get different errors. I also added "embedded-tis" to the features list for reqwless crate and it didn't seem to make any difference.

Snippet of TLS debug log:
125.379454 [WARN ] Number of DNS servers exceeds DNS_MAX_SERVER_COUNT, truncating list. (embassy_net embassy-net/src/lib.rs:791)
125.380921 [INFO ] Stack is up! (c_wifi_webrequest src/bin/c_wifi_webrequest.rs:122)
125.381420 [INFO ] connecting to https://worldtimeapi.org/api/timezone/Europe/Berlin (c_wifi_webrequest src/bin/c_wifi_webrequest.rs:142)
125.384760 [DEBUG] address 10.0.0.1 not in neighbor cache, sending ARP request (smoltcp smoltcp-0.12.0/src/macros.rs:18)
125.560545 [DEBUG] start_record(Handshake(false)) (embedded_tls embedded-tls-0.17.0/src/fmt.rs:122)
126.047550 [DEBUG] received a keep-alive or window probe packet, will send an ACK (smoltcp smoltcp-0.12.0/src/macros.rs:18)
126.047937 [DEBUG] sending sACK option with current assembler ranges (smoltcp smoltcp-0.12.0/src/macros.rs:18)
126.150138 [ERROR] Failed to make HTTP request: Tls(IoError) (c_wifi_webrequest src/bin/c_wifi_webrequest.rs:147)

snippet of non-TLS Debuge log (NB: i altered webrequesst to show the error type returned in error message"
6.528185 [WARN ] Number of DNS servers exceeds DNS_MAX_SERVER_COUNT, truncating list. (embassy_net embassy-net/src/lib.rs:791)
6.529657 [INFO ] Stack is up! (c_wifi_webrequest src/bin/c_wifi_webrequest.rs:121)
6.530146 [INFO ] connecting to http://worldtimeapi.org/api/timezone/Europe/Berlin (c_wifi_webrequest src/bin/c_wifi_webrequest.rs:141)
6.533481 [DEBUG] address 10.0.0.1 not in neighbor cache, sending ARP request (smoltcp smoltcp-0.12.0/src/macros.rs:18)
6.800721 [ERROR] Failed to send HTTP request: Network(ConnectionReset) (c_wifi_webrequest src/bin/c_wifi_webrequest.rs:155)

if there's anything else you need please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions