|
From: | Tristan Drinkwater |
Subject: | RE: Nokia Premicell |
Date: | Fri, 2 Dec 2011 15:07:01 +0000 |
Hi, Not sure if I've done it right, but I've edited atnoki.c so it looks like this... (note the extra blank space before Nokia string) void at_nokia_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) {
/* block writing of phone memory on nokia phones other than */
/* 8210. if you write to the phonebook of a eg 7110 all extended */
/* information will be lost. */
if (strncasecmp("8210", foundmodel, 4))
writephonebook = at_insert_send_function(GN_OP_WritePhonebook, WritePhonebook, state);
/* premicell does not want sms centers in PDU packets (send & */
/* receive) */
if (!strncasecmp("0301", foundmodel, 4))
if (!strncasecmp("0301", foundmodel, 4) || !strncasecmp(" Nokia Cellular Data Adapter for GSM and PCN/DCS 1800 ", foundmodel, 53))
AT_DRVINST(state)->no_smsc = 1;
/* Nokias support just mode 1 */
AT_DRVINST(state)->cnmi_mode = 1;
at_insert_recv_function(GN_OP_AT_IncomingSMS, ReplyIncomingSMS, state); } I've then saved the file, and rerun ./configure --prefix=/usr and the gmake and gmake install I'm still getting the same error however. echo "text" | gnokii --sendsms 07920459xxx --smsc 07786855xxx GNOKII Version 0.6.30 Couldn't read /root/.config/gnokii/config config file. Couldn't read /etc/xdg/gnokii/config config file. Couldn't read /root/.gnokiirc config file. LOG: debug mask is 0x1 Config read from file /etc/gnokiirc. Cannot open logfile /root/.cache/gnokii/gnokii-errors WARNING: cannot open logfile, logs will be directed to stderr phone instance config: model = AT port = /dev/ttyS0 connection = serial initlength = default serial_baudrate = 9600 serial_write_usleep = -1 handshake = software require_dcd = 0 smsc_timeout = 20 rfcomm_channel = 0 sm_retry = 1 Initializing AT capable mobile phone ... Serial device: opening device /dev/ttyS0 Serial device: setting RTS to high and DTR to high Message sent: 0x00 / 0x0004 41 54 5a 0d
| ATZ write: [ATZ<cr>] read : [ATZ<cr><cr><lf>OK<cr><lf>] Message received: 0x00 / 0x000a 02 41 54 5a 0d 0d 0a 4f 4b 0d
| ATZ
OK Received message type 00 Message sent: 0x00 / 0x0005 41 54 45 31 0d
| ATE1 write: [ATE1<cr>] read : [ATE1<cr><cr><lf>OK<cr><lf>] Message received: 0x00 / 0x000b 02 41 54 45 31 0d 0d 0a 4f 4b 0d
| ATE1
OK Received message type 00 Message sent: 0x00 / 0x000a 41 54 2b 43 4d 45 45 3d 31 0d
| AT+CMEE=1 write: [AT+CMEE=1<cr>] read : [AT+CMEE=1<cr><cr><lf>OK<cr><lf>] Message received: 0x00 / 0x0010 02 41 54 2b 43 4d 45 45 3d 31 0d 0d 0a 4f 4b 0d |
AT+CMEE=1 OK Received message type 00 Message sent: 0x06 / 0x0007 41 54 2b 47 4d 4d 0d
| AT+GMM write: [AT+GMM<cr>] read : [AT+GMM<cr><cr><lf>^S^Q^C^C: Nokia Cellular Data Adapter for GSM and PCN/DCS 1800 <cr><lf><cr><lf>OK<cr><lf>] Message received: 0x06 / 0x004c 02 41 54 2b 47 4d 4d 0d 0d 0a 13 11 03 03 3a 20 |
AT+GMM : 4e 6f 6b 69 61 20 43 65 6c 6c 75 6c 61 72 20 44 | Nokia Cellular D 61 74 61 20 41 64 61 70 74 65 72 20 66 6f 72 20 | ata Adapter for 47 53 4d 20 61 6e 64 20 50 43 4e 2f 44 43 53 20 | GSM and PCN/DCS 31 38 30 30 20 0d 0a 0d 0a 4f 4b 0d
| 1800 OK Received message type 06 Message sent: 0x06 / 0x0008 41 54 2b 43 47 4d 49 0d
| AT+CGMI write: [AT+CGMI<cr>] read : [AT+CGMI<cr><cr><lf>Nokia Mobile Phones<cr><lf><cr><lf>OK<cr><lf>] Message received: 0x06 / 0x0025 02 41 54 2b 43 47 4d 49 0d 0d 0a 4e 6f 6b 69 61 |
AT+CGMI Nokia 20 4d 6f 62 69 6c 65 20 50 68 6f 6e 65 73 0d 0a |
Mobile Phones 0d 0a 4f 4b 0d
|
OK Received message type 06 Message sent: 0x63 / 0x0009 41 54 2b 43 53 43 53 3f 0d
| AT+CSCS? write: [AT+CSCS?<cr>] read : [AT+CSCS?<cr><cr><lf>+CSCS: "PCCP437"<cr><lf><cr><lf>OK<cr><lf>] Message received: 0x63 / 0x0023 02 41 54 2b 43 53 43 53 3f 0d 0d 0a 2b 43 53 43 |
AT+CSCS? +CSC 53 3a 20 22 50 43 43 50 34 33 37 22 0d 0a 0d 0a | S: "PCCP437" 4f 4b 0d
| OK Received message type 63 Initialisation completed =====> ENTER gn_sms_send() General Data Coding Default Alphabet
encoded size: 4
rawsms length: 4
rawsms user data length: 4 dcs: 0x00 Length: 0x04 user_data_length: 0x04 ValidityIndicator: 2 user_data: F4329E0E Input is 4 characters long SMS is 4 octets long Number of extended alphabet chars: 0 Sending Message sent: 0x65 / 0x000a 41 54 2b 43 4d 47 46 3d 30 0d
| AT+CMGF=0 write: [AT+CMGF=0<cr>] read : [AT+CMGF=0<cr><cr><lf>OK<cr><lf>] Message received: 0x65 / 0x0010 02 41 54 2b 43 4d 47 46 3d 30 0d 0d 0a 4f 4b 0d |
AT+CMGF=0 OK Received message type 65 PDU mode set Sending initial sequence Message sent: 0x66 / 0x000b 41 54 2b 43 4d 47 53 3d 31 38 0d
| AT+CMGS=18 write: [AT+CMGS=18<cr>] read : [AT+CMGS=18<cr><cr><lf>> ] Message received: 0x66 / 0x000f 01 41 54 2b 43 4d 47 53 3d 31 38 0d 0d 0a 3e
| AT+CMGS=18
> Received message type 66 Got response: No error. Sending frame: 07817087865540F411000B817029409555F20000AA04F4329E0E Message sent: 0x21 / 0x0035 30 37 38 31 37 30 38 37 38 36 35 35 34 30 46 34 | 07817087865540F4 31 31 30 30 30 42 38 31 37 30 32 39 34 30 39 35 | 11000B8170294095 35 35 46 32 30 30 30 30 41 41 30 34 46 34 33 32 | 55F20000AA04F432 39 45 30 45 1a
| 9E0E write: [07817087865540F411000B817029409555F20000AA04F4329E0E^Z] read : [07817087865540F411000B817029409555F20000AA04F4329E0E^Z<cr><lf>ERROR<cr><lf>] Message received: 0x21 / 0x003e 03 30 37 38 31 37 30 38 37 38 36 35 35 34 30 46 |
07817087865540F 34 31 31 30 30 30 42 38 31 37 30 32 39 34 30 39 | 411000B817029409 35 35 35 46 32 30 30 30 30 41 41 30 34 46 34 33 | 555F20000AA04F43 32 39 45 30 45 1a 0d 0a 45 52 52 4f 52 0d
| 29E0E ERROR Received message type 21 SMS Send failed (Unknown error - well better than nothing!!) Serial device: closing device Any other ideas? Thanks for your help so far :) -----Original Message----- Thanks for the reply, My mistake in typing the command I sent, it was the correct output. I'm happy to try the update, how do I install it? Thanks. Tristan -----Original Message----- From: gnokii-users-bounces+address@hidden [mailto:gnokii-users-bounces+address@hidden On Behalf Of Daniele Forsi Sent: 02 December 2011 13:25 To: Discussion forum for gnokii users. Subject: Re: Nokia Premicell 2011/12/2 Tristan Drinkwater: > echo "gnokii test" | gnokii --sendsms +44792045xxxx --smsc +447920xxxxx the debug output doesn't seem to come from that command line because it shows the same number for destination and for smsc, can you try again? I checked using the sms_inbox feature of the fake driver, to test yourself see "Advanced usage" in http://wiki.gnokii.org/index.php/Fake_driver > Invalid remote number length (47) there is code in atnok.c to avoid that but it's checking for a more sane "0301" rather than "Nokia Cellular Data Adapter for GSM and PCN/DCS 1800 " (with a trailing space!), can you try the attached patch? If it doesn't work check if I copied the right string. -- Daniele Forsi ________________________________ Micro Peripherals Limited. Registered Office: Shorten Brook Way, Altham Business Park, Altham, Accrington, Lancs. BB5 5YJ. Tel: (01282) 776776 Fax: (01282) 858790 Micro Peripherals Limited. Registered in England No. 1511931. VAT No. GB 864 4387 91 DISCLAIMER: This e-mail and attachments are confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Micro Peripherals Limited. If you are not the intended recipient, be advised that you have received this Email in error and that any use, dissemination, forwarding, printing, or copying of this Email is strictly prohibited. If this transmission is received in error please notify the sender immediately and delete this message from your E-mail system. All electronic transmissions to and from Micro Peripherals Ltd are recorded and may be monitored. _______________________________________________ gnokii-users mailing list |
[Prev in Thread] | Current Thread | [Next in Thread] |