|
PDU Helper not exist in solution. Where Can I download? Thanks
|
|
|
|
|
Please try to download new demp attachment. "Lib" folder contains missing assembly.
Best, Ed.
|
|
|
|
|
I compose and send SMS via modem as shown,
SMSPDULib.SMS sms = new SMSPDULib.SMS();
sms.PhoneNumber = "77057231750";
sms.StatusReportIndication = true;
sms.Message = "some msg";
sms.Direction = SMSDirection.Submited;
sms.ValidityPeriod = new TimeSpan(0, 0, 1, 0);
but delivery reports has strange format:
00040B917750271357F01F1970903090552500020020.
This report decoded as:
Service center number:
Service center time stamp: 03.09.2007 9:55:52
Message reference #: 0
Direction: Received
Phone number: +77057231750
Status report indication: False
Message:
But cell phone recognize this as report correctlly.
Whats wrong?
-- modified at 12:55 Monday 3rd September, 2007
For all.
We`re sorry for this russian dialog.
There is no bag in this library, problem with cell phones Motorola, that not fully compliant with the standart. Motorolas phones transform delivery reports to its own format, just simple sms with no needed information (such as status, msg id, etc.
|
|
|
|
|
Try to add + sign before number at PhoneNumber string, property's setter must that the number international.
Я только что допер, что ты должен понимать по-русски, а мне так проще выражаться. Еще может быть проблема в ValidityPeriod, но исправления находятся у меня дома, так что если не забуду, то обновлю исходники. И еще, какой модем ты используешь? Номер сервисного центра ты специально убрал или он не пришел?
|
|
|
|
|
ValidityPeriod я ставил как у тебя в примере, это ничего не меняет. Модем - Моторола L6, Motorola ROKR-E1. Номер сервис центра не приходил. Блин, есть возможность тестить разных операторов- результат один, но нет возможности использовать другой модем, т.е. не хочется покупать другую сотку
Добавление + не помогло.
Начинаю подозревать, что это все-таки тел виноват.
Спасибо за оперативный ответ.
|
|
|
|
|
Слушай, ты попробуй через сотовую трубу отправить с помощью AT команд. Подключаешь трубу к компу по USB (COM), Infrared или Bluetooth, открываешь COM порт и пишешь туда AT команды, как в свой модем.
Я через nokia и sonyericsson отправлял - проблем не было.
В общем если время ждет до вечера, то терпи, вечером выложу, то что у меня дома работает без ошибок.
Не за что
Best, Ed.
|
|
|
|
|
Да я через трубки и пробую, как такового модема у меня нет .
Просто засада в том, что обе трубки - Моторола, которая повидимому отчеты о доставке как-то преобразует. Есть еще труба LG, но это вообще геморой, у нее видимо свой набор команд, мне не хочется под них затачивать прогу. Ты сам через какой телефон отправляешь-принимаешь?
Тимур.
|
|
|
|
|
Я же написал, что nokia и sonyericsson использую
Кстати, через моторола RAZR v3 тоже вроде пробовал.
Дело в том, что я помню как недавно взялся за этот код и через мой соник не поехала смс'ка, и я кучу дефектов даже нашел, но(!) оказывается на трубке банально деньги кончились
Ты говоришь, что проблема с отчетом, а смс доходит до получателя?
Best, Ed.
|
|
|
|
|
Слушай, я только что понял, что проблема у тебя не в отправке, а в том, что отчет не правильный
Я, чесно говоря, класс для отчетов написал просто так и не пользовался им пока, так что в нем могут быть ошибки. Советую тебе сначала посмотреть ссылки (useful links) в статье) и класс отчета, думаю найдешь в чем проблема. А у меня сейчас нет на это времени.
Best, Ed.
|
|
|
|
|
Да я смотрел доки. То, что приходит, никак докам не соответствует. В то же время на каком-то форуме нашел pdu-шку отчета - она твоим классом разобрана была правильно. Так что скорее всего это телефон.
|
|
|
|
|
Я тебе советую сделать наследника типа MotorolaSMSReport class, и там реализовать эту специфичную штуку. А AT командой ATI1 (или ATI2) получать марку телефона и использовать нужный класс
Best, Ed.
|
|
|
|
|
Все дело в том, что в мотороловский репорт - это вовсе не репорт, это просто смс с прбелом в теле сообщения, которое не содержит идентификатоа сообщения, о котором отчет. Так что гиблое дело, тем более что мотороловский модем не умеет репорты сливать сразу в порт, минуя память. Надо тело менять. Попробую сонерик или симак какой-нибудь.
|
|
|
|
|
Ну ты в своем сообщении напиши, что моторола говно и проблемы не было, а то люди не поймут наш французкий и не найдут решения
Удачи.
Best, Ed.
|
|
|
|
|
For all.
We`re sorry for this russian dialog.
There is no bag in this library, problem with cell phones Motorola, that not fully compliant with the standart. Motorolas phones transform delivery reports to its own format, just simple sms with no needed information (such as status, msg id, etc.
|
|
|
|
|
Can this be used to encode a WBMP picture like barcode?
|
|
|
|
|
I think yes. You can use SMS.UserDataHeader array which contain your encoded picture.
|
|
|
|
|
|
Hola, no escribo mucho en inglés pero si entiendo, estoy utilizando estas líneas de código para codificar en 7 bit y me parecen excelentes, pero tengo pérdida de caracteres, no se a que se deba, me podrían ayudar.
Gracias.
Mikhail Cobos I.
|
|
|
|
|
cany you please tell me how can i send MMS from my PC to anyother mobile?
Please reply me soon.....i need that thing in my project
Thanks
|
|
|
|
|
|
How do I read long SMS ??? I'm using the example ( using Fetch method ), it worked for a normal sms (<=160 chars). But it can't read long SMS.
|
|
|
|
|
You can use the free software PDUSpy (Google PDUSpy) to decode and reassemble long SMS received on your mobile phone, and then modify (or hack :p) the library to support long SMS. I don't know how difficult it will be do with this library, but this is how i do it for my own software.
---------------------
SMS Software@Expert
---------------------
|
|
|
|
|
Hi thx for this great tool! I've been trying to implement the multipart message option but no luck so far.
I want to use the UCS2 since we in Denmark has a lot of special chars æøå etc.
<= 70 chars everything works like a charm.
I've added:
if (UserDataStartsWithHeader)
_pduType = (byte) (_pduType | 0x40);
to the ComposePDUType method on the SMSBase.
If i send this to my phone i recieve a lot of square boxes in two messages. I guess I am missing something.
One thing that i have not figured out yet is the length of the header and the insertion of the header in the Message text. Are there some kind of header length max? how should the octet length be calculated (header.length/2?) and transformed into hex(05 = 5 octets)
Right now i am using the first 10 chars of the message as the header and i am writing their length as 05 octets. After that i paste the header into every message i send and transforms header(10 chars) and message(70 chars) to PDU which i send to the modem.
Any help would be highly appriciated and rewarded with a ½ L of brown sugarwater.
|
|
|
|
|
Hello again!
I try send 7bit coded sms but something was going wrong. It was lenght of message.
Usually it looks like that:
<br />
41 54 2B 43 4D 47 53 3D 32 33 0D AT+CMGS=23. <br />
<br />
Answer: 2007-04-29 20:25:18.79064 (+0.0469 seconds)<br />
<br />
0D 0A 3E 20 ..> <br />
<br />
Request: 2007-04-29 20:25:18.80564 (+0.0000 seconds)<br />
<br />
30 30 30 31 30 30 30 42 39 31 38 34 30 36 37 32 0001000B91840672<br />
37 39 37 39 46 35 30 30 30 30 30 42 36 31 42 31 7979F500000B61B1<br />
33 43 42 43 30 45 39 33 43 33 36 32 37 39 31 38 3CBC0E93C3627918<br />
1A . <br />
<br />
Answer: 2007-04-29 20:25:20.58764 (+2.7813 seconds)<br />
<br />
2B 43 4D 47 53 3A 20 31 35 31 0D 0A 30 0D +CMGS: 151..0.<br />
<br />
But in bold was 0A for message "abrakadabra".
I changed one part of code.
<br />
<br />
public virtual string Compose(SMSEncoding messageEncoding)<br />
{<br />
ComposePDUType();<br />
string encodedData = "";<br />
if (ServiceCenterNumber != null && ServiceCenterNumber.Length > 0)<br />
{<br />
encodedData += EncodePhoneNumber(ServiceCenterNumber);<br />
}<br />
else<br />
encodedData = "00";
encodedData += Convert.ToString(_pduType, 16).PadLeft(2, '0');
encodedData += Convert.ToString(MessageReference, 16).PadLeft(2, '0');<br />
encodedData += EncodePhoneNumber(PhoneNumber);<br />
encodedData += "00";
encodedData += Convert.ToString((int)messageEncoding, 16).PadLeft(2, '0');
<br />
if (_validityPeriodFormat != ValidityPeriodFormat.FieldNotPresent)<br />
encodedData += Convert.ToString(_validityPeriod, 16).PadLeft(2, '0');
<br />
<br />
byte[] messageBytes = null;<br />
<br />
switch (messageEncoding)<br />
{<br />
case SMSEncoding.UCS2:<br />
messageBytes = EncodeUCS2(_message);<br />
encodedData += Convert.ToString(messageBytes.Length, 16).PadLeft(2, '0');
break;<br />
case SMSEncoding._7bit:<br />
messageBytes = Encode7Bit(_message);<br />
encodedData += Convert.ToString(_message.Length, 16).PadLeft(2, '0');
break;<br />
default:<br />
messageBytes = new byte[0];<br />
break;<br />
}<br />
<br />
<br />
<br />
foreach (byte b in messageBytes)<br />
encodedData += Convert.ToString(b, 16).PadLeft(2, '0');<br />
<br />
return encodedData.ToUpper();<br />
}<br />
|
|
|
|
|
Will you support creating 7Bit messages?
I wrote sth like this:
<br />
public static byte[] Encode7Bit(string s)<br />
{<br />
string in_str = "";<br />
byte[] out_bytes;<br />
for (int ii = s.Length - 1; ii >= 0; ii--)<br />
{<br />
in_str += Convert.ToString((byte)s[ii], 2).PadLeft(7, '0');<br />
}<br />
if (0!=(in_str.Length)%8)<br />
in_str = in_str.PadLeft(in_str.Length + (8 - (in_str.Length) % 8), '0');<br />
out_bytes = new byte[in_str.Length / 8];<br />
for (int ii = 0; ii < in_str.Length / 8; ii++)<br />
out_bytes[ii] = Convert.ToByte(in_str.Substring(in_str.Length - ((ii + 1) * 8), 8), 2);<br />
return out_bytes;<br />
}<br />
Mayby it will be usefull.
Bye.
Paweł Paduch
-- modified at 20:03 Monday 11th June, 2007
|
|
|
|
|