Closed mschnell1 closed 1 year ago
I am not quite sure what is wrong in your case, but all the URC's i am using this for are using colon, and it works fine?
https://github.com/BlackbirdHQ/ublox-cellular-rs/blob/master/ublox-cellular/src/command/mod.rs
It's a bit hard without seeing your enum
I have:
pub enum Urc {
#[at_urc("+QMTRECV")]
QmtrecvReceived(mqtt::on_receive::OnReceived),
#[at_urc("+QMTOPEN")]
QmtopenReceived(mqtt::on_receive::OnReceived),
#[at_urc("+QISTAT")]
QistateReceived(mqtt::on_receive::OnReceived),
}
I can reproduce the problem with just one.
And how does your OnReceived
struct look?
(Not in the office right now)
AH, the OnReceived
struct is used to configure the Parser. That does make sense.
As I did not find information on that, I just put some random elements in that struct +QMTOPEN: 0,3
I'll try to find more information on that ... (
Thanks
Yep ! with constructing an appropriate OnReceived struct such as
#[derive(Clone, AtatResp)]
pub struct OnReceivedQmtOpen {
pub p1: u32,
pub p2: u32,
}
it works. Thanks for your help !
The Modem I use (Quectel EC25) after connecting or trying to connect to the Network sends something like
+QMTOPEN: 0,3
I know that / how I can implement my own parser for responses to client.send(), but this response is delayed after the command to the Modem, and hence I seem to need to add the#[at_urc("+QMTOPEN")]
to the Urc enum. Unfortunately I getERROR atat::ingress > Parsing URC FAILED: "+QMTOPEN: 0,3"
and hence no return fromsubscriber.next_message().await;
We already did test, that the standard parser does not like colons. Is this intentionnally ? Is there a way to handle such Modem responses ? (This modem sends colons in a lot of Urcs. ) -Michael