SMS
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
Clearer PIC
Hroudtwolf, I already have that. What I mean is let's say I have a PC connected to a hand phone and I have valid subscription. I want to be able to send a SMS.
Ex. If you have a Nokia phone, you have the utility Nokia PC Suite which can send SMS. I would like to use PB to write just the SMS part without any SDK or ActiveX objects. I saw some samples with oxygen software but it is a component.
Ex. If you have a Nokia phone, you have the utility Nokia PC Suite which can send SMS. I would like to use PB to write just the SMS part without any SDK or ActiveX objects. I saw some samples with oxygen software but it is a component.
small hint:
use Sysinternals Portmon and listen to
the serial port that is connected to your
hand phone
(formerly known in germany as Handy).
Then let the nokia suite send a sms and
you capture all output from the serial port.
use Sysinternals Portmon and listen to
the serial port that is connected to your
hand phone
(formerly known in germany as Handy).
Then let the nokia suite send a sms and
you capture all output from the serial port.
SPAMINATOR NR.1
there is no standard brand independent protocol for sending sms messages via directly connected devices
(hey, i've been professionally involved in this business for a while
)
however, there are some other (low cost) solutions...
the cheapest way is probably an 'option firstfone' or similar pcmcia card, they use an expanded hayes command set that will allow you to send and receive messages (remember the at dt era?)
as an alternative, there are a few external boxes (also using hayes or similar) that take a simcard and become a (sort of) modem
there are several (low cost) sms service providers that offer you an http or tcp/ip interface to send and receive messages, pricing isn't that bad, though it depends on your volume
(hey, i've been professionally involved in this business for a while

however, there are some other (low cost) solutions...
the cheapest way is probably an 'option firstfone' or similar pcmcia card, they use an expanded hayes command set that will allow you to send and receive messages (remember the at dt era?)
as an alternative, there are a few external boxes (also using hayes or similar) that take a simcard and become a (sort of) modem
there are several (low cost) sms service providers that offer you an http or tcp/ip interface to send and receive messages, pricing isn't that bad, though it depends on your volume
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
there is no standard brand independent protocol for sending sms messages via directly connected devices
(hey, i've been professionally involved in this business for a while )
blueznl: Are you sure there is no standard?

I've tried quite a few mobiles with my "MessageGameServer" (written in PureBasic) from the Nokia 402 (early phone) to the latest Philips, etc without any problems!
I found that there is a semi-standard using modem type AT commands that work on most phones with the appropriate modem driver. This is usually bundled with the phone, available for download somewhere or at cost with something like Nokia Data Suite.
Some phones don't need a modem driver - like the Nokia Communicator or some others with infrared ports. Others do, almost all USB connected and really old phones (such as the 402) phones will need a driver - this "driver" will convert the high level AT commands to low level commands for the actual phone. The modem drivers usually set up a virtual COM port that you can send the AT commands to...
I can't give out the complete code (its a working commercial program), but...
I use this to init most phones:
Code: Select all
Procedure InitSMS(Handle)
NiceOutput(#GamePlay,"Initialising SMS modem")
SendSerial(Handle,"ATZ","Init phone modem")
SendSerial(Handle,"AT+IFC=0,0","No flow control")
SendSerial(Handle,"ATE1","Turn on echo")
SendSerial(Handle,"AT+CREG","Get network status")
SendSerial(Handle,"AT+CSQ","Check signal strength") ; needs to return 12 or better for reliable connection
SendSerial(Handle,"AT+CRC=1","Extended ring information")
SendSerial(Handle,"AT+CNMI=1,2","Pass along incoming messages")
SendSerial(Handle,"AT+CMGF=1","Set text mode")
EndProcedure
Here are some replies:
Code: Select all
Case "CSQ"
NiceOutput(#GamePlay,"SMS modem signal strength:"+SerialParam$+Chr(13)+Chr(10))
Case "CMGS"
NiceOutput(#GamePlay,"SMS message sent, reference #:"+SerialParam$+Chr(13)+Chr(10))
Case "CMT"
WaitMessage=#TRUE
Case "CRING"
NiceOutput(#GamePlay,"SMS modem reports incoming call! Type:"+SerialParam$+Chr(13)+Chr(10))
Code: Select all
If SerialCommand$="OK"
NiceOutput(#GamePlay,"SMS modem reports the command executed 'okay'"+Chr(13)+Chr(10))
EndIf
If serialCommand$="ERROR"
NiceOutput(#GamePlay,"SMS modem reports 'Error' - command not supported by modem"+Chr(13)+Chr(10))
EndIf
Code: Select all
SendSerial(Handle,"AT+CMGS="+Chr(34)+TelephoneNo$+Chr(34),"Set telephone number")
SendSerial(Handle,SmsMessage$+Chr(26),"Send message with CTRL-Z")

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
doubledutch: yes i am
but that has never stopped manufacturers to copy from each other 


( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Blueznl: Your right, its a pity they never all got together and agreed. It looks like there is no properly agreed standard - it just seems to have been formed over time, some phones understand some commands, others all... Most however, can get to the stage where they can send an actual SMS 
Akee: You may need to delete the recieved SMS from the phone using the message id number received... There are clues on the net on how to do this...
There is also another method of using the AT commands to send text messages with pictures - not mms - but a "nokia" standard that seems to have been adopted by some others. This is more complex, but is worth looking into if you have some time to spare.
-Anthony

Akee: You may need to delete the recieved SMS from the phone using the message id number received... There are clues on the net on how to do this...

There is also another method of using the AT commands to send text messages with pictures - not mms - but a "nokia" standard that seems to have been adopted by some others. This is more complex, but is worth looking into if you have some time to spare.
-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
There are some mobile phones that can be treated like a modem. You can talk to them via AT-commands. The command set is usually expanded to handle phone commands like send message. I use a Siemens T35i to send and receive SMS. The T35i is afaik a standard S35i mobile phone without display and keypad. There is a command reference available as PDF on the net.
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
stbi: checkout the code above, it uses these extra AT commands...There are some mobile phones that can be treated like a modem. You can talk to them via AT-commands. The command set is usually expanded to handle phone commands like send message.

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system