Raphaël Droz | 10 May 2013 00:04
Picon

[patch] writephonebook and find-free

Attached is an enhanced heuristic for find-free.
It relies on using the -f flag twice with --writephonebook as this may
not be needed for every phone.

The goal is to avoid the find-free loop to start from 1 for every entry of
a vcf file, even if the first free location is 72. Using the last
successful location may often be a best bet.

regards
_______________________________________________
gnokii-users mailing list
gnokii-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/gnokii-users
Raphaël Droz | 9 May 2013 23:12
Picon

1249e9a and memoryoffset

Hi,

in 1249e9ae, the location used by AT+CPBW=%d (in AT_WritePhonebook())
changed from:
> data->phonebook_entry->location+drvinst->memoryoffset
to
> data->phonebook_entry->location

I don't know the AT proto enough but from my personal use (Sagem MyX-2)
it caused a regression.

Here is the common part:
> > AT+CPBS="ME"
> > AT+CPBR=?
> < +CPBR: (750-999),20,16

> > AT+CPBR=750
> < +CME ERROR: 22	# indeed this is strange, anyway...

Here is what used to happen before 1249e9ae:
> > AT+CPBW=750,"",129,"blahfoo..."
> < OK

And here is what happens now:
> > AT+CPBW=1,"",129,"blahfoo..."
> < +CME ERROR: 21

What could I do against that ?

thanks
(Continue reading)

Stéphane Lonkeng | 6 May 2013 16:41
Picon
Favicon

Nk 3310; monitoring battery, detec incoming call, make datacall

Hi,
I am working with Nokia 3310 with FBUS protocol (nk6110.txt). My objective is to command the phone with a PIC 18f452 of Microchip. I have to implement some functions. My first problem is that the phone does not send any frame when there is an incoming call. the other problem is I need to get the battery level value; I have read the  file nk6110.txt (0x04 type) but when I try to send the frame, the phone just reply the same ack frame which (I think) means that the frame I send is not right. I have also try to read the file nk6110.c but it is very hard for me because I'm just starting in C/C++ programming.
Frame that I send:
1E 00 0C 04 00 06 00 07 00 01 01 45 13 41
I would like to know if it is possible to make datacall using Nokia 3310
Help
Regards

_______________________________________________
gnokii-users mailing list
gnokii-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/gnokii-users
Daniele Forsi | 24 Apr 2013 09:45
Picon

New maintainer wanted for Perl module GSM::Gnokii

Hello list,

we are searching for a new maintainer of GSM::Gnokii, a module written
by H.Merijn Brand to interface Perl with libgnokii with which you can
replicate in your perl program most of the functionality available in
gnokii and customize it to suit your needs.

This module is working fine with the git version of libgnokii and the
main task of the new maintainer will be to make sure that it continues
working with future versions. He or she will decide how to develop the
module further. The code can be hosted in the gnokii-extras git
repository or where the maintainer will decide.

For any question just ask.

[1] http://search.cpan.org/~hmbrand/GSM-Gnokii-0.08/lib/GSM/Gnokii.pm
--
Daniele Forsi
Stefan Fiedler | 19 Apr 2013 13:21
Picon

[PATCH] fix timeout when transfering large SMS folders

Hello everyone,

here is a small patch I wrote which fixes the hard-coded timeouts when 
copying SMS folders with many files. With the patch applied, gnokii will 
only time-out if there is no activity for a predefined period, but will 
update a keepalive timer whenever data is sent or received.

The patch applies to the latest revision in the git repository. I tested 
it with a 2610 mobile phone and a third-party CA-45 USB cable (Daipu 
brand). If you have any questions or comments please feel free to write 
me on this mailing list to which I am currently subscribed.

With best regards,
Stefan Fiedler

diff -dur gnokii.orig/common/gsm-statemachine.c gnokii/common/gsm-statemachine.c
--- gnokii.orig/common/gsm-statemachine.c	2013-04-07 16:31:27.929885641 +0200
+++ gnokii/common/gsm-statemachine.c	2013-04-08 04:29:48.405936104 +0200
 <at>  <at>  -27,6 +27,9  <at>  <at> 
 	state->waiting_for_number = 0;
 	state->received_number = 0;

+	state->keepalive.tv_sec = 0;
+	state->keepalive.tv_usec = 0;
+	
 	return GN_ERR_NONE;
 }

 <at>  <at>  -42,12 +45,29  <at>  <at> 
 		state->last_msg = message;
 		state->current_state = GN_SM_MessageSent;

-		/* FIXME - clear KeepAlive timer */
+		state->keepalive.tv_sec = 0;
+		state->keepalive.tv_usec = 0;
+
 		return state->link.send_message(messagesize, messagetype, message, state);
 	}
 	else return GN_ERR_NOTREADY;
 }

+void sm_keepalive(struct gn_statemachine *state)
+{
+	gettimeofday(&(state->keepalive), NULL);
+}
+
+int sm_is_alive(struct timeval *timeout, struct gn_statemachine *state)
+{
+	struct timeval t, now;
+
+	timeradd(&(state->keepalive), timeout, &t);
+	gettimeofday(&now, NULL);
+	
+	return timercmp(&t, &now, >);
+}  
+
 GNOKII_API gn_state gn_sm_loop(int timeout, struct gn_statemachine *state)
 {
 	struct timeval loop_timeout;
 <at>  <at>  -67,7 +87,8  <at>  <at> 
 		state->link.loop(&loop_timeout, state);
 	}

-	/* FIXME - add calling a KeepAlive function here */
+	sm_keepalive(state);
+
 	return state->current_state;
 }

 <at>  <at>  -80,6 +101,9  <at>  <at> 
 		state->received_number = 0;
 		if (state->link.reset)
 			state->link.reset(state);
+
+		state->keepalive.tv_sec = 0;
+		state->keepalive.tv_usec = 0;
 	}
 }

 <at>  <at>  -234,7 +258,8  <at>  <at> 
 		do {
 			s = gn_sm_loop(1, state);  /* Timeout=100ms */
 			gettimeofday(&now, NULL);
-		} while (timercmp(&next, &now, >) && (s == GN_SM_MessageSent));
+		} while ((timercmp(&next, &now, >) || sm_is_alive(&timeout, state))
+			&& (s == GN_SM_MessageSent));
 		if (s == GN_SM_WaitingForResponse || s == GN_SM_ResponseReceived) break;

 		if (state->config.sm_retry) {
 <at>  <at>  -257,7 +282,8  <at>  <at> 
 	do {
 		s = gn_sm_loop(1, state);  /* Timeout=100ms */
 		gettimeofday(&now, NULL);
-	} while (timercmp(&next, &now, >) && (s != GN_SM_ResponseReceived));
+	} while ((timercmp(&next, &now, >) || sm_is_alive(&timeout, state))
+		&& (s != GN_SM_ResponseReceived));

 	if (s == GN_SM_ResponseReceived)
 		return sm_error_get(waitfor, state);
diff -dur gnokii.orig/include/gnokii/statemachine.h gnokii/include/gnokii/statemachine.h
--- gnokii.orig/include/gnokii/statemachine.h	2013-04-07 16:31:27.957885764 +0200
+++ gnokii/include/gnokii/statemachine.h	2013-04-08 04:26:38.220993018 +0200
 <at>  <at>  -79,6 +79,9  <at>  <at> 
 	union {
 		gn_phonebook_entry pb_entry;
 	} u;
+	
+	/* Store time of the last call to sm_keepalive() */
+	struct timeval keepalive;
 };

 GNOKII_API gn_state gn_sm_loop(int timeout, struct gn_statemachine *state);
_______________________________________________
gnokii-users mailing list
gnokii-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/gnokii-users
Kris De Rocker | 18 Apr 2013 15:12
Favicon

Gnokii + Vodafone K3565-rev2 USB stick

Dear,

Some days ago i've received my Raspberry PI.  Because i want to use it 
as a SMS gateway (receive + send SMS) i've putted a Vodafone K3565-rev2 
USB stick on it and installed it using the tutorial on 
http://rolfblijleven.blogspot.be/2013/01/raspberry-pi-as-sms-gateway.html.

The status right now is that i can send SMS'es usign the command line, 
but i can't receive any SMS.
The tutorial said that SMS messages are stored in /tmp/sms but that 
doesn't excist...
Is there sombody here that could help me fixing this issue?

Best regards,
Kris De Rocker
Raphaël Droz | 15 Apr 2013 15:36
Picon

issue with char_mbtowc/iconv

Trying to writephonebook with a Sagem myX-2, which correctly initialize
CSCS to UCS-2, I'm getting an issue with storing accentuated characters.
> char_mbtowc/iconv: invalid argument.

Here is the vcard:
> BEGIN:VCARD
> FN:Régine
> TEL;TYPE=PREF,VOICE:0000
> END:VCARD
Notice the "é".

Here is a transaction log:
# empty location
>  +CPBR=771
>  +CME ERROR: 22
# let's convert
> char_mbtowc/iconv: Argument invalide
# let's store converted string
> AT+CPBW=771,"0030003000300030",129,"0052"

0052 is only the first "R" as the conversion failed after the first char.

Then I added:
> fprintf(stderr, "==== , %s , %s, %d, %d [%s]\n", pin, pout, inlen, outlen, gn_char_get_encoding());
in char_mbtowc(), just before iconv_open().

Here is the output:

# let's convert
# ... the number
> ==== , 0000 , , 1, 4 [UTF-8]
> ==== , 000 , 0, 1, 4 [UTF-8]
> ==== , 00 , 0, 1, 4 [UTF-8]
> ==== , 0 , 0, 1, 4 [UTF-8]
# ... the name
> ==== , Régine , <uninitialized garbage *char>, 1, 4 [UTF-8]
> ==== , égine , R, 1, 4 [UTF-8]
> char_mbtowc/iconv: invalid argument
# let's store converted string
> AT+CPBW=771,"0030003000300030",129,"0052"

From a first look, inlen and outlen could be considered as correct
because using regular ascii character instead of "é" would output the
same value.

Anyway I've the feeling "inlen" could be wrong when it comes to
converting a wide input character. In UTF-8 "é" is 2 bytes large (C3A9)
and 1 byte large in UCS-2 (E9), like it is using iso-8859-1.

What's the way to solve this correctly ?

thanks

Additional info:
* AT+CSCS=?
> +CSCS: ("IRA","GSM","PCCP437","8859-1","UCS2","HEX")
# but this transaction seems omitted in latest git, isn't ?

* AT+CSCS="UCS2"
> AT+CSCS="UCS2" OK

$ printf Régine|iconv -f utf8 -t UCS-2|xxd -p
5200 e900 6700 6900 6e00 6500
Anna Skorokhodova (Yandex | 5 Apr 2013 22:56
Picon
Favicon

change SenderID to alphanumeric for outgoing msgs

Dear List,

is it possible to change SenderID for outgoing messages in gnokii?
to have sender not as number but alphanumeric word.

I do not want to get replies to this phone (nobody would read them) so 
I'd like to set it as company name.

Thanks in advance.

--

-- 
Anna
Pedro Aguilar | 23 Mar 2013 11:02
Picon

[3/3]: Patch smsd/sqlite: Several bug fixes / optimizations

Hi,

This patch fixes a corrupted date/time insert in table outbox.
Without this patch the inserted date had this format:
13-03-23 10:26:09
instead of
2013-03-23 10:26:09

Given that the 'insertdate' column in the same table outbox and the date/time columns in the inbox tables use the format YYYY-MM-DD hh:mm:ss, I assumed that the format YY-MM-DD hh:mm:ss was not valid.

Regards,
--
Pedro Aguilar
http://www.paguilar.org/blog

Attachment (03_sqlite_corrupted_insert_date.patch): application/octet-stream, 2734 bytes
_______________________________________________
gnokii-users mailing list
gnokii-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/gnokii-users
Pedro Aguilar | 23 Mar 2013 10:52
Picon

[1/2]: Patch smsd/sqlite: Several bug fixes / optimizations

Hi,

This patch skips the sleep(1) when there was no error in WriteSMS().

Regards,
--
Pedro Aguilar
http://www.paguilar.org/blog

Attachment (02_skip_sleep_writesms_ok.patch): application/octet-stream, 394 bytes
_______________________________________________
gnokii-users mailing list
gnokii-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/gnokii-users
Pedro Aguilar | 23 Mar 2013 10:49
Picon

[1/3]: Patch smsd/sqlite: Several bug fixes / optimizations

Hi,

This very simple patch prints the correct error message when a sqlite3_prepare_v2() fails.

Regards,
--
Pedro Aguilar
http://www.paguilar.org/blog

Attachment (01_sms_sqlite_msg_err.patch): application/octet-stream, 466 bytes
_______________________________________________
gnokii-users mailing list
gnokii-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/gnokii-users

Gmane