[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: --sendsms fails on T68
From: |
Trevor Hawkins |
Subject: |
Re: --sendsms fails on T68 |
Date: |
Thu, 03 Jul 2003 15:28:45 -0700 |
Looks like the problem was AT+CSCA not returning the leading "+" on the
T68 even though there is one on the phone itself.
This little hack in gnokii.c fixed up my problem with T68 and 6310/6190
continue to work. Of course I could just spec the SMSC on the cmd line,
but eventually I will be sending messages from inside my own program...
This is from the function sendsms in gnokii.c:
if (!sms.smsc.number[0]) {
data.message_center = calloc(1,
sizeof(gn_sms_message_center));
data.message_center->id = 1;
if (gn_sm_functions(GN_OP_GetSMSCenter, &data, &state)
== GN_ERR_NONE) {
/* normally, just save the SMSC number */
if (data.message_center->smsc.number[0] == '+')
strcpy(sms.smsc.number,
data.message_center->smsc.number);
/* for T68, prepend the plus to fix things... */
else {
sms.smsc.number[0] = '+';
strcpy(sms.smsc.number+1,
data.message_center->smsc.number);
}
sms.smsc.type = data.message_center->smsc.type;
fprintf(stdout, _(" ***** got SMSC = %s
*****.\n"), sms.smsc.number);
}
free(data.message_center);
}
Thanks.
cheers,
Trevor
On Thu, 2003-07-03 at 14:13, Trevor Hawkins wrote:
> Hi,
>
> When running "gnokii --sendsms" on my Sony Ericsson T68 over an rfcomm
> link in AT mode, I get "+CMS ERROR: 500" unknown error every time. The
> attached file contains the full output in debug mode.
>
> When I run --sendsms on my 6310i, also over Bluetooth in AT mode, it
> works perfectly. So, I took the data that gnokii sends to the 6310i (in
> the +CMGS cmd) and manually sent it to the T68, by using the +CMGS
> command in minicom -- and this works perfectly:
>
> -----------------
> at+cgmi
> ERICSSON
> OK
>
> at+cmgs=25
> > 07917150979603F011000B916140565790F90000AA0CF4F29C0E6A97E7F3F0B90C^Z
> +CMGS: 192
> OK
> ----------------
>
> In other words, the T68 will send SMS messages fine, but only if I use
> minicom to manually enter the +CMGS data that gnokii creates for the
> 6310i. The PDU strings gnokii creates are different, at the beginning.
>
> For example, with text "test message" and my number/SMSC, the 6310
> sends:
> 07917150979603F011000B916140565790F90000AA0CF4F29C0E6A97E7F3F0B90C
>
> whereas the T68, with the exact same text/destination/SMSC will send:
> 0691077569390011000B916140565790F90000AA0CF4F29C0E6A97E7F3F0B90C
>
> and they both have the same length (AT+CMGS=25 for both), even though
> the one string is shorter. This was all done with the phones using the
> same SIM card and SMSC. Note that "--savesms" works perfectly fine on
> the T68.
>
> I started going through the gnokii code but I don't really understand
> the SMS data format and didn't see anything obvious. I have a suspicion
> that it is related to the SMSC representation on the T68, as this looked
> to be the only thing grabbed from the phone in atgen.c?
>
>
> Anyways, if anyone can help me get the T68 sending from gnokii that
> would be hugely appreciated. Thanks in advance and thanks for the
> wonderful program.
>
>
>
> Cheers,
> Trevor
>
> ______________________________________________________________________
>
> _______________________________________________
> gnokii-users mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/gnokii-users