+
Skip to content

optional parameters avoid append comma #11

@HerrMuellerluedenscheid

Description

@HerrMuellerluedenscheid

Hey,

I started a driver for the sim7020 NBIoT modem using at-commands. Super helpful!
Unfortunately, the handling of optional parameters seems to be different in this chip. Instead of providing empty comma separated parameters the chip seems to also make the delimiting comma optional.
e.g. creating a http session (section 8.2.1 in the AT reference pdf:

        at_commands::builder::CommandBuilder::create_set(buffer, true)
            .named("+CHTTPCREATE")
            .with_string_parameter("http://blabla")
            .with_optional_string_parameter(None)
            .with_optional_string_parameter(None)
            .finish()

// should produce: AT+CHTTPCREATE=http://blabla,,

The chip will return an error. Same happened with all other commands on that IC using optional parameters. If, instead, I use:

        at_commands::builder::CommandBuilder::create_set(buffer, true)
            .named("+CHTTPCREATE")
            .with_string_parameter("http://blabla")
            .finish()

// should produce: AT+CHTTPCREATE=http://blabla

it works fine.

Is this a different flavor of AT commands in general? If not, maybe a feature flag e.g. add_comma_on_optional_commands or alike to switch the delimiters on/off?
Looking forward hearing your thoughts on that.
Cheers

Marius

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载