Anyone got AT commands work using asio serial port?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
Hi,

There are many boost serial port sample code out there, but none of
them I can run AT command. I have a device connected to my ubuntu 18,
I can run AT command on minicom to get correct response, but I could
not get any AT response from boost serial port. Has anyone made it
work?

Thank you.

Kind regards,

- jh

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
пн, 13 янв. 2020 г. в 12:12, JH via Boost <[hidden email]>:

>
> Hi,
>
> There are many boost serial port sample code out there, but none of
> them I can run AT command. I have a device connected to my ubuntu 18,
> I can run AT command on minicom to get correct response, but I could
> not get any AT response from boost serial port. Has anyone made it
> work?
>
> Thank you.
>
> Kind regards,
>
> - jh
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Could you please show the code?
Just guess, incorrect baud rate or other config parameters (ref.
https://www.boost.org/doc/libs/1_72_0/doc/html/boost_asio/reference/basic_serial_port/set_option.html)

--
Best Regards,
Sergei Nikulov

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
Hi Sergei,

Thanks for your response.

Please find code I found from Internet attached, the same baud rate,
serial port and AT command I can get response from minicom, but empty
response from the boost serial port, I don't think it was the baud
rate issue or option parameters issue, but I could be wrong.

Appreciate if you could get it work.

Thank you.

Kind regards,

- jh

On 1/13/20, Sergei Nikulov <[hidden email]> wrote:

> пн, 13 янв. 2020 г. в 12:12, JH via Boost <[hidden email]>:
>>
>> Hi,
>>
>> There are many boost serial port sample code out there, but none of
>> them I can run AT command. I have a device connected to my ubuntu 18,
>> I can run AT command on minicom to get correct response, but I could
>> not get any AT response from boost serial port. Has anyone made it
>> work?
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jh
>>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost
>
> Could you please show the code?
> Just guess, incorrect baud rate or other config parameters (ref.
> https://www.boost.org/doc/libs/1_72_0/doc/html/boost_asio/reference/basic_serial_port/set_option.html)
>
> --
> Best Regards,
> Sergei Nikulov
>


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

serialstream.cpp (8K) Download Attachment
serialstream.h (8K) Download Attachment
main.cpp (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
Hello JH

If SerialOptions defaults (parity, csize, flow, stop) are good for you

SerialOptions() : device(), baudrate(9600), timeout(seconds(0)),
            parity(noparity), csize(8), flow(noflow), stop(one) {}

then try to add \r to the end of your AT command
- serial<<"AT+CGDCONT?" << endl;.
+ serial<<"AT+CGDCONT?\r\n";

AFAIR, AT commands, use it as line end (ref
https://en.wikipedia.org/wiki/Hayes_command_set), but on Linux
std::endl only LF(0x0A).
Maybe this is your case.
HTH.

вт, 14 янв. 2020 г. в 02:34, JH <[hidden email]>:

>
> Hi Sergei,
>
> Thanks for your response.
>
> Please find code I found from Internet attached, the same baud rate,
> serial port and AT command I can get response from minicom, but empty
> response from the boost serial port, I don't think it was the baud
> rate issue or option parameters issue, but I could be wrong.
>
> Appreciate if you could get it work.
>
> Thank you.
>
> Kind regards,
>
> - jh
>
> On 1/13/20, Sergei Nikulov <[hidden email]> wrote:
> > пн, 13 янв. 2020 г. в 12:12, JH via Boost <[hidden email]>:
> >>
> >> Hi,
> >>
> >> There are many boost serial port sample code out there, but none of
> >> them I can run AT command. I have a device connected to my ubuntu 18,
> >> I can run AT command on minicom to get correct response, but I could
> >> not get any AT response from boost serial port. Has anyone made it
> >> work?
> >>
> >> Thank you.
> >>
> >> Kind regards,
> >>
> >> - jh
> >>
> >> _______________________________________________
> >> Unsubscribe & other changes:
> >> http://lists.boost.org/mailman/listinfo.cgi/boost
> >
> > Could you please show the code?
> > Just guess, incorrect baud rate or other config parameters (ref.
> > https://www.boost.org/doc/libs/1_72_0/doc/html/boost_asio/reference/basic_serial_port/set_option.html)
> >
> > --
> > Best Regards,
> > Sergei Nikulov
> >



--
Best Regards,
Sergei Nikulov

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
This is a top-post reminding people to please not top-post:
<https://www.boost.org/community/policy.html#quoting>



On 1/14/20 00:05, Sergei Nikulov via Boost wrote:
> Hello JH
>
> If SerialOptions defaults (parity, csize, flow, stop) are good for you
>
> SerialOptions() : device(), baudrate(9600), timeout(seconds(0)),
>             parity(noparity), csize(8), flow(noflow), stop(one) {}
>

<snip a bunch of top posting>

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
Hi Sergei,

Thanks for your response.

On 1/14/20, Sergei Nikulov <[hidden email]> wrote:
> Hello JH
>
> If SerialOptions defaults (parity, csize, flow, stop) are good for you

Yes, I was using all defaults, that should work right?

> SerialOptions() : device(), baudrate(9600), timeout(seconds(0)),
>             parity(noparity), csize(8), flow(noflow), stop(one) {}

The only different was I set baudrate to 115200, I changed to use
9600, doesn't seem work either.

> then try to add \r to the end of your AT command
> - serial<<"AT+CGDCONT?" << endl;.
> + serial<<"AT+CGDCONT?\r\n";
I did try to add "\r\n", no avail.

Hmm, did not realize boost serial port is that hard, any working boost
serial port samples online?

Thank you.

Kind regards,

- jh

> AFAIR, AT commands, use it as line end (ref
> https://en.wikipedia.org/wiki/Hayes_command_set), but on Linux
> std::endl only LF(0x0A).
> Maybe this is your case.
> HTH.
>
> вт, 14 янв. 2020 г. в 02:34, JH <[hidden email]>:
>>
>> Hi Sergei,
>>
>> Thanks for your response.
>>
>> Please find code I found from Internet attached, the same baud rate,
>> serial port and AT command I can get response from minicom, but empty
>> response from the boost serial port, I don't think it was the baud
>> rate issue or option parameters issue, but I could be wrong.
>>
>> Appreciate if you could get it work.
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jh
>>
>> On 1/13/20, Sergei Nikulov <[hidden email]> wrote:
>> > пн, 13 янв. 2020 г. в 12:12, JH via Boost <[hidden email]>:
>> >>
>> >> Hi,
>> >>
>> >> There are many boost serial port sample code out there, but none of
>> >> them I can run AT command. I have a device connected to my ubuntu 18,
>> >> I can run AT command on minicom to get correct response, but I could
>> >> not get any AT response from boost serial port. Has anyone made it
>> >> work?
>> >>
>> >> Thank you.
>> >>
>> >> Kind regards,
>> >>
>> >> - jh
>> >>
>> >> _______________________________________________
>> >> Unsubscribe & other changes:
>> >> http://lists.boost.org/mailman/listinfo.cgi/boost
>> >
>> > Could you please show the code?
>> > Just guess, incorrect baud rate or other config parameters (ref.
>> > https://www.boost.org/doc/libs/1_72_0/doc/html/boost_asio/reference/basic_serial_port/set_option.html)
>> >
>> > --
>> > Best Regards,
>> > Sergei Nikulov
>> >
>
>
>
> --
> Best Regards,
> Sergei Nikulov
>

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
Hi,

It looks going no way to get it work, I have to find a consultant for
helping me to get it work, anyone interested, please contact me
privately, I'll pay your full service if you could deliver me a
working serial command source to run AT command.

Thank you.

Kind regards,

- jh

On 1/15/20, JH <[hidden email]> wrote:

> Hi Sergei,
>
> Thanks for your response.
>
> On 1/14/20, Sergei Nikulov <[hidden email]> wrote:
>> Hello JH
>>
>> If SerialOptions defaults (parity, csize, flow, stop) are good for you
>
> Yes, I was using all defaults, that should work right?
>
>> SerialOptions() : device(), baudrate(9600), timeout(seconds(0)),
>>             parity(noparity), csize(8), flow(noflow), stop(one) {}
>
> The only different was I set baudrate to 115200, I changed to use
> 9600, doesn't seem work either.
>
>> then try to add \r to the end of your AT command
>> - serial<<"AT+CGDCONT?" << endl;.
>> + serial<<"AT+CGDCONT?\r\n";
> I did try to add "\r\n", no avail.
>
> Hmm, did not realize boost serial port is that hard, any working boost
> serial port samples online?
>
> Thank you.
>
> Kind regards,
>
> - jh
>
>> AFAIR, AT commands, use it as line end (ref
>> https://en.wikipedia.org/wiki/Hayes_command_set), but on Linux
>> std::endl only LF(0x0A).
>> Maybe this is your case.
>> HTH.
>>
>> вт, 14 янв. 2020 г. в 02:34, JH <[hidden email]>:
>>>
>>> Hi Sergei,
>>>
>>> Thanks for your response.
>>>
>>> Please find code I found from Internet attached, the same baud rate,
>>> serial port and AT command I can get response from minicom, but empty
>>> response from the boost serial port, I don't think it was the baud
>>> rate issue or option parameters issue, but I could be wrong.
>>>
>>> Appreciate if you could get it work.
>>>
>>> Thank you.
>>>
>>> Kind regards,
>>>
>>> - jh
>>>
>>> On 1/13/20, Sergei Nikulov <[hidden email]> wrote:
>>> > пн, 13 янв. 2020 г. в 12:12, JH via Boost <[hidden email]>:
>>> >>
>>> >> Hi,
>>> >>
>>> >> There are many boost serial port sample code out there, but none of
>>> >> them I can run AT command. I have a device connected to my ubuntu 18,
>>> >> I can run AT command on minicom to get correct response, but I could
>>> >> not get any AT response from boost serial port. Has anyone made it
>>> >> work?
>>> >>
>>> >> Thank you.
>>> >>
>>> >> Kind regards,
>>> >>
>>> >> - jh
>>> >>
>>> >> _______________________________________________
>>> >> Unsubscribe & other changes:
>>> >> http://lists.boost.org/mailman/listinfo.cgi/boost
>>> >
>>> > Could you please show the code?
>>> > Just guess, incorrect baud rate or other config parameters (ref.
>>> > https://www.boost.org/doc/libs/1_72_0/doc/html/boost_asio/reference/basic_serial_port/set_option.html)
>>> >
>>> > --
>>> > Best Regards,
>>> > Sergei Nikulov
>>> >
>>
>>
>>
>> --
>> Best Regards,
>> Sergei Nikulov
>>
>

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
Hi Sergei.

I know for a fact that asio serial is objects work fine.

Please post a minimal complete program that demonstrates how you are using
asio to communicate with the serial port.

The problem will certainly be there.

On Tue, 21 Jan 2020 at 01:59, JH via Boost <[hidden email]> wrote:

> Hi,
>
> It looks going no way to get it work, I have to find a consultant for
> helping me to get it work, anyone interested, please contact me
> privately, I'll pay your full service if you could deliver me a
> working serial command source to run AT command.
>
> Thank you.
>
> Kind regards,
>
> - jh
>
> On 1/15/20, JH <[hidden email]> wrote:
> > Hi Sergei,
> >
> > Thanks for your response.
> >
> > On 1/14/20, Sergei Nikulov <[hidden email]> wrote:
> >> Hello JH
> >>
> >> If SerialOptions defaults (parity, csize, flow, stop) are good for you
> >
> > Yes, I was using all defaults, that should work right?
> >
> >> SerialOptions() : device(), baudrate(9600), timeout(seconds(0)),
> >>             parity(noparity), csize(8), flow(noflow), stop(one) {}
> >
> > The only different was I set baudrate to 115200, I changed to use
> > 9600, doesn't seem work either.
> >
> >> then try to add \r to the end of your AT command
> >> - serial<<"AT+CGDCONT?" << endl;.
> >> + serial<<"AT+CGDCONT?\r\n";
> > I did try to add "\r\n", no avail.
> >
> > Hmm, did not realize boost serial port is that hard, any working boost
> > serial port samples online?
> >
> > Thank you.
> >
> > Kind regards,
> >
> > - jh
> >
> >> AFAIR, AT commands, use it as line end (ref
> >> https://en.wikipedia.org/wiki/Hayes_command_set), but on Linux
> >> std::endl only LF(0x0A).
> >> Maybe this is your case.
> >> HTH.
> >>
> >> вт, 14 янв. 2020 г. в 02:34, JH <[hidden email]>:
> >>>
> >>> Hi Sergei,
> >>>
> >>> Thanks for your response.
> >>>
> >>> Please find code I found from Internet attached, the same baud rate,
> >>> serial port and AT command I can get response from minicom, but empty
> >>> response from the boost serial port, I don't think it was the baud
> >>> rate issue or option parameters issue, but I could be wrong.
> >>>
> >>> Appreciate if you could get it work.
> >>>
> >>> Thank you.
> >>>
> >>> Kind regards,
> >>>
> >>> - jh
> >>>
> >>> On 1/13/20, Sergei Nikulov <[hidden email]> wrote:
> >>> > пн, 13 янв. 2020 г. в 12:12, JH via Boost <[hidden email]>:
> >>> >>
> >>> >> Hi,
> >>> >>
> >>> >> There are many boost serial port sample code out there, but none of
> >>> >> them I can run AT command. I have a device connected to my ubuntu
> 18,
> >>> >> I can run AT command on minicom to get correct response, but I could
> >>> >> not get any AT response from boost serial port. Has anyone made it
> >>> >> work?
> >>> >>
> >>> >> Thank you.
> >>> >>
> >>> >> Kind regards,
> >>> >>
> >>> >> - jh
> >>> >>
> >>> >> _______________________________________________
> >>> >> Unsubscribe & other changes:
> >>> >> http://lists.boost.org/mailman/listinfo.cgi/boost
> >>> >
> >>> > Could you please show the code?
> >>> > Just guess, incorrect baud rate or other config parameters (ref.
> >>> >
> https://www.boost.org/doc/libs/1_72_0/doc/html/boost_asio/reference/basic_serial_port/set_option.html
> )
> >>> >
> >>> > --
> >>> > Best Regards,
> >>> > Sergei Nikulov
> >>> >
> >>
> >>
> >>
> >> --
> >> Best Regards,
> >> Sergei Nikulov
> >>
> >
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
--
Richard Hodges
[hidden email]
office: +442032898513
home: +376841522
mobile: +376380212

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Anyone got AT commands work using asio serial port?

Boost - Dev mailing list
вт, 21 янв. 2020 г., 10:22 Richard Hodges <[hidden email]>:

> Hi Sergei.
>
> I know for a fact that asio serial is objects work fine.
>
> Please post a minimal complete program that demonstrates how you are using
> asio to communicate with the serial port.
>
> The problem will certainly be there.
>
> On Tue, 21 Jan 2020 at 01:59, JH via Boost <[hidden email]> wrote:
>
>> Hi,
>>
>> It looks going no way to get it work, I have to find a consultant for
>> helping me to get it work, anyone interested, please contact me
>> privately, I'll pay your full service if you could deliver me a
>> working serial command source to run AT command.
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jh
>>
>> On 1/15/20, JH <[hidden email]> wrote:
>> > Hi Sergei,
>> >
>> > Thanks for your response.
>> >
>> > On 1/14/20, Sergei Nikulov <[hidden email]> wrote:
>> >> Hello JH
>> >>
>> >> If SerialOptions defaults (parity, csize, flow, stop) are good for you
>> >
>> > Yes, I was using all defaults, that should work right?
>> >
>> >> SerialOptions() : device(), baudrate(9600), timeout(seconds(0)),
>> >>             parity(noparity), csize(8), flow(noflow), stop(one) {}
>> >
>> > The only different was I set baudrate to 115200, I changed to use
>> > 9600, doesn't seem work either.
>> >
>> >> then try to add \r to the end of your AT command
>> >> - serial<<"AT+CGDCONT?" << endl;.
>> >> + serial<<"AT+CGDCONT?\r\n";
>> > I did try to add "\r\n", no avail.
>> >
>> > Hmm, did not realize boost serial port is that hard, any working boost
>> > serial port samples online?
>> >
>> > Thank you.
>> >
>> > Kind regards,
>> >
>> > - jh
>> >
>> >> AFAIR, AT commands, use it as line end (ref
>> >> https://en.wikipedia.org/wiki/Hayes_command_set), but on Linux
>> >> std::endl only LF(0x0A).
>> >> Maybe this is your case.
>> >> HTH.
>> >>
>> >> вт, 14 янв. 2020 г. в 02:34, JH <[hidden email]>:
>> >>>
>> >>> Hi Sergei,
>> >>>
>> >>> Thanks for your response.
>> >>>
>> >>> Please find code I found from Internet attached, the same baud rate,
>> >>> serial port and AT command I can get response from minicom, but empty
>> >>> response from the boost serial port, I don't think it was the baud
>> >>> rate issue or option parameters issue, but I could be wrong.
>> >>>
>> >>> Appreciate if you could get it work.
>> >>>
>> >>> Thank you.
>> >>>
>> >>> Kind regards,
>> >>>
>> >>> - jh
>> >>>
>> >>> On 1/13/20, Sergei Nikulov <[hidden email]> wrote:
>> >>> > пн, 13 янв. 2020 г. в 12:12, JH via Boost <[hidden email]>:
>> >>> >>
>> >>> >> Hi,
>> >>> >>
>> >>> >> There are many boost serial port sample code out there, but none of
>> >>> >> them I can run AT command. I have a device connected to my ubuntu
>> 18,
>> >>> >> I can run AT command on minicom to get correct response, but I
>> could
>> >>> >> not get any AT response from boost serial port. Has anyone made it
>> >>> >> work?
>> >>> >>
>> >>> >> Thank you.
>> >>> >>
>> >>> >> Kind regards,
>> >>> >
>>
>
Hello, Richard.

I have no problems with serial ports.

Could you please re-read whole email thread?

You'll also find code from JH, who original topic starter.


--
> Richard Hodges
> [hidden email]
> office: +442032898513
> home: +376841522
> mobile: +376380212
>
>

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost