Script for AT command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script for AT command
# 1  
Old 03-27-2012
Script for AT command

Hi all,
How write a script for send AT commando to modem?
I can use only Screen but i don't have Minicom on my embedded board:

Is possible run Screen and after write AT command like:

Code:
AT+CGREG
AT!PADCONF?1
....etc..

PS:how install minicom for a board with ARM? i must compiling source?
i know that minicom have a script
thanks for your help
Regards

Last edited by methyl; 03-27-2012 at 05:22 PM.. Reason: pleae use code tags
# 2  
Old 03-27-2012
Sorry, but this post is not easy to understand because there is no detail or context and the post is written in strange English.

Assuming this is the product supplier you are talking about, have you tried contacting the supplier at http://www.minicom.com/?
KVM over IP – Switches & Extender – Minicom
# 3  
Old 03-27-2012
I mean MINICOM on Linux! http://alioth.debian.org/projects/minicom

I can use Screen for send AT commands with a script?
thanks
# 4  
Old 03-27-2012
Sorry, I know a lot about modem control strings but nothing about this product. Suggest you contact the authors.


For those in the UK, I first read this post as being about the Minicom you see on Post Office counters:
Telecommunications device for the deaf - Wikipedia, the free encyclopedia
# 5  
Old 03-27-2012
You fool me?
# 6  
Old 03-27-2012
Definitely not.

It is not possible to post suitable unix Script solution based the detail you have posted. We have no idea what "Screen" is or any details about your computer hardware or its Operating System or the modem. Any modem commands would have to be sent to a modem port on your computer.

The Minicom for Linux program is interesting, but still ancient technology. What real-world problem are you trying to solve?

Still suggest that you contact the authors of the software for advice. If you have trouble with scripting the solution please post as much detail as you can complete with lots and lots of detail and examples.


Afterthought:
Quote:
but i don't have Minicom on my embedded board
If the O/P does not have modem software is is easy to write AT commands directly to the modem port. We'd need to know the Linux name for the modem port /dev/.... and what Operating System and Shell the O/P has. The process writing to the modem must not add extra characters, so we need to avoid sending a line terminator.

Code:
# A sort of solution in a Bourne-type Shell might be:
echo -n "AT+CGREG" > /dev/<name of the device>
echo -n "AT!PADCONF?1" > /dev/<name of the device>

Code:
#Or if it's the other syntax for echo on whatever O/S the O/P has:
echo "AT+CGREG\c" > /dev/<name of the device>
echo "AT!PADCONF?1\c" > /dev/<name of the device>


Last edited by methyl; 03-27-2012 at 07:09 PM.. Reason: afterthought. O/P may not have Minicom software?
# 7  
Old 03-28-2012
Hi,
on my board i have only u-boot, kernel and rootfs! I haven't a Gui interface..
The modem is the SL8092 which is connected to the card via USB port /dev/ttyUSB3.
Screen is a program like minicom.

I have write this script on my PC with UBUNTU 11.10 and modem plugged:

modem.sh:
Code:
#! /bin/bash
#Or if it's the other syntax for echo on whatever O/S the O/P has:
echo "AT+CGREG\c" > /dev/ttyUSB3
echo "AT!PADCONF?1\c" > /dev/ttyUSB3

but when i run sh modem.sh:
Code:
giuseppe@giuseppe-K53SV:~/Scrivania$ sh modem.sh
giuseppe@giuseppe-K53SV:~/Scrivania$

I not have answers.

Should look OK!!!!!!!!!!!!

thanks
regards

Last edited by enaud; 03-28-2012 at 07:57 AM.. Reason: Please use code tags for code and data samples, thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

2. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies

3. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

4. Shell Programming and Scripting

In Shell Script Does Second Command Wait For First Command To Complete

Hi All, I have a question related to Shell scripting. In my shell script, I have following two commands in sequence: sed 's/^/grep "^120" /g' $ORIGCHARGEDAMTLIST|sed "s;$;| cut -f$FIELD_NO1 -d '|' | awk '{ sum+=\$1} END {printf (\"%0.2f\\\n\", sum/100)}' >$TEMPFILE mv $TEMPFILE $ORIGFILE... (3 Replies)
Discussion started by: angshuman
3 Replies

5. Shell Programming and Scripting

Script to check one command and if it fails moves to other command

Input is list of Server's, script is basically to remove old_rootvg, So it should check first command "alt_rootvg_op -X old_rootvg" if it passes move to next server and starts check and if it fails moves to other command "exportvg old_rootvg" for only that particular server. I came up with below,... (6 Replies)
Discussion started by: aix_admin_007
6 Replies

6. Shell Programming and Scripting

SH script, variable built command fails, but works at command line

I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes CC=`which gcc` CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies

7. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

8. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

9. Shell Programming and Scripting

can anyone help with shell script command about searching word with grep command?

i want to search in the current directory all the files that contain one word for example "hello" i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies
Login or Register to Ask a Question