!sgXEFOWtqDlGqUMWAl:matrix.org

Drogue IoT

102 Members
Rust based firmware for the device & IoT friendly APIs for the cloud8 Servers

Load older messages


SenderMessageTime
29 Feb 2024
@greengenie:matrix.orgAdam HottI don't know what that means17:21:09
@lulf_:matrix.orglulfBasically it means that communications are still encrypted, but you can't really 'trust' the the other end being who it says it is.17:21:39
@greengenie:matrix.orgAdam HottIs that very difficult to implement?17:24:44
@greengenie:matrix.orgAdam HottI have no idea what that would entail17:27:35
@lulf_:matrix.orglulfThis is the issue tracking this feature https://github.com/drogue-iot/embedded-tls/issues/1317:29:01
@greengenie:matrix.orgAdam HottThanks, very interesting!17:35:48
@bobmcwhirter:matrix.orgBob McWhirterit'd involve dealing with the certificate chain(s) and x509/DER or whatnot19:00:46
@greengenie:matrix.orgAdam Hottgotcha, thanks that's interesting19:03:37
5 Mar 2024
@enebo:matrix.orgenebo set a profile picture.18:40:05
13 Mar 2024
@moerk:matrix.orgmoerk Is their any mqtt lib you guys can recommend?  18:54:12
@lulf_:matrix.orglulf moerk: https://crates.io/crates/rust-mqtt or https://crates.io/crates/minimq 18:58:38
@lulf_:matrix.orglulfAssuming you meant for embedded18:59:12
@moerk:matrix.orgmoerk Yes thanks 19:14:05
17 Mar 2024
@stdsp:matrix.orgstdsp joined the room.18:30:40
@stdsp:matrix.orgstdspRedacted or Malformed Event18:39:52
@stdsp:matrix.orgstdsp *

Hi, I'm trying to use reqwless without async to perform a get request, however I am running into an error which I can't seem to understand. When I run the below MVP, I get:

done = Err(
    Network(
        WriteZero,
    ),
)

&buf = []
// [dependencies]
// futures = "0.3.30"
// reqwless = "0.11.0"

use futures::Future;
use reqwless::request::{Request, RequestBuilder};
use std::{
    pin::pin,
    task::{Context, Poll},
};

const URL: &str = "https://reqbin.com/echo/get/json";

fn main() {
    let req = Request::get(URL).build();
    let mut buf = Vec::new();
    {
        let mut buf_slice = &mut buf[..];
        let mut req_fut = req.write(&mut buf_slice);
        let mut pin_req_fut = pin!(req_fut);

        let waker = futures::task::noop_waker();
        let mut context = Context::from_waker(&waker);

        loop {
            match pin_req_fut.as_mut().poll(&mut context) {
                Poll::Ready(done) => {
                    dbg!(done);
                    break;
                }
                Poll::Pending => continue,
            }
        }
    }
    dbg!(&buf);
}
18:40:17
@stdsp:matrix.orgstdspIs there a https get request example for reqwless? https://github.com/drogue-iot/reqwless/blob/main/tests/request.rs#L79 here is a http request, is there one like this for https?20:16:57
@lulf_:matrix.orglulf stdsp: have a look at the tests https://github.com/drogue-iot/reqwless/blob/main/tests/client.rs#L205 20:18:32
@lulf_:matrix.orglulfIt's for tokio, but give you a hint on how to use it20:19:01
@lulf_:matrix.orglulf * It's using tokio, but give you a hint on how to use it20:19:08
@lulf_:matrix.orglulf * stdsp: have a look at the other tests https://github.com/drogue-iot/reqwless/blob/main/tests/client.rs#L205 20:22:56
@stdsp:matrix.orgstdsp
In reply to @lulf_:matrix.org
It's using tokio, but give you a hint on how to use it
Thank you
20:24:46
@misterinterrupt:matrix.orgmatty interrupt joined the room.23:23:07
18 Mar 2024
@stdsp:matrix.orgstdsphttps://github.com/drogue-iot/reqwless/blob/main/tests/connection.rs#L55 Does something like TokioTcp and TokioStream exist for async_std?19:24:51
@stdsp:matrix.orgstdspRedacted or Malformed Event19:50:12
@stdsp:matrix.orgstdspRedacted or Malformed Event20:21:41
@stdsp:matrix.orgstdsp https://github.com/drogue-iot/embedded-tls/blob/main/tests/split_test.rs#L63_L112
Is there an example of connecting to an external API?
I'm trying to perform a get request replicating https://reqbin.com/req/5nqtoxbx/get-json-example#
I changed addr to let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(104, 26, 7, 224)), 443);
However I get an error: error establishing TLS connection: InvalidRecord
21:17:38
20 Mar 2024
@a2ron:matrix.orgAaron TsuiA related question, is there an example of connecting to MQTT server with TLS, say x.509 certificate?23:29:52
21 Apr 2024
@greengenie:matrix.orgAdam Hott
In reply to @a2ron:matrix.org
A related question, is there an example of connecting to MQTT server with TLS, say x.509 certificate?
hey I have an example if you'd like
12:58:14
@greengenie:matrix.orgAdam HottIt's for an esp32c312:58:26

There are no newer messages yet.


Back to Room ListRoom Version: 5