GithubHelp home page GithubHelp logo

atcom's Introduction

ATCom

​ AT commands are the instructions used to control and communicate with the cellular modems. In order to, send AT commands to a cellular device, one needs to check several parameters and might need a serial monitor tool. ATCom is a command-line interface tool that makes AT command operations easier. ​

Installation

pip3 is required to install the atcom. pip3 can be intalled by ​

sudo apt install python3-pip

​ Use the package manager pip3 to install atcom. ​

pip3 install atcom

Usage

$ atcom [OPTIONS] AT_COMMAND

Warning:

If you need to send " or ' character, you should use escape character \ before it.

Example:

atcom AT+CGDCONT=1,\"IP\",\"internet\"

Examples

​ Running atcom without --port parameter, scans for available ports, and selects a valid modem port if available. ​

$ atcom AT

​ or ​

$ atcom --port /dev/ttyUSB2 AT

Configuration File

​ Configuration file(configs.yaml) can be created for persist args. ATCom first checks the current working directory for the configs.yml to read the arguments from. The path of the configuration file can also be specified using the --config parameter. ​ The configuration file must be in yaml format, for example: ​

port: /dev/ttyUSB2
baudrate: 115200
timeout: 10

​ The keys, config file can contain:

  • port (str)
  • baudrate (int)
  • timeout (int)
  • rts_cts (boolean)
  • dsr_dtr (boolean)
  • verbose (boolean) ​

Parameters

default description
-p / --port - PORT of modem
-b / --baudrate 115200 Baudrate for serial communication
-t / --timeout 10 Communication timeout
-c / --config ./configs.yaml Configurations file Path
-v / --verbose - Enable full log output
--rts-cts - Enable RTS-CTS mode
--dsr-dtr - Enable DSR-DTR mode

atcom's People

Contributors

bisguzar avatar dependabot[bot] avatar saeedjohar avatar selengalp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

atcom's Issues

atcom cannot connect to Telit modem

I installed atcom as described, however I cannot connect to the Telit modem. Any AT commands result in the same error.

pi@raspberrypilte:~ $ atcom --port /dev/ttyUSB2 -b 115200 AT
[ERR]   Couldn't open serial communication
pi@raspberrypilte:~ $ 

If I run the connection via minicom minicom -D /dev/ttyUSB2 -b 115200 , everything works.

RasperryPI Bullseye, Python 3.9.2 installed.

EDIT:
It found a connection at /dev/ttyUSB3. I accidentially tried USB2 since this is the right port address when I use minicom.
However, the the automatic port scan seems not to work as I always need to add the -p option.

Baudrate cli argument does not work

Baudrate setting from the cli does not work.

root@9854bd3:/# atcom -v AT -p /dev/serial0 -b 230400
[INFO]  Configs file not found, reading properties from args
[INFO]  Port property specified as argument, overriding config file
[INFO]  Timeout property not found, using default (10)
[INFO]  Baudrate property not found, using default (115200)

<  AT

>  OK
>

I can set the value from the config though.

I use the atcom in my raspberrypi. But 'qiopen' is not work..

In my computer

AT+QIACT=1
->OK
AT+QIOPEN=1,0,"TCP","110.165.17.3",9091,0,2
->CONNECT

is success.

But fail NO.2 in my raspberry pi4 bash.

atcom AT+QIACT=1
->OK
atcom AT+QIOPEN=1,0,"TCP","110.165.17.3",9091,0,2
->ERROR

what am i wrong?


atcom AT+QIGETERROR
->+QIGETERROR: 552,invalid parameters
OK

i guess i use same parameters..

Timeout issue when sending SMS via AT+CMGS

When I try to send text messages via "atcom AT+CMGS="my_phone_number", "CR", "Text message text", I always get a timeout error. I'm able to send other AT commands without issue. I think the problem has to do with how atcom terminates the message stream, but I'm not certain what I need to change to fix this. Any help would be greatly appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.