1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
= Sending commands to the SIM device
To send commands to the SIM device, use a program called `minicom`. For example:
minicom -D /dev/ttyS0
`minicom` connects to the SIM device, which is represented by `/dev/ttyS0`, and
then allows you to start typing commands. To submit a command, press <Enter>.
`/dev/ttyS0` is the name that this computer has given to the SIM device.
== SIM device commands
There are hundreds of possible commands you can send to the SIM device using
`minicom`. Here are a few you might care to know.
=== Entering Text Mode
Text messages are represented to computers as a sequence of numbers. When
minicom starts, it will want to display those numbers instead of text. In order
to translate the messages into text, you must be in Text Mode. To do that, use
this command:
AT+CMGF=1
This enters Text Mode. It is much easier to send, list and receive texts if you
are in Text Mode.
If you close minicom and re-start it, you will have to enter Text Mode again.
=== Sending a text
AT+CMGS="+447123456789"<Enter>
Your message<Ctrl+Z>
That sends a text message with the content "Your message" to the phone number,
07123 456789. This isn't a real phone number, it's just an example. If you want
to send to a real number, just replace the number. Be careful to make sure to
format it right:
- The number must start with +44 instead of 0
- The number can't contain any spaces
- The number must be inside double quotes: ""
You need to be in Text Mode to use this command effectively.
If you want to cancel a text without sending, use <Escape> instead of <Ctrl+Z>.
=== Reading texts
AT+CMGL="ALL"
This reads all texts. You can also read a specific text:
AT+CMGR=5
This reads the text with the index number 5. If you want to read a different
text, use a different index number.
It is much easier to read texts if you are already in Text Mode.
=== Receiving texts
When you receive a text, if you are in minicom, you will get a notification. It
will look like this:
+CMTI: "SM",3
That means you got a text and it is stored in index number 3.
|