Sending SMS API - partially working (Windows Mobile) - Windows Mobile Development and Hacking General

Hello,
I am using C# to send SMS from an application i'm writing.
i have tried either
1) Microsoft.WindowsMobile.PocketOutlook.SmsMessage
2) [DllImport("sms.dll")] int SmsSendMessage(...
but in both cases i need to specify a FULL phone number including country code (i.e. +972544...)
if i specify a regular number, the SMS won't reach.
the interesting thing is that when i use the built in SMS Phone's application and specify a regular number, the messages do reach.
So, have i missed something? Is there a standard way to make my messages be sent (have i forget a flag, special way of calling the API or what ?!)
Many thanks

Hi there,
I don't know a lot about programming, but maybe you could do something like the following example.
My country code = +316
Set all the country codes in a array (or something like it in C#)
When I type in the number 0612345678
Use some kind of script to split:
$countrycode = 06;
$phonenumber = 12345678;
Search in the array for '06'.
$newcountrycode = +316;
echo($newcountrycode,$phonenumber);
+31612345678
Click to expand...
Click to collapse
Maybe this will help?

issue resolved
Just to update - I found a solution to this problem
The API that I use is SmsOpen, SmsSendMessage, SmsClose (from sms.dll).
The SendSmsMessage API gets an address parameter which includes one of numerous values, the ones relevant for the solution are SMSAT_INTERNATIONAL (equals 1), And SMSAT_UNKNOWN (which is 0)
If the number starts with “+” use international, else use unknown and the phone will figue this out and add the relevant extension. Note however that the latter might not work when roaming.
enjoy

Related

Custom Contact Fields

Hey,
Does anyone know if it is possible, through the supplied T-Mobile 2.26 ROM or third party software, to create custom contact fields? For example, say I want to have one contact called Papa John's Pizza and inside that contact have three fields named Anytown, Springfield, and NYC each with a number. As it stands now I have to either make a seperate contact for each location or have one contact and make each location say home, work, and work2. The latter choice makes it near impossible to remember which number goes to which office. I have many contacts that have multiple numbers that do not fit neatly into the supplied fields. On my old S60 phone this was quiet a simple task but I just can't seem to figure it out on WM5. Thanks for the help.
You can use IneSoft Address Book to add custom contact fields. The extra fields will be save as Note.
To mark a phone number you can put the text inside the phone number itself. E.g.
Work: +123456789 (Springfield)
or even
Work: Springfield +123456789
where "Work:" is the field name provide by Contacts application. You can use any character that can't be dialed (e.g. not a digit, * or #). Though some letters may cause problems, e.g. 'p' may mean 'pause'... I write my comments in Russian and therefore has no such problems
I use this solution for a long time. It is not specific to an OS or application.
And yes, IneSoft Address Book is good, not only for additional fields! This was the first application I purchased for my TyTN.
Lurker0 said:
To mark a phone number you can put the text inside the phone number itself. E.g.
Work: +123456789 (Springfield)
or even
Work: Springfield +123456789
where "Work:" is the field name provide by Contacts application. You can use any character that can't be dialed (e.g. not a digit, * or #). Though some letters may cause problems, e.g. 'p' may mean 'pause'... I write my comments in Russian and therefore has no such problems
I use this solution for a long time. It is not specific to an OS or application.
Click to expand...
Click to collapse
This would be really neat if Voice Commander 1.6 would recognize it, but it doesn't.

Can anyone develop an SMS application . . .

Hi all.
I was wondering if it is possible to develop an sms application whereby as well as all the usual info you type in eg recipient name, number, message etc, you could have a way to control and set the outgoing 'from' number as well.
This would be handy where some of us are forced to carry two phones around with separate contacts on each.
maybe its not possible but id love to have something like that to simplify life instead of spending multiple messages explaining why id like the reply to a different phone number. ( and no we are not allowed to transfer contacts )
Thanks Guys.
AndyG
Sorry, the from field is not set on the device itself, but set by the network, to do that you would have to do it on the service provider side.
...the only options you can set at the application layer are the ones available through the SmsSendMessage API:
http://msdn2.microsoft.com/en-US/library/aa455068.aspx
To achieve something like this is not possible at application level..what you'll need is to get into a much larger sphere of sim spoofing, which can be carried out, I think, (as I'm a BTS s/w guy,i.e., network software developer) in following two ways:
1. Cloning/spoofing the sim itself using another sim(can be done and is done a lot I think)
2. Hacking into the GSM\Radio image that is loaded into our devices and then hacking the messages exchanged between network and mobile, but this is not possible since we dont have the source code for the radio image
Anyways, if any of these methods are possible, then not just the sms, but ur complete phone functionality will be replicated, i.e., basically u will have two phones with the same number which kinda defeats the purpose of having two phones

[New Version] HushSMS - A "Silent" SMS Tool [New Version v0.6beta]

[05/27/08] HushSMS - A "Silent" SMS Tool [Version v0.6beta]
HushSMS is a tool to sent a class zero message (aka Flash-SMS) or a stealthy PING message to another cellphone.
The "Silent Ping" enables you to sent a message to another cellphone without the owner getting knowledge about.
The message is discarded on the owners phone and no trace exists. You will get back a message from the operator that your message has been delivered, proving that your message has been received, and thus you can know that the owners phone is switched on.
This is not some kind of hack or whatever. It's a normal function per standard and works on any phone.
Q: Why such a software? A: I regulary need it in my job. Sometimes I have to be sure a specific phone is switched on and I can send information to that phone without it beeing stored (class zero message).
It runs on Windows Mobile 5 and 6 based PocketPCs.
EDIT: A word of warning: If you send a class zero message to a windows mobile device, your number will not be shown. Instead of the senders number, windows mobile will show something like "Network Message".
So in general this tool could be used in a manner it is not intended and designed for. So be responsible!
Usage
-----
Copy the CAB file to your device and double click it.
The program is installed to \Program Files\HushSMS\HushSMS.exe.
There are three functions:
Send a normal SMS
Send a class zero message (Flash-SMS)
Send a stealthy message
- To send a normal sms, leave the checkboxes for "Class 0" and PING unchecked. If you want a receipt enable the "Return Confirmation" checkbox.
- To send a class zero message enable the "Class 0" checkbox and write your message.
- To send a silent PING just enable the "PING" checkbox. There is no need to write something in the Textbox, because the target phone will discard it anyway.
If you enter the number manually you have to enter it in international format (for example starting with +49... for germany).
You can alternately choose the number from your address-book but it has to be in international format also.
The program will pop-up a message box to notify you about the success or failure of the sending process. This message box
might be under an overlaying window if you have other programs open (a file explorer for example).
That's it. Enjoy it, as always it's freeware.
Homepage with download: http://www.silentservices.de/HushSMS.html
EDIT: v0.2
Download @: http://www.silentservices.de/HushSMS-0.2.CAB
EDIT: v0.3 beta 08.04.2008
See post #87: http://forum.xda-developers.com/showpost.php?p=2098699&postcount=87
EDIT: v0.3 beta4 15.04.2008
Changes:
- Smartphone UI
- Added PING2 message option
- Added notification bubble (for PPC only)
- Program now quits after message is sent
- small general improvements
As for the PING2 function: I added this for all the people whose provider will automatically transform Type0 messages to normal SMS. This function uses a different method for sending a "silent ping" which should enable all users to send those messages, even on US carriers. The principle is pretty simple: I'm sending a MWI deactivation, which is not shown to the user, and request a status report. If you receive the status report, you known that the "pinged" phone is active.
See Post #103
EDIT: v0.6beta 27.05.2008
New features:
- Additional MWI Messages (except for voice MWI, most of them will not work on windows obile based target phones)
- Added WAP-Push SI (service indication) and WAP-Push SL (service load messages)
See Post #124
This program doesn't seem to work on US-Carriers (except with the new beta4 which enables another method for the "silent ping")
Edit: I've tested the program on the german eplus network, and found out that class0 messages, as well as type0 (The Ping) are converted to normal messages by the SMSC of eplus.
However, it is working as expected on vodafone.de
Thanks a lot I have been looking for program like this for a long time. Will report any glitches.
useful one, great bro
dont work on Artemis (wm6)
error when sending msg. ..
EDIT: owww i forget about country prefixes (f/e +48) now working fine, thanks
Tested on my tytn and it works perfectly.
Quick question...If I send a class 0 sms to normal cellphone like samsung or nokia will my number be shown.
The only extra feature that would be great would be the ability to send a sms to a friend and make it seem as though it came from another friend.....is it possible to do and if so how difficult would it be to implement something like that?
"Silent Ping" funtion dosn't work.
It seems like a class zero message appears on the Nokia cellphone
Before anyone else says it doesn't work: read the first post, you MUST USE COUNTRY CODE.
Ive tested all the features of the app on my tytn and everything works fine.
I never entered the country code and it still works.
I've tested this app and it does everything it says it does, which is cool. When I choose "Class 0" and sent a text message to myself (wm6 device), it read the message, it was from "Network Administrator", and my phone number was not listed. Also, when I enabled just the ping to send a silent message to my other cellphone which was off, it read that the message was sent. When i turned my other cellphone on, (motorola phone. non windows device), my cellphone number was visible. So this works exactly as c0rnholio states.
tried it on my wizard and nothing happens, international format or not. It says message sent but i never get a ping or anything back even to myself
I tried this on my apache as well and had no success. Maybe I don't know how to enter the phone number properly. I also live inside the US and have Verizon if this helps at all.
fuego3048 said:
I tried this on my apache as well and had no success. Maybe I don't know how to enter the phone number properly. I also live inside the US and have Verizon if this helps at all.
Click to expand...
Click to collapse
AFAIK the APache is a CDMA device. Handling of SMS is sligtly different between CDMA and GSM. This program is written for GSM Networks and due to the lack of a CDMA Network and a device which supports it, I cannot make it compatible. Sorry.
Rcas said:
tried it on my wizard and nothing happens, international format or not. It says message sent but i never get a ping or anything back even to myself
Click to expand...
Click to collapse
It might be that your network opertor is blocking such messages. Have you been able to send class 0 sms in general with other tools?
welkin said:
"Silent Ping" funtion dosn't work.
It seems like a class zero message appears on the Nokia cellphone
Click to expand...
Click to collapse
Interesting. Then your Nokia behaves against the GSM standard. Which one is it?
RPG0 said:
Before anyone else says it doesn't work: read the first post, you MUST USE COUNTRY CODE.
Click to expand...
Click to collapse
I fixed that country code stuff in v0.2, which will be out in a few days. You will the be able to send either in international or national format.
My GF Nokia was able to see my number and save the message I sent with class 0 ticked. Seems my operator does not like Class 0 SMS
KarhU said:
My GF Nokia was able to see my number and save the message I sent with class 0 ticked. Seems my operator does not like Class 0 SMS
Click to expand...
Click to collapse
A class zero message is displayed in general. Also it is right that your number is shown. Some phones are able to save those messages, others are not. So in general everything is fine and your operator supports class zero messages. If you get a class 0 message and to not click on options->save or whatever the procedure is on your phone, the message should be discarded according to the GSM standard.
The number obfuscation only seems to occur on windows mobile based devices. On these, when a class 0 message is comming in the device will not show the senders number but instead show "Network Message" or "Network Administrator". This seems to be a bug in windows mobile and may lead to further attack scenarios because a user may think this message is comming from the network operator. If you send a wap push SI message for example you can embed a link to a webpage, or a link to a cab-file on a webpage. The user might then think this link is from the network operator and click on it. This may lead to mallicious code installation or execution or whatever.
The "Silent Ping" is defined in the GSM standard. It is a kind of message which must be received by the handset and must be directly discarded without user notification. I've tested this with different phones from different manufacturers and it never failed to work, but YMMV.
So your phones behaves in the normal range of operation. Have you tried to send the PING to your nokia? If so, and your nokia shows it, what is displayed?
PING works as advertised - no sign of it at Nokia at all.
works fine on most handsets, but the Nokia display your number.
Nice program
this is somewhat a nice-and-funny program....i like it....though i haven't figured out how the function "Ping" does as i have tried by following the instruction from its official site......weird.....One thing is important to whom may it fail with other functions....pls do remember Enter International Format in a word coutry code....for exampl like me Hong Kong is +852..
cheerz

autodial prefix internally

I hope (but am very sure) that this is the right place to ask...
The situation: ich use the mobile contract of my company, which I may also use privately. However, in this case I have to dial *+150# as prefix before the number. For text messages the prefix is just 150.
Sure, one could save the targetnumber already with the prefix - but since it is two different ones, the mapping from the phone book doesnt work...
Replying to a text message, it is sent to the sender's number, instead of to the one with a prefix saved in the phone book. (The Hero is able to map the sender's number to the according phone book entry (incl. prefix))
I'd like to change my Hero in such a way that whenever I dial a phone number of a certain group (e.g. friends), the respective prefix would be prepended. Similar, for text messages the respective msg-prefix (150) shall be prepended.
Do I have to root the phone in order to realize these functions? And above all, how would I implement my ideas?
Cheers,
kermit
Now there is nothing hundred percent like that however you could save to numbers to the contact instead of one number for each contact
hi strider96, thanks for your comment. Well, I tried this already. But as I indicated, when replying to text messages, the system will not reply to the numbe saved in the phone book, but reply the exact sender number (which is without prefix, in standard international format usually). Moreover even if this would work, as I said, when having two different numbers in the phone book (due to the two different prefixes), android does not neccessarily map the correct phone book entry an incoming message.
Instead of editing the Android system at a basic level, I was thinking about an app similar to the one used for calling cards. There the standard phone book entry would be extended by a respective prefix. No idea how I could realize this.... Still, this wouldn't be such a nice solution, but at least it would be one...

[Q] SMS application that can set TP PID bit replacement code

Ok this is a long shot but I'm hoping someone may be able to answer this question.
I need to know if it's possible to develop an application to replace the native sms messaging facility in Android (I would like to know if it's possible on other platforms too but I use froyo on my HD2)
according to GSM technical specification http://affon.narod.ru/GSM/GSM0340.pdf as long as the SMSC supports it then it should be possible to set the TP PID to create replacement codes in an SMS.
This allows you to send an SMS to someone with a code set and then send another message to them with the same code. The phone should recognise the same code and overwrite the message.
There are already ways that you can do this using a GSM modem and SMS gateway software such as Nowsms, Bulk SMS and Kannell etc. There is plenty of information on google. however these all require you to have hardware and send the messages from a computer.
The question I have is, would it be possible for someone to develop an app which allowed the user to specify if the sms was sent with the code set, directly from the handset?
Thanks in advance!
Just a bit of additional info from the nowsms support forums
“PID” – Specifies a protocol id field to be associated with the message. The web interface of NowSMS includes checkbox settings for specifying a “Message Type” value. Setting one of the “Replacement Type” values means that if the gateway sends a subsequent message with the same replacement type value, this will replace any previous messages that were sent by the same sender with the same replacement type value. When submitting an SMS message via URL parameters, replacement type values 1 thru 7 correspond to settings of PID=41 thru PID=47.
http://www.nowsms.com/discus/messages/1/13536.html
Also it seems like it may be possible, at least on winmo
http://msdn.microsoft.com/en-us/library/aa921493.aspx

Categories

Resources