at-command

how to deal with the serial port in android mobile?

╄→尐↘猪︶ㄣ 提交于 2019-11-29 12:08:50
actually I know no thing about serial port. but I see an example of sending it an at-command: echo -e "AT" > /dev/smd0 What is /dev/smd0 and why they sometimes replace it with /dev/ttyS0. /dev/smd0 and /dev/ttyS0 are device files . Such files are virtual files that provide a file I/O operation interface for working with some underlying thing like for instance hardware resources like serial ports, hard disks and memory, or with non-hardware resources like process information, random number input, terminal screen output, etc. Device files comes in two flavours, character and block. Serial ports

How to Send/Receive SMS using AT commands?

筅森魡賤 提交于 2019-11-29 01:59:45
Can anyone help me to send and receive SMS using AT commands in Python? In case it matters, I'm using Fedora 8. Which phone will be better with Linux (Nokia, Sony Ericson, Samsung,.....)? Will all phones support sending and receiving SMS using AT commands? Stefano Palazzo Here's some example code that should get you started (in Python 3000): import time import serial recipient = "+1234567890" message = "Hello, World!" phone = serial.Serial("/dev/ttyACM0", 460800, timeout=5) try: time.sleep(0.5) phone.write(b'ATZ\r') time.sleep(0.5) phone.write(b'AT+CMGF=1\r') time.sleep(0.5) phone.write(b'AT

Sending AT Commands Via ADB Android

旧巷老猫 提交于 2019-11-29 01:34:29
问题 I have a task at work to investigate if it is possible to send AT commands to an android device via ADB shell. So far,I have tried to echo out the AT commands but it passes them as normal strings. Any help please anyone. 回答1: Please try this: echo -e "AT+CFUN=?\r\n" > /dev/ttyUSB0 On your phone, the serial line must not necessarily be called ttyUSB0 . If this is not working or not available, check out the other entries of the /dev/ directory. So it could also be /dev/ttyGS0 or /dev/SMD0 (as

Execute AT commands to send sms in php

南笙酒味 提交于 2019-11-29 00:16:06
I am trying to execute AT commands from PHP. I tried exec() and shell_exec() Please don't suggest third party SMS gateway my client doesn't want to disclose his private information and wants to send SMS from his own server. I have a GSM modem attach to a serial port which I can access through "putty" like in fig And I can enter AT commands to send SMS like in fig below. I want to run those AT commands through PHP. Hi I am sending sms using php class on windows 8 by this php code. require "php_serial.class.php"; $serial = new phpSerial; $serial->deviceSet("COM4"); $serial->confBaudRate(115200);

Send Unicode (USC2) SMS with AT commands

佐手、 提交于 2019-11-28 12:43:45
I am trying to send Unicode SMS using at commands and USC2 encoding. But it doesn't work, as I get errors. Here is my inputs: AT OK AT+CSCS = ? +CSCS: ("IRA","GSM","UCS2") AT+CSCS="UCS2" OK AT+CMGF=1 OK AT+CSMP=1,167,0,8 //So this one doesnt work, let's try with 17,167,0,8 ERROR AT+CSMP=17,167,0,8 OK AT+CMGS="+370********" ERROR Or maybe I should use PDU mode to achieve this? I have tried using older modem, and USC2 works in that one, however not in one im using. But im sure this conflicting modem supports USC2. I found I just needed to encode my number in AT+CMGS to UCS2, and now it works: AT

SMS by AT commands with GSM mobile is giving error

筅森魡賤 提交于 2019-11-28 11:51:31
I am sending SMS by AT commands with GSM mobile phone. I wanna send bulk of message like thousands. I read that by GSM mobile we can send 6-8 sms per minute. But when I send messages then someone are going and someone not. I am getting information from excel file means destination number and message text. Can you tell me why some sms are going and some not. My code is SmsFields smsObj = null; List<SmsFields> smsColl = null; SerialPort serialport = null; StringBuilder strbuild = new StringBuilder(); try { //Validate the form if (!Validation()) return; serialport = new SerialPort(); ////Sets the

How to get the output of AT command into a string in java?

为君一笑 提交于 2019-11-28 11:45:06
I am trying to read the result of an AT command (command executed to do various operation to a GSM modem from console). I have seen and successfully tested using the Java OuputStream class to get the result of an AT command as output stream but what I need to do is to get the result not as outputstream but into a variable (String for now) in my class. If it is possible to do like outStream.write(("Some At command").getBytes()); which works fine, how can it be possibe to do something like this Strign resultOfCommmand=.....result of some AT command; I am trying it in this way InputStream is =

How to check if an AT command executed successfully or failed

断了今生、忘了曾经 提交于 2019-11-28 10:33:04
问题 How do I place a check programmatically if the AT command executed successfully or failed. I have placed following check: boolean success = response.endsWith("OK"); boolean failed = response.endsWith("ERROR"); I just want to be sure if this check can be placed universally, or atleast on AT+CUSD command. I cannot place contains check since the ussd response can itself contain 'ok' or 'error' strings. 回答1: Excellent step on your behalf to investigate how to do things properly instead of just

End of response to an AT command

喜夏-厌秋 提交于 2019-11-28 09:18:56
问题 How to be sure what is end of an AT command send to GSM module? I need some character or string that represent end of AT command for every case due to finding when whole response is received. I guess it have something with "\r\n" sequence but, this sequence could be at the beginning of AT command response? 回答1: Like you suppose it's \r\n . This defines the end of a line. And it makes only sense to process complete lines. Some commands respons with only OK\r\n , some with some data. So you

SIM900 AT Commands response parsing

倖福魔咒の 提交于 2019-11-28 06:32:42
问题 i am using sim900 gps/gprs module shield connected to an Arduino Uno, how will i be able to parse the response of my AT commands? Or how will i be able to remove the 1st line printed in the serial after sending an AT command? AT+CMGL="ALL" +CMGL: 1,"REC READ","+XXXXXXXXXX","","16/04/25,15:20:59+32" Hilp akp si ralphh the pogi one mmalit mi pizza hehehehehe +CMGL: 2,"REC READ","+XXXXXXXXXX","","16/04/25,21:51:33+32" Yow!!! OK example on the output above, i want to get rid of the AT+CMGL="ALL"