|
Здравствуйте,
Пожалуйста помогите, я не могу поставить порт отправление, можно ли это реализовать,
наверно порт определяется внутри UDH. если знаете помогите пожалуйста!!!
i'm student beginner c#
|
|
|
|
|
Порт действительно опрделяется в user data header'е, но я не знаю какие еще данные должны быть в этом заголовке, кроме самого порта.
если Вы отправляете SMS через соединение с сотовым телефоном, то рекомендую вам написать приложение на j2me, где с помощью j2me api сформировать sms запрос на какой-нибудь порт и отправить его себе же. затем найти это сообщение во входящих и разобрать user data header там должно быть не больше двух int'ов.
Альтернативный вариант — почитать документацию по user data header и sms port.
Удачи.
Best, Ed.
|
|
|
|
|
Большое Вам спасибо, я написал софт для мобильник на j2me принимающий смс с определенного порта, теперь я должен написать отправляющий софт из компьютера с определенного порта.
еще раз спасибо Вам...
i'm student beginner c#
|
|
|
|
|
|
Спасибо, я почти разобрался,
а Вы не знаете порт на всех телефонах одинаковый (т.е. все поддерживает)?.
i'm student beginner c#
modified on Friday, July 18, 2008 4:18 AM
|
|
|
|
|
Нет, не знаю. Точнее, я не понимаю о чем Вы, попробуйте выразиться яснее.
Best, Ed.
|
|
|
|
|
Спасибо разобрался, на всех работает окажутся.
i'm student beginner c#
|
|
|
|
|
how can i sent the concatenated message using this library will u explain me???
thanks
|
|
|
|
|
Hey nice work friend.
It allows only 70 characters to send.
Kindly tell us what to do when a msg with morethan 70 characters to send?
sdfsd
|
|
|
|
|
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 !
|
|
|
|