at-command

Erlang serial IO

半腔热情 提交于 2019-12-03 03:50:59
I want to talk to my modem with erlang. It is mounted as /dev/ttyUSB and perfectly understands AT-commands. Can I read and write from the device with the standard file module? How about baudrate, bytesize, parity, RTS/CTS, DSR/DTR and the like? Have you any experiences with tonyg-erlang-serial-1.0? (I am not too convinced of this package as it says in the readme: "This is a port program with erlang driver for serial communication, originally written by Johan Bevemyr in 1996 and sporadically maintained by Tony Garnock-Jones from 2007 onwards." What is the common practice for serial I/O in

output of AT command c++ code

*爱你&永不变心* 提交于 2019-12-02 16:50:18
问题 I wrote the following code which sends a simple message to my mobile with GSM SM5100B. But it does not work. I would like to check the outputs of each printf line with c++ code. For example AT+CMFG=1 ok AT+CMGS="69******" ok etc. Is there any why to implement this? My code #include <stdio.h> // standard input / output functions #include <string.h> // string function definitions #include <unistd.h> // UNIX standard function definitions #include <fcntl.h> // File control definitions #include

How to edit SIM800l library to ensure that a call is established

让人想犯罪 __ 提交于 2019-12-02 13:08:48
问题 I use SIM800l to make calls with arduino UNO with AT commands. By using this library I make calls with gprsTest.callUp(number) function. The problem is that it returns true even the number is wrong or there is no credit. It is clear on this part code from GPRS_Shield_Arduino.cpp library why it is happening. It doesnt check the return of ATDnumberhere; bool GPRS::callUp(char *number) { //char cmd[24]; if(!sim900_check_with_cmd("AT+COLP=1\r\n","OK\r\n",CMD)) { return false; } delay(1000); /

How to edit SIM800l library to ensure that a call is established

隐身守侯 提交于 2019-12-02 04:51:30
I use SIM800l to make calls with arduino UNO with AT commands . By using this library I make calls with gprsTest.callUp(number) function. The problem is that it returns true even the number is wrong or there is no credit. It is clear on this part code from GPRS_Shield_Arduino.cpp library why it is happening. It doesnt check the return of ATDnumberhere; bool GPRS::callUp(char *number) { //char cmd[24]; if(!sim900_check_with_cmd("AT+COLP=1\r\n","OK\r\n",CMD)) { return false; } delay(1000); //HACERR quitar SPRINTF para ahorar memoria ??? //sprintf(cmd,"ATD%s;\r\n", number); //sim900_send_cmd(cmd)

Send USSD code to modem in C# and ERROR in return always

社会主义新天地 提交于 2019-12-02 02:55:20
问题 I am sending USSD code on modem through serial port. But always it is giving ERROR in response. AT commands I am sending are: in sequence: serialPort.Write("AT+CMGF=0" + "\r\n"); serialPort.Write("AT+CUSD=1,\"*135#\"" + "\r\n"); when I am configuring message format in first AT command, it is giving 'OK' response. But on sending USSD code, response is always 'ERROR'. Why is it so? 回答1: Don't use \n in end of command, use only \r . Form of CUSD command is: AT+CUSD=1,"*135#",15 . In C# it should

implement at command on rooted android and get the result

时间秒杀一切 提交于 2019-12-02 02:46:27
问题 I'm a beginner in stackoverflow so I cant add a comment. I saw this page: Read command output inside su process and I tried this answer and it is ok: Process p = Runtime.getRuntime().exec(new String[]{"su", "-c", "system/bin/sh"}); DataOutputStream stdin = new DataOutputStream(p.getOutputStream()); //from here all commands are executed with su permissions stdin.writeBytes("ls /data\n"); // \n executes the command InputStream stdout = p.getInputStream(); byte[] buffer = new byte[BUFF_LEN]; int

Send At Command to gsm modem with Java

喜欢而已 提交于 2019-12-02 02:32:37
I am trying to make a program to send a sms. I wrote the program but doesn't successfully send the message. My program send an At command to the Port COM in my computer but I do not get a response from my gsm modem. I am using COM terminal (Temp pro...) to send sms with the at command and I am able to send sms. Therefore I don't know why the program can't send a sms. import java.io.*; import java.util.*; import gnu.io.*; public class prawiefinal { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "AT+CMGF=1 \r"; static String messageString2 = "AT+CMGS

implement at command on rooted android and get the result

你。 提交于 2019-12-02 02:23:22
I'm a beginner in stackoverflow so I cant add a comment. I saw this page: Read command output inside su process and I tried this answer and it is ok: Process p = Runtime.getRuntime().exec(new String[]{"su", "-c", "system/bin/sh"}); DataOutputStream stdin = new DataOutputStream(p.getOutputStream()); //from here all commands are executed with su permissions stdin.writeBytes("ls /data\n"); // \n executes the command InputStream stdout = p.getInputStream(); byte[] buffer = new byte[BUFF_LEN]; int read; String out = new String(); //read method will wait forever if there is nothing in the stream /

Send USSD code to modem in C# and ERROR in return always

痴心易碎 提交于 2019-12-02 00:04:25
I am sending USSD code on modem through serial port. But always it is giving ERROR in response. AT commands I am sending are: in sequence: serialPort.Write("AT+CMGF=0" + "\r\n"); serialPort.Write("AT+CUSD=1,\"*135#\"" + "\r\n"); when I am configuring message format in first AT command, it is giving 'OK' response. But on sending USSD code, response is always 'ERROR'. Why is it so? pumaikar Don't use \n in end of command, use only \r . Form of CUSD command is: AT+CUSD=1,"*135#",15 . In C# it should be: serialPort.Write("AT+CMGF=0" + "\r"); serialPort.Write("AT+CUSD=1,\"*135#\",15" + "\r");

Why I am not able to receive sms using AT commands?

允我心安 提交于 2019-12-01 20:58:54
问题 I want to send / receive sms using AT commands from my computer to my mobile phone. I connected my phone to my computer using a USB port. My computer detects the modem and I am able to send sms from the computer to mobile phone. However, I am not able to receive sms in my computer.. I am presenting a sample of what I get from AT editor AT+CMGF=1 OK AT+CNMI=1,2,0,0,0 Error What can I do to send this prob and why am I getting this Error? 回答1: Every phone has different capabilities so you should