2016년 1월 13일 수요일

[2]Sending out an SMS in text mode

Sending out an SMS in text mode

THIS POST WAS WRITTEN BY JEROEN ON JANUARY 8, 2009
POSTED UNDER: SMS
This entry is part 1 of 17 in the series Sending out an SMS
이전 글에서 GSM 모뎀이 PC로부터 SMS message를 전송하게 해줄 수 있다고 설명한 것처럼 이것을 수행하는데 두가지 방식이 있다: text mode와 PDU mode.
As explained in a prevous post in this series, a GSM modem can let you send SMS messages from a PC. There are two basic ways to do this: text mode and PDU mode.
당신은 하이퍼터미널(윈도우 XP에는 딸려오지만 윈도우 비스타에는 없다)과 같은 터미널 프로그램을 가지고 GSM 모뎀을 즐길수 있다. 모뎀과 연결되었을 때 터미널 윈도우에서 내가 언급했던 명령들이 입력될 수 있다. 다음의 기본적인 명령들을 테스트해보고 어떤 모뎀이든지 이것들은 지원해야 한다:
You can play around with your GSM modem using a terminal program like HyperTerminal (which came with Windows XP, but is no longer there in Windows Vista). The commands I mention can just be entered in the terminal window when connected to the modem. You can try the following basic commands, any modem should support these:
ATIReturns general modem identification
ATD<phone number>Dials the phone number you supplied (don’t enter the <> brackets)
ATHHang-up the phone (useful after the previous command).
다음의 명령들은 GSM 모뎀들에만 한정된 것이다. 만약 에러 응답을 받는다면(예를 들어. '+ERR'), 당신의 모뎀은 아마도 GSM 모뎀이 아니거나 GSM 모뎀을 위한 확장을 지원하지 않는 것이다.
The following commands are specific for GSM modems. If you get an error response (e.g. ‘+ERR’), your modem probably isn’t a GSM modem or it doesn’t support the extensions specific for GSM modems.
AT+CGMIReturns the modem’s manufacturer
AT+CGMMReturns the modem’s model

당신의 GSM 모뎀에 의해 지원되는 모드가 어떤 것인지 알아내는 명령은 'AT+CMGF=?'이다. 이 스트링을 모뎀으로 보내면(뒤에 줄바굼을 입력하고) 폰은 PDU 모드를 위한 '0'과 TEXT 모드를 위한 '1' 또는 두 모드를 다 지원하면 '0,1'로 응답할 것이다.
 The command to find out which of the modes are supported by your GSM modem is ‘AT+CMGF=?’. Send this string to your modem (followed by a newline) and the phone will answer ‘0’ for PDU mode and ‘1’ for text mode or ‘0,1’ if it supports both modes.
만약 당신이 SMS 메시지를 text 모드에서 전송하고자 한다면 모뎀이 그 모드를 지원하는 것이 필요하고 당신은 모뎀이 먼저 text 모드에 있는지 확인할 필요가 있다. 명령 'AT+CMGF?'는 어떤 모드가 현재 활성화되어 있는지 알려줄 것이다. 명령 'AT+CMGF=1'은 text 모드로(만약 지원한다면) 모드를 셋팅할 것이다.
If you want to send an SMS message in text mode your modem needs to support it and you need to make sure the modem is in text mode first. The command ‘AT+CMGF?’ will tell you which mode is currently active. The command ‘AT+CMGF=1’’ will set the mode in text mode (if supported).
text 모드에서 text 메시지를 보내는 것은 쉽다. 명령은:
In text mode sending a text message is easy. The command is:
AT+CMGS=<phone-number><CR>
Text to be sent<Crtl-Z>
<CR> 과 <Ctrl-Z>은 각각 엔터 키와 Ctntrol-Z 키와 연결된다. 캐릭터셋과 관련된 몇몇 세부사항들이 있지만 alpha-numeric text(accents나 특수 문자 없이)로 한정한다면 기대하는 바데로 동작해야 한다.
The <CR> and <Ctrl-Z> refer to the enter key and the Control-Z key combination respectively. There are some details regarding character sets, but if you stick to normal alpha-numeric texts (without accents or special characters), it should work as expected.
A followup post will elaborate a little more on text mode.
Series Navigation
TAGS: 

Reader Comments


hi. does anybody know which models support sending messages in text mode?
#1 

WRITTEN BY EMIX ON MAY 9TH, 2009 @ 2:38 AM

very helpful! I tried it on a Siemens TC65 gsm modem and it works. One note: I think you have misspelling error: it should be AT+CMGS and not AT+CNGS
Hope this helps!
#2 

WRITTEN BY BOUGUSS ON JULY 6TH, 2009 @ 5:34 AM

Good catch; I fixed it. Thanks.
#3 

WRITTEN BY JEROEN ON JULY 6TH, 2009 @ 9:23 AM

hi can anybody tell me if an s m s message is the same as a flash message thankx in advance
#4 

WRITTEN BY RUSSELL ON SEPTEMBER 2ND, 2009 @ 7:31 AM

hi russell here again i meant to say an s m s message on an mobile
phone
#5 

WRITTEN BY RUSSELL ON SEPTEMBER 2ND, 2009 @ 7:33 AM

Russel,
A regular SMS message is stored in the recipient phone (or SIM) and the phone indicates a new message has arrived with an SMS icon. A flash message is different in 2 ways: first it is displayed directly on the recipients phone, second (and this depends on how it was sent) it may not be stored so that when you dismiss the message it is gone.
Jeroen
#6 

WRITTEN BY JEROEN ON SEPTEMBER 2ND, 2009 @ 8:18 AM

Typo:
The command to find out which of the modes are supported by your GSM modem is ‘AT+CMGF=?’.
Not ‘AT+GSMF=?’.
Thanks for your helpful site!!
#7 

WRITTEN BY MARCEL ANTHONIJSZ ON DECEMBER 3RD, 2009 @ 3:06 PM

Thanks, I fixed it.
#8 

WRITTEN BY JEROEN ON DECEMBER 4TH, 2009 @ 1:58 PM

I sent a flash message from computer using a TC65 gsm/gprs modem to a Sony Ericsson F305 and to my surprise the phone asked if I wanted to save the message.
Standards are not followed by all!!!.
Regards
Franco
P.S. Most phones does not let you save the message!!!.
#9 

WRITTEN BY FRANCO ON NOVEMBER 15TH, 2010 @ 5:57 PM

modem complaining of CMS ERROR 305, invalid text. i am using only normal alpha numeric. whats the problem

[1]Send an SMS from your PC

Send an SMS from your PC

THIS POST WAS WRITTEN BY JEROEN ON JANUARY 7, 2009
POSTED UNDER: SMS
PC에서 GSM 폰으로 SMS를 보내는 것은 여러 방법이 있다.
Sending an SMS from a PC to a GSM phone can be done in many ways.
첫 방법은 당신의 PC에 GSM 폰을 연결해야 한다.
The first method I discuss requires a GSM phone attached to your PC.
GSM 폰(또는 GMS card)는 PC에 다른 방식으로 연결할 수 있다; BlueTooth, infrared(IrDA) 또는 씨리얼 케이블. 폰이 연결되는 방식은 무관하며 중요한 것은 GSM이 modem으로 사용가능하다는 것이다. 윈도우 PC에서 이는 TAPI 모뎀으로 사용가능하다는 것을 의미한다.
The GSM phone (or GMS card) can be connected to your PC in different ways; using BlueTooth, infrared (IrDA) or a serial cable. The way the phone is connected is irrelevant, what counts is that the GSM is available as a modem. On windows PCs this means that it will be available as a TAPI modem.
프로그램은 AT 커맨드 라고 불리는 것을 전송함으로써 모뎀이 무언가를 하도록 만든다.
Programs make modems do things by sending them so called AT commands. E.g.
ATD5551234 는 modem이 5551234 번호로 커넥션을 연결하도록 만든다.
ATD5551234 makes the modem dial a connection to the number 5551234.
ATA 는 incomming call에 modem이 응답을 하도록 한다. 모든 모뎀의 특성들은 이와 같은 명령을 사용함으로써 가능하다.
ATA makes the modem answer an incoming call. All your modem’s features are available using commands like these.
short message(SMS)를 다루는 특별한 AT 커맨드 셋이 있다. 이들 AT 커맨드들은 3GPP 에 의해 Technical Specification TS 27.005로 발표되었다. 이들 AT 커맨드들은 오직 short messages를 보낼 수 있는 (GSM) 장치에 의해서만 이해된다.
There is a special set of these AT commands to manipulate short messages (SMS). These AT commands are published by the 3GPP as Technical Specification TS 27.005. These AT commands are only understood by (GSM) devices that can send short messages.
  1. 당신이 PC와 연결할 수 있는 GSM(BluTooth, Infrared 또는 data(serial)cable을 사용해서)
    A GSM that you can connect to a PC (using BlueTooth, Infrared or a data (serial) cable.
  2. GSM은 모뎀처럼 동작한다. 어떤 폰들은 당신이 ring tone을 설정하고 address book을 다룰 수 있도록 하는 케이블과 소프트웨어와 함께 온다. 이것들은 당신의 폰이 모뎀처럼 동작하는데 필요한 것이 아니다. 모뎀처럼 동작할 수 있는 폰들은 종종 당신이 PC와 연결할 수 있도록 하는 연결타입을 선택하도록 한다.
    The GSM can act as a modem. Some phones come with a cable and software that allows you to configure ring tones and manipulate the address book, this does not require your phone to act as a modem. Phones that can act as a modem often let you pick the type of connection a PC can make.
  3. GSM은 short message를 전송하는데 사용될 수 있다 (Mobile Originated short messages). 만약 당신이 손에 있는 폰으로 SMS를 보낼 수 없다면 당신의 컴퓨터를 통해서도 수행될 수 없는 것이다.
    The GSM can be used to send short messages (Mobile Originated short messages). If you can’t send an SMS using the phone by hand, it is unlikely that it can be done via your computer.
당신의 폰이 3 필요조건을 충족한다면, 당신은 그것을 PC로부터 SMS를 보내는데 사용할 수 있다. 진보한 스마트 폰의 경우(Eriksson P800 같은)은 SMS 메시지를 보내는데 필요한 modem 커맨드를 지원하지 않는다. 나는 '장치 자체가 스마트해서 당신이 SMS 메시지를 보내는데 PC를 필요로 하지 않는다'는 철학이라고 추측한다. 불행히도, 장치 자체가 지원할 수 없는 많은 형태의 (binary)SMS 메시지가 있다. 그러나 만약 장치만 특정 모뎀 셋을 지원한다면 전송될 수 있다.
If your phone fulfills all 3 requirements, then it is likely that you can use it to send SMS messages from your PC. But this is not true for every phone. Even some advanced smart phones (like the Eriksson P800) don’t support the modem command set required to send SMS messages. I guess the philosophy is that ‘the device itself is so smart, you don’t need a PC to send SMS messages’. Unfortunately, there are many types of (binary) SMS messages that the device itself can’t support, but could be sent if only it supported the specific modem set.
SMS 메시지를 전송하기 위해 2 모드가 있다. 장치는 하나 혹은 둘다 지원할 수 있다:
There are 2 ‘modes’ defined for sending SMS messages this way. A device and support either or both:
  1. Text mode. 텍스트 모드에서는 text SMS message를 보내는 것이 간단하다. AT 커맨드는 하이퍼 터미널과 같은 프로그램을 사용하여 손으로 타이핑될 수 있다. 그러나 텍스트 모드에서는 text 메시지만 전송될 수 있다. 그러나 거기에는 더 많은 재밌는 전송될 메시지들이 있다.
    In text mode it is very simple to send an text SMS message. The AT command could be typed in manually using a program like hyper-terminal. In text mode, however only text messages can be sent. But there many more fun messages to be sent.
  2. PDU mode. PDU 모드에서는 어떤 SMS message든지 전송될 수 있다. PC는 PDU(protocol data unit)를 GSM 장치에 제출하고 GSM 장치는 단지 이를 GSM 네트웍으로 전달한다(실제로 SMSC로). PDU를 전송하는 커맨드는 간단하다, 그러나 PDU의 포맷팅은 간단하지 않고 프로그램 없이 수행될 수 업다. 흥미로운 점은 GSM 장치 자체는 전송되는 PDU를 이해할 필요가 없다는 것이다. 그래서 당신은 EMS message나 WAP push message를 지원하지 않는 폰을 사용해서 보낼 수 있을 것이다.
    In PDU mode any type of SMS message can be sent. The PC submits a PDU (protocol data unit) to the GSM device, and the GSM device just passes this on to the GSM network (actually to the SMSC). The command to send a PDU is still simple, but the formatting of a PDU is not and cannot be done without a program. An interesting fact is that the GSM device itself does not need to understand the PDU it is sending, so you could send an EMS message or a WAP push message using a phone that doesn’t support either.
나는 아직 오직 텍스트 모드만을 지원하는 단말은 보지 못했다. 그러나 PDU 모드만을 지원하는 많은 장치들을 보았다. 그래서 당신이 SMS message를 전송하는 범용 프로그램을 작성하고자 한다면 PDU 모드를 사용해서 작성하는 것이 좋을 것이다.
I have not yet encountered a phone that only supports text mode, but I have encountered many devices that support only PDU mode. So if you want to write a generic program to send SMS messages you’re better off if you do it using PDU mode.
다행히도 또한 PDU 모드는 다양한 애플리케이션 셋을 제공한다. 우리가 EMS, WAP push, bookmakrs, configuration 그리고 다른 화려한 SMS message들을 보낼 수 있는게 PDU 모드에서 이지만 말이다.
Fortunately PDU mode also offers us the richest set of applications, only though PDU mode we can send EMS, WAP push, bookmarks, configuration and other fancy SMS messages.
다음 몇몇 포스트에서 어떻게 text모드에서 SMS를 보내고 PDU 모드에서 SMS를 보내는지 자세한 사항을 다룰 것이다.
In the next few posts I’ll dive a little more into the details of how to send an SMS in text mode and how to send an SMS in PDU mode.