Active13 days ago
PySerial is a Python API module to access the serial port. PySerial provides a uniform API across multiple operating systems, including Windows, Linux, and BSD. This article explains how to use the pySerial API to access a serial port.
Can someone please show me a full python sample code that uses pyserial, i have the package and am wondering how to send the AT commands and read them back!
Willi Mentzel
12.6k1111 gold badges6060 silver badges7979 bronze badges
GathGath58733 gold badges1111 silver badges1414 bronze badges
closed as off-topic by Drew, miken32, Machavity, doelleri, CerebralFartOct 24 '16 at 17:51
This question appears to be off-topic. The users who voted to close gave this specific reason:
- 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – Drew, miken32, Machavity, doelleri, CerebralFart
4 Answers
FramesterFramester12.2k3636 gold badges109109 silver badges176176 bronze badges
use https://pythonhosted.org/pyserial/ for more examples Suikoden psx iso.
VatevPyserial Python 2.7
6,41011 gold badge2525 silver badges3535 bronze badges
baydabayda10.7k66 gold badges3333 silver badges4848 bronze badges
animuson♦44.6k2222 gold badges121121 silver badges134134 bronze badges
engasoengaso
I have not used pyserial but based on the API documentation at https://pyserial.readthedocs.io/en/latest/shortintro.html it seems like a very nice interface. It might be worth double-checking the specification for AT commands of the device/radio/whatever you are dealing with.
Specifically, some require some period of silence before and/or after the AT command for it to enter into command mode. I have encountered some which do not like reads of the response without some delay first.
Paul OsbornePyserial Python 3 Tutorial
Paul Osborne3,25855 gold badges2020 silver badges1818 bronze badges