|
As I remeber, you've need to split message on parts with 70 characters, set InParts property to true and specifiy the same InPartsID for all your message parts.
Best, Ed.
|
|
|
|
|
Hi,
any chance to set "sender" field?
Greetings
|
|
|
|
|
Hi,
i use this library for sending messages from cellphone via COM-port (bluetooth connection) and phone needs PDU without sender number, phone sets it itself. You can modify library code to achive desired result. See Useful Links at the bottom of the article.
Best whishes.
Best, Ed.
|
|
|
|
|
Hi Eduard,
I found bug, while encoding & decoding PDU, using your smspdulibrary.
below is my code:
Firstly: Encode PDU
<br />
SMS sms = new SMS();<br />
sms.Direction = SMSDirection.Submited;<br />
sms.PhoneNumber = "+628121234567";<br />
sms.ServiceCenterNumber = "+6281100000";<br />
sms.ValidityPeriod = new TimeSpan(2, 0, 0);<br />
sms.StatusReportIndication = true;<br />
sms.Message = "Hello world";<br />
string strPDU = sms.Compose(SMS.SMSEncoding._7bit);<br />
<br />
Secondly decode this strPDU :
<br />
SMS sms2 = new SMS();<br />
SMS.Fetch(sms2, ref strPDU );<br />
string strDecode = sms2.Message;<br />
i found, the value of strDecode == null...
Why? is it bug of smspdu library?
|
|
|
|
|
Hi James,
I think this is a bug, but i have no time to figure out problem. I (and all other library users i think) will be very much appreciated for help.
Best, Ed.
|
|
|
|
|
Eduard, I think you forgot something
you defined a method only for SMSEncoding.UCS2.
you did not define a method for 7bits encoding.
public virtual string Compose(SMSEncoding messageEncoding)
{
.....
.....
byte[] messageBytes = null;
switch (messageEncoding)
{
case SMSEncoding.UCS2:
messageBytes = EncodeUCS2(_message);
break;
default:
messageBytes = new byte[0];
break;
}
......
......
return encodedData.ToUpper();
}
for SMSEncoding.UCS2 you used: Encoding.BigEndianUnicode.GetBytes
public static byte[] EncodeUCS2(string s)
{
return Encoding.BigEndianUnicode.GetBytes(s);
}
I wanna help, but i dont know what Encoding should be used for SMSEncoding._7bit
Sorry,..
|
|
|
|
|
Oh yeap. Try to implement 7 bit encoding using an articles from "Useful links" section or find ready solution.
Sorry, but i have no time. Good luck.
Best, Ed.
|
|
|
|
|
Hi Ed,
Now, i can encode sms to pdu
SMS mysms = new SMS();
mysms.Direction = SMSDirection.Submited;
mysms.PhoneNumber = "+6281212345678";
mysms.ValidityPeriod = new TimeSpan(5, 0, 0, 0);
mysms.Message = "Hello";
string pduTxt = mysms.Compose(SMS.SMSEncoding.UCS2);
How do i send sms ?
|
|
|
|
|
Hi.
This library doesn't respond to sending or receiving requirements, only encode/decode functionality.
So, you can use SerialPort class to send and receive AT commands from your cell phone or use special sms protocol to sen messages via sms provider. For both methods you need encoding and decoding message to/from PDU format.
My best wishes.
Best, Ed.
|
|
|
|
|
i'm sorry,
i dont know this is a correct place to ask about USSD or not.
Does anyone know, how to handle USSD (Unstructured Supplementary Service Data)?
|
|
|
|
|
I have not appropriate hardware for testing, but have some knowledges. Please, try to describe what is your problem.
You plan to work with USSD through cell phone or network SMS protocol?
Best, Ed.
|
|
|
|
|
i plan to create an application to work with USSD through cell phone (siemens c55).
For example,
My GSM provider, provide a USSD tools to transfer voucher between customers. than, i want to transfer a voucher to my friend.
below is current process (manually):
1. from my cell phone, i dial a USSD number such as: *123#
2. then my phone display a USSD message. i.e "input phone number"
3. i click button "answer"
4. my cell phone display a text box:
5. input my number: +1233453455
6. then click OK
... etc
How to create a program like that?
Thanks for reply.
|
|
|
|
|
Okay. First of all you need to establish connection between application and phone. In my case, i pair phone with computer via bluetooth service and setup serial port connection. In "phone and modem options" in control panel I've see port COM21. When I connect phone via usb cable I've see COM6 port at "phone and modem options".
I wrote simple program that send "AT" command to phone and phone replies "AT" to me using SerialPort .net 2.0 class. With default settings: bit-rate and so on.
When you'll achieve same result, I'll continue my tutorial.
Best, Ed.
|
|
|
|
|
OK,
i've several cellphones (Nokia N73, siemens c77, etc),
but for this purpose, i used Siemens C55.
my Siemens c55 do not have a bluetoth facility.
But, I could establish connection between PC and my Siemens C55 via USB Cable using COM8. And i tried using Hyper terminal, and send AT command "AT" to my cell phone like following:
AT
OK
AT+CMGI
SIEMENS
AT+CMGM
C55
Since my siemens C55 do not have bluetooth facility,
Should i used my Nokia n73 for this purpose?
Thank you for the reply.
|
|
|
|
|
No. If you don't need phone mobility you can use your siemenes device as well.
Write simple console program using SerialPort class.
<br />
SerialPort port = new SerialPort("COM8");<br />
<br />
port.DataReceived += new SerialPortEventHander(delegate(object sender, SomeArgs sa) {<br />
string recievedData = port.ReadToEnd();<br />
});<br />
<br />
port.WriteLine("ATD*100#;");
In your case you've interesting in AT+CUSD command (page 97 in document below).
AT Command Set.
Best, Ed.
|
|
|
|
|
Thank you verry much Eduard !
|
|
|
|
|
Welcome, James
Best, Ed.
|
|
|
|
|
Hello Sir,
I am making a project in SMS Application,please do suggest me what should i study first before taking up this project and also tell me the hierarchy of steps to develop this project .
Thanks
Mazhar
|
|
|
|
|
Believe me, developing the sms encoding consumes a lot of time. I had to do it also for my company, for this I can't publish the whole code,but i can help if needed.
There are tools available online to convert this project to vb.net.
Doing so, you probably still need to change some small glitches that may have appeared during the conversion, but at least you will learn the proces of the encode/decode.
So in small words, understand how the encoding goes...
http://labs.developerfusion.co.uk/convert/csharp-to-vb.aspx[^]
|
|
|
|
|
Hello Sir,
I am a project in SMS Application,please do suggest me what should i study first before taking up this project.
Thanks
Mazhar
|
|
|
|
|
Hello,
Is this code available in VB.NET bcoz i am making a project of SMS Application in VB.NET.
|
|
|
|
|
You have forget question sign. No, this code doesn't available in VB .net.
Best, Ed.
|
|
|
|
|
If you don't have a lot of time it could be a good idea to use an SMS gateway,
such as the Ozeki SMS Sending and SMS
receiving Gateway, because it does a lot things that is very hard to
implement: character conversion to unicode SMS messages, GSM 7 bit, segmentation
and reassembly for multipart SMS messages with 8 bit reference numbering and 16
bit reference numbering, message delivered to network report,
message delivered to handset report, message delivery failed
report, etc. Not to talk about long term upgrade. If you do a system now with
a GSM modem, it might be possible that you will have to upgrade in the long term
to higher capcity IP SMS connection, such as SMPP
sms sending, UCP sms sending or
CIMD2 sms sending. Remember,
a GSM modem can only send 10 SMS meessages per minute, while an IP SMS connection
will allow you to send 3000 or more SMS messages per minute.
|
|
|
|
|
Hello.
Im trying to convert longer messages from PDU to Text,but it doesn´t work.
How can i do that?
Greets
|
|
|
|
|
Hi, why it doesn't work? Any exceptions? Give me your PDU text, I'll try to figure out what the problem.
Best, Ed.
|
|
|
|