Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-10 Thread Michal Čihař
Hi

On Sat, 8 Mar 2008 21:57:44 +0100
Philipp Kern [EMAIL PROTECTED] wrote:

 Interesting:
 
 [Connected]
 Entering GSM_GetNextCalendar
 SENDING frametype 0x00/length 0x0B/11
 41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|322|0D AT+MODE=22.
  
 1 AT+MODE=22
 2 OK
 RECEIVED frametype 0x00/length 0x11/17
 41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|322|0D |0D |0A |4FO|4BK|0D 
 AT+MODE=22...OK.
 0A .  
  
 Changing protocol to OBEX
 Setting service 2
 IrMC service requested
 Connecting
 SENDING frametype 0x80/length 0x10/16
 10 |00 |04 |00 |46F|00 |0C |49I|52R|4DM|43C|2D-|53S|59Y|4EN|43 
 F..IRMC-SYNC
 RECEIVED frametype 0xA0/length 0x04/4
 10 |00 |0F |BC    
  
 Connected/disconnected OK
 Maximal size of frame is 4028 0xfbc
 Getting first file part from filesystem
 SENDING frametype 0x83/length 0x2D/45
 01 |00 |2D-|00 |74t|00 |65e|00 |6Cl|00 |65e|00 |63c|00 |6Fo|00 
 ..-.t.e.l.e.c.o.
 6Dm|00 |2F/|00 |63c|00 |61a|00 |6Cl|00 |2F/|00 |69i|00 |6En|00 
 m./.c.a.l./.i.n.
 66f|00 |6Fo|00 |2E.|00 |6Cl|00 |6Fo|00 |67g|00 |00 f.o...l.o.g..  
  
 RECEIVED frametype 0xC3/length 0x00/0
 Security error (0xc3)
 Getting first file part from filesystem
 SENDING frametype 0x83/length 0x23/35
 01 |00 |23#|00 |74t|00 |65e|00 |6Cl|00 |65e|00 |63c|00 |6Fo|00 
 ..#.t.e.l.e.c.o.
 6Dm|00 |2F/|00 |63c|00 |61a|00 |6Cl|00 |2E.|00 |76v|00 |63c|00 
 m./.c.a.l...v.c.
 73s|00 |00 s..
  
 
 
 The phone says not allowed... aborting... in its outer display
 and Gammu hangs afterwards.  I cannot even allow it.

Maybe it does not allow it using bluetooth. However you can also try
blueobex connection, calendar and contacts could work (but SMS messages
won't work).

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com


signature.asc
Description: PGP signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-10 Thread Philipp Kern
On Mon, Mar 10, 2008 at 11:07:47AM +0100, Michal Čihař wrote:
 Maybe it does not allow it using bluetooth. However you can also try
 blueobex connection, calendar and contacts could work (but SMS messages
 won't work).

Just FYI the result with blueobex:

$ gammu textall identify
[Gammu- 1.19.0 built 20:52:18 Mar  8 2008 using GCC 4.2]
[Connection   - blueobex]
[Connection index - 0]
[Model type   - ]
[Device   - 00:15:a8:40:27:b1]
[Runing on- Linux, kernel 2.6.24-1-amd64 (#1 SMP Mon Feb 11 13:47:43 
UTC 2008)]
Device 00:15:A8:40:27:B1 (V635)
   Channel 1 - Dial-up networking Gateway (score=0)
   Channel 3 - Voice Gateway (score=0)
   Channel 7 - Hands-Free voice gateway (score=0)
   Channel 8 - OBEX Object Push (score=2)
   Channel 9 - OBEX file transfer (score=3)
Connecting to RF channel 9
[Module   - auto]
Connected using model 
Folder Browsing service requested
Connecting
SENDING frametype 0x80/length 0x17/23
10 |00 |04 |00 |46F|00 |13 |F9 |EC |7B{|C4 |95 |3C|11 |D2 |98 F{.
4EN|52R|54T|00 |DC |9E |09 NRT 
RECEIVED frametype 0xA0/length 0x1C/28
10 |00 |0F |BC |4AJ|00 |13 |F9 |EC |7B{|C4 |95 |3C|11 |D2 |98 J{.
4EN|52R|54T|00 |DC |9E |09 |CB |00 |00 |00 |00 NRT.
Connected/disconnected OK
Maximal size of frame is 4028 0xfbc
No filename requested, grabbing OBEX capabilities as obex-capability.xml
Getting first file part from filesystem
SENDING frametype 0x83/length 0x19/25
42B|00 |14 |78x|2D-|6Fo|62b|65e|78x|2F/|63c|61a|70p|61a|62b|69 B..x-obex/capabi
6Cl|69i|74t|79y|CB |00 |00 |00 |01 lity.   
[Retrying 1 type 0x83]
SENDING frametype 0x83/length 0x19/25
42B|00 |14 |78x|2D-|6Fo|62b|65e|78x|2F/|63c|61a|70p|61a|62b|69 B..x-obex/capabi
6Cl|69i|74t|79y|CB |00 |00 |00 |01 lity.   
[System error - socket_write, 107, Transport endpoint is not connected]
Disconnecting
SENDING frametype 0x81/length 0x00/0
[System error - socket_write, 107, Transport endpoint is not connected]
Init:GSM_TryGetModel failed with error NOTSUPPORTED[21]: Function not supported 
by phone.
Function not supported by phone.
[Terminating]
Disconnecting
SENDING frametype 0x81/length 0x00/0
[System error - socket_write, 107, Transport endpoint is not connected]

Trying getallcalendar has the same effect.  So thanks for your help,
this is getting out of the scope of the initial bug report, though.  ;-)

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern Debian Developer
: :' :  http://philkern.de   Debian Release Assistant
`. `'   xmpp:[EMAIL PROTECTED]
  `-finger pkern/[EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Philipp Kern
Package: wammu
Version: 0.26-1

Hi Michal,

I just tried wammu again with my (unsupported) Motorola V635.  In
general SMS, Phonebook and Calls work.  But the Phone contacts get
mangled somehow:

  Sat 2008/03/08 17:54:04: Grabbed string from reply: Philipp Kern
  (parsed 14 bytes)
  Sat 2008/03/08 17:54:04: Parsed generic string Philipp Kern
  Sat 2008/03/08 17:54:04: Generic string decoded as U+EFEFU+EFEFﻯ

(with U+EFEF coming from less's output, in the GUI you see tons of
invalid UTF-8 characters)

Note that the generic string is correct, it's just the decoded one that
is messed up.

Out of privacy reasons I don't post the complete debug log.

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern Debian Developer
: :' :  http://philkern.de   Debian Release Assistant
`. `'   xmpp:[EMAIL PROTECTED]
  `-finger pkern/[EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Michal Čihař
Hi

Dne Sat, 8 Mar 2008 17:55:40 +0100
Philipp Kern [EMAIL PROTECTED] napsal(a):

 I just tried wammu again with my (unsupported) Motorola V635.  In
 general SMS, Phonebook and Calls work.  But the Phone contacts get
 mangled somehow:
 
   Sat 2008/03/08 17:54:04: Grabbed string from reply: Philipp Kern
   (parsed 14 bytes)
   Sat 2008/03/08 17:54:04: Parsed generic string Philipp Kern
   Sat 2008/03/08 17:54:04: Generic string decoded as U+EFEFU+EFEFﻯ
 
 (with U+EFEF coming from less's output, in the GUI you see tons of
 invalid UTF-8 characters)
 
 Note that the generic string is correct, it's just the decoded one that
 is messed up.

What Gammu version do you use? If it is not the latest one, can you
upgrade?

 Out of privacy reasons I don't post the complete debug log.

Can you please either send it to me (encrypted if you wish) or at least
initialization, anything related to charset (AT+CSCS commands) and
one reply which is decoded wrong.

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com


signature.asc
Description: PGP signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Philipp Kern
On Sat, Mar 08, 2008 at 06:35:13PM +0100, Michal Čihař wrote:
  Note that the generic string is correct, it's just the decoded one that
  is messed up.
 What Gammu version do you use? If it is not the latest one, can you
 upgrade?

I am using unstable: libgammu3 1.19.0-1, python-gammu 0.25-2.

  Out of privacy reasons I don't post the complete debug log.
 Can you please either send it to me (encrypted if you wish) or at least
 initialization, anything related to charset (AT+CSCS commands) and
 one reply which is decoded wrong.

Will do, in a separate mail.

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern Debian Developer
: :' :  http://philkern.de   Debian Release Assistant
`. `'   xmpp:[EMAIL PROTECTED]
  `-finger pkern/[EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Michal Čihař
Hi

Dne Sat, 8 Mar 2008 20:17:59 +0100
Philipp Kern [EMAIL PROTECTED] napsal(a):

 Hi Michal,
 
 On Sat, Mar 08, 2008 at 08:02:29PM +0100, Michal Čihař wrote:
  It looks like another non standard Motorola thing connected with their
  more modes of modem. Can you please try to recompile Gammu with attached
  patch?
 
 that fixes the problem for me, thanks a lot for your efforts.

Okay, I'll commit it to gammu, will be in next release.

  With it maybe even calendar will work for you, but it is just wild
  guess.
 
 Well, according to the log GSM_GetCalendar fails with NOTSUPPORTED, so
 probably that won't change.

Can you send me log of gammu textall getallcalendar (it should not
contain anything confidental if calendar does not work :-)).

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com


signature.asc
Description: PGP signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Michal Čihař
Hi

Dne Sat, 8 Mar 2008 19:41:09 +0100
Philipp Kern [EMAIL PROTECTED] napsal(a):

 Will do, in a separate mail.

It looks like another non standard Motorola thing connected with their
more modes of modem. Can you please try to recompile Gammu with attached
patch?

With it maybe even calendar will work for you, but it is just wild
guess.

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com
Index: common/phone/at/atgen.c
===
--- common/phone/at/atgen.c	(revision 2126)
+++ common/phone/at/atgen.c	(working copy)
@@ -1608,6 +1608,9 @@
 		} else {
 			cset = Priv-IRACharset;
 		}
+	} else if (Prefer == AT_PREF_CHARSET_RESET) {
+		cset = Priv-Charset;
+		Priv-Charset = 0;
 	} else {
 		return ERR_BUG;
 	}
@@ -1625,7 +1628,8 @@
 
 	/* Should not happen! */
 	if (AT_Charsets[i].charset == 0) {
-		smprintf(s, Could not find string representation for charset!\n);
+		smprintf(s, Could not find string representation for charset (%d)!\n,
+cset);
 		return ERR_BUG;
 	}
 
Index: common/phone/at/atgen.h
===
--- common/phone/at/atgen.h	(revision 2126)
+++ common/phone/at/atgen.h	(working copy)
@@ -165,6 +165,11 @@
 	 * some transmitted characters is not possible to GSM.
 	 */
 	AT_PREF_CHARSET_IRA,
+	/**
+	 * This option just sets again charset in phone. Useful after
+	 * something what resets this information in phone.
+	 */
+	AT_PREF_CHARSET_RESET,
 } GSM_AT_Charset_Preference;
 
 typedef enum {
@@ -398,6 +403,16 @@
  */
 GSM_Error ATGEN_ParseReply(GSM_StateMachine *s, const unsigned char *input, const char *format, ...);
 
+/**
+ * Sets charset in phone according to preference.
+ *
+ * \param s State machine structure.
+ * \param Prefer What charset setting is prefered.
+ *
+ * \return Error code.
+ */
+GSM_Error ATGEN_SetCharset(GSM_StateMachine *s, GSM_AT_Charset_Preference Prefer);
+
 #endif
 /[EMAIL PROTECTED]/
 /[EMAIL PROTECTED]/
Index: common/phone/at/atfunc.h
===
--- common/phone/at/atfunc.h	(revision 2126)
+++ common/phone/at/atfunc.h	(working copy)
@@ -63,8 +63,6 @@
 extern GSM_Error ATGEN_GetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap);
 extern GSM_Error ATGEN_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap);
 
-extern GSM_Error ATGEN_SetCharset(GSM_StateMachine *s, GSM_AT_Charset_Preference Prefer);
-
 #endif
 
 /* How should editor hadle tabs in this file? Add editor commands here.
Index: common/phone/at/motorola.c
===
--- common/phone/at/motorola.c	(revision 2126)
+++ common/phone/at/motorola.c	(working copy)
@@ -135,6 +135,10 @@
 	/* On succes we remember it */
 	if (error == ERR_NONE) {
 		Priv-CurrentMode = cmd-Mode;
+		/* We might need to restore charset as phone resets it */
+		if (cmd-Mode == 2) {
+			error = ATGEN_SetCharset(s, AT_PREF_CHARSET_RESET);
+		}
 	}
 
 	return error;


signature.asc
Description: PGP signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Philipp Kern
Hi Michal,

On Sat, Mar 08, 2008 at 08:02:29PM +0100, Michal Čihař wrote:
 It looks like another non standard Motorola thing connected with their
 more modes of modem. Can you please try to recompile Gammu with attached
 patch?

that fixes the problem for me, thanks a lot for your efforts.

 With it maybe even calendar will work for you, but it is just wild
 guess.

Well, according to the log GSM_GetCalendar fails with NOTSUPPORTED, so
probably that won't change.

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern Debian Developer
: :' :  http://philkern.de   Debian Release Assistant
`. `'   xmpp:[EMAIL PROTECTED]
  `-finger pkern/[EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Michal Čihař
Dne Sat, 8 Mar 2008 20:40:33 +0100
Philipp Kern [EMAIL PROTECTED] napsal(a):

 On Sat, Mar 08, 2008 at 08:28:20PM +0100, Michal Čihař wrote:
   Well, according to the log GSM_GetCalendar fails with NOTSUPPORTED, so
   probably that won't change.
  Can you send me log of gammu textall getallcalendar (it should not
  contain anything confidental if calendar does not work :-)).
 
 Log attached.

Ah now I see. Can you please remove model setting from ~/.gammurc? It
should not be used unless necessary.

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com


signature.asc
Description: PGP signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Philipp Kern
On Sat, Mar 08, 2008 at 08:28:20PM +0100, Michal Čihař wrote:
  Well, according to the log GSM_GetCalendar fails with NOTSUPPORTED, so
  probably that won't change.
 Can you send me log of gammu textall getallcalendar (it should not
 contain anything confidental if calendar does not work :-)).

Log attached.

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern Debian Developer
: :' :  http://philkern.de   Debian Release Assistant
`. `'   xmpp:[EMAIL PROTECTED]
  `-finger pkern/[EMAIL PROTECTED]
[Gammu- 1.19.0 built 19:12:07 Mar  8 2008 using GCC 4.2]
[Connection   - bluerfat]
[Connection index - 0]
[Model type   - at19200]
[Device   - 00:15:a8:40:27:b1]
[Runing on- Linux, kernel 2.6.24 (#1 SMP Mon Jan 28 13:59:09 CET 2008)]
Configured model at19200 is not known, retrying with autodetection!
Using hard coded bluetooth channel 1.
Connecting to RF channel 1
[Module   - auto]
Sending simple AT command to wake up some devices
SENDING frametype 0x00/length 0x03/3
41A|54T|0D AT. 
1 AT
2 OK
RECEIVED frametype 0x00/length 0x09/9
41A|54T|0D |0D |0A |4FO|4BK|0D |0A AT...OK..   
Enabling echo
SENDING frametype 0x00/length 0x05/5
41A|54T|45E|311|0D ATE1.   
1 ATE1
2 OK
RECEIVED frametype 0x00/length 0x0B/11
41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A ATE1...OK.. 
Trying Motorola mode switch
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D AT+MODE=2.  
1 AT+MODE=2
2 OK
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |4FO|4BK|0D |0A AT+MODE=2...OK..
Works, will use it
Enabling CME errors
Already in mode 2
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D AT+CMEE=1.  
1 +MBAN: Copyright 2000-2002 Motorola, Inc.
RECEIVED frametype 0x00/length 0x2B/43
2B+|4DM|42B|41A|4EN|3A:|20 |43C|6Fo|70p|79y|72r|69i|67g|68h|74 +MBAN: Copyright
20 |322|300|300|300|2D-|322|300|300|322|20 |4DM|6Fo|74t|6Fo|72  2000-2002 Motor
6Fo|6Cl|61a|2C,|20 |49I|6En|63c|2E.|0D |0A ola, Inc... 
1 AT+CMEE=1
2 OK
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A AT+CMEE=1...OK..
Already in mode 2
SENDING frametype 0x00/length 0x09/9
41A|54T|2B+|43C|53S|43C|53S|3F?|0D AT+CSCS?.   
1 AT+CSCS?
2 +CSCS: ASCII
3 OK
RECEIVED frametype 0x00/length 0x21/33
41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53 AT+CSCS?...+CSCS
3A:|20 |22|41A|53S|43C|49I|49I|22|0D |0A |0D |0A |4FO|4BK|0D : ASCIIOK.
0A .   
Already in mode 2
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|49I|0D AT+CGMI.
1 AT+CGMI
2 +CGMI: Motorola CE, Copyright 2000
3 OK
RECEIVED frametype 0x00/length 0x36/54
41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |2B+|43C|47G|4DM|49I|3A AT+CGMI...+CGMI:
20 |22|4DM|6Fo|74t|6Fo|72r|6Fo|6Cl|61a|20 |43C|45E|2C,|20 |43  Motorola CE, C
6Fo|70p|79y|72r|69i|67g|68h|74t|20 |322|300|300|300|22|0D |0A opyright 2000..
0D |0A |4FO|4BK|0D |0A ..OK..  
Manufacturer info received
[Manufacturer: Motorola]
Already in mode 2
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D AT+CSCS=?.  
1 AT+CSCS=?
2 +CSCS: (8859-1,ASCII,GSM,UCS2,UTF8)
3 OK
RECEIVED frametype 0x00/length 0x41/65
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43 AT+CSCS=?...+CSC
53S|3A:|20 |28(|22|388|388|355|399|2D-|311|22|2C,|22|41A|53 S: (8859-1,AS
43C|49I|49I|22|2C,|22|47G|53S|4DM|22|2C,|22|55U|43C|53S|32 CII,GSM,UCS2
22|2C,|22|55U|54T|46F|388|22|29)|0D |0A |0D |0A |4FO|4BK|0D ,UTF8)OK.
0A .   
Chosen GSM as normal charset
Chosen UTF8 as unicode charset
Already in mode 2
SENDING frametype 0x00/length 0x0E/14
41A|54T|2B+|43C|53S|43C|53S|3D=|22|47G|53S|4DM|22|0D AT+CSCS=GSM.  
1 AT+CSCS=GSM
2 OK
RECEIVED frametype 0x00/length 0x14/20
41A|54T|2B+|43C|53S|43C|53S|3D=|22|47G|53S|4DM|22|0D |0D |0A AT+CSCS=GSM...
4FO|4BK|0D |0A OK..
Already in mode 2
SENDING frametype 0x00/length 0x09/9
41A|54T|2B+|43C|53S|43C|53S|3F?|0D AT+CSCS?.   
1 AT+CSCS?
2 +CSCS: GSM
3 OK
RECEIVED frametype 0x00/length 0x1F/31
41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53 AT+CSCS?...+CSCS
3A:|20 |22|47G|53S|4DM|22|0D |0A |0D |0A |4FO|4BK|0D |0A : GSMOK.. 
Getting model
Already in mode 2
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|4DM|0D 

Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Philipp Kern
On Sat, Mar 08, 2008 at 08:51:56PM +0100, Michal Čihař wrote:
  On Sat, Mar 08, 2008 at 08:28:20PM +0100, Michal Čihař wrote:
Well, according to the log GSM_GetCalendar fails with NOTSUPPORTED, so
probably that won't change.
   Can you send me log of gammu textall getallcalendar (it should not
   contain anything confidental if calendar does not work :-)).
  Log attached.
 Ah now I see. Can you please remove model setting from ~/.gammurc? It
 should not be used unless necessary.

Another log attached with model in gammurc commented out.  Calendar
still doesn't work, though.  I suspect that Motorola does something
proprietary here, but who knows.  ):

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern Debian Developer
: :' :  http://philkern.de   Debian Release Assistant
`. `'   xmpp:[EMAIL PROTECTED]
  `-finger pkern/[EMAIL PROTECTED]
[Gammu- 1.19.0 built 19:12:07 Mar  8 2008 using GCC 4.2]
[Connection   - bluerfat]
[Connection index - 0]
[Model type   - ]
[Device   - 00:15:a8:40:27:b1]
[Runing on- Linux, kernel 2.6.24 (#1 SMP Mon Jan 28 13:59:09 CET 2008)]
Using hard coded bluetooth channel 1.
Connecting to RF channel 1
[Module   - auto]
Sending simple AT command to wake up some devices
SENDING frametype 0x00/length 0x03/3
41A|54T|0D AT. 
1 AT
2 OK
RECEIVED frametype 0x00/length 0x09/9
41A|54T|0D |0D |0A |4FO|4BK|0D |0A AT...OK..   
Enabling echo
SENDING frametype 0x00/length 0x05/5
41A|54T|45E|311|0D ATE1.   
1 ATE1
2 OK
RECEIVED frametype 0x00/length 0x0B/11
41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A ATE1...OK.. 
Trying Motorola mode switch
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D AT+MODE=2.  
1 AT+MODE=2
2 OK
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |4FO|4BK|0D |0A AT+MODE=2...OK..
Works, will use it
Enabling CME errors
Already in mode 2
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D AT+CMEE=1.  
1 +MBAN: Copyright 2000-2002 Motorola, Inc.
RECEIVED frametype 0x00/length 0x2B/43
2B+|4DM|42B|41A|4EN|3A:|20 |43C|6Fo|70p|79y|72r|69i|67g|68h|74 +MBAN: Copyright
20 |322|300|300|300|2D-|322|300|300|322|20 |4DM|6Fo|74t|6Fo|72  2000-2002 Motor
6Fo|6Cl|61a|2C,|20 |49I|6En|63c|2E.|0D |0A ola, Inc... 
1 AT+CMEE=1
2 OK
RECEIVED frametype 0x00/length 0x10/16
41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A AT+CMEE=1...OK..
Already in mode 2
SENDING frametype 0x00/length 0x09/9
41A|54T|2B+|43C|53S|43C|53S|3F?|0D AT+CSCS?.   
1 AT+CSCS?
2 +CSCS: ASCII
3 OK
RECEIVED frametype 0x00/length 0x21/33
41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53 AT+CSCS?...+CSCS
3A:|20 |22|41A|53S|43C|49I|49I|22|0D |0A |0D |0A |4FO|4BK|0D : ASCIIOK.
0A .   
Already in mode 2
SENDING frametype 0x00/length 0x08/8
41A|54T|2B+|43C|47G|4DM|49I|0D AT+CGMI.
1 AT+CGMI
2 +CGMI: Motorola CE, Copyright 2000
3 OK
RECEIVED frametype 0x00/length 0x36/54
41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |2B+|43C|47G|4DM|49I|3A AT+CGMI...+CGMI:
20 |22|4DM|6Fo|74t|6Fo|72r|6Fo|6Cl|61a|20 |43C|45E|2C,|20 |43  Motorola CE, C
6Fo|70p|79y|72r|69i|67g|68h|74t|20 |322|300|300|300|22|0D |0A opyright 2000..
0D |0A |4FO|4BK|0D |0A ..OK..  
Manufacturer info received
[Manufacturer: Motorola]
Already in mode 2
SENDING frametype 0x00/length 0x0A/10
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D AT+CSCS=?.  
1 AT+CSCS=?
2 +CSCS: (8859-1,ASCII,GSM,UCS2,UTF8)
3 OK
RECEIVED frametype 0x00/length 0x41/65
41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43 AT+CSCS=?...+CSC
53S|3A:|20 |28(|22|388|388|355|399|2D-|311|22|2C,|22|41A|53 S: (8859-1,AS
43C|49I|49I|22|2C,|22|47G|53S|4DM|22|2C,|22|55U|43C|53S|32 CII,GSM,UCS2
22|2C,|22|55U|54T|46F|388|22|29)|0D |0A |0D |0A |4FO|4BK|0D ,UTF8)OK.
0A .   
Chosen GSM as normal charset
Chosen UTF8 as unicode charset
Already in mode 2
SENDING frametype 0x00/length 0x0E/14
41A|54T|2B+|43C|53S|43C|53S|3D=|22|47G|53S|4DM|22|0D AT+CSCS=GSM.  
1 AT+CSCS=GSM
2 OK
RECEIVED frametype 0x00/length 0x14/20
41A|54T|2B+|43C|53S|43C|53S|3D=|22|47G|53S|4DM|22|0D |0D |0A AT+CSCS=GSM...
4FO|4BK|0D |0A OK..
Already in mode 2
SENDING frametype 0x00/length 0x09/9
41A|54T|2B+|43C|53S|43C|53S|3F?|0D AT+CSCS?.   
1 AT+CSCS?
2 +CSCS: GSM
3 OK
RECEIVED frametype 0x00/length 0x1F/31

Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Michal Čihař
Dne Sat, 8 Mar 2008 21:03:41 +0100
Philipp Kern [EMAIL PROTECTED] napsal(a):

 Another log attached with model in gammurc commented out.  Calendar
 still doesn't work, though.  I suspect that Motorola does something
 proprietary here, but who knows.  ):

It is possible, but according to logs Gammu even does not try
anything, so there is still some bug affecting Motorola phones. Can you
please test attached patch?

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com
Index: ChangeLog
===
--- ChangeLog	(revision 2129)
+++ ChangeLog	(working copy)
@@ -20,6 +20,7 @@
 [-] * Fix handling of UTF8 charset with some Motorola phones.
 [-] * Identify Motorola V635.
 [-] * Set again charset in Motorola phones after changing AT mode.
+[-] * Automatically enable OBEX for Motorola phones.
 
 20080305 - 1.19.0
 
Index: common/phone/at/atgen.c
===
--- common/phone/at/atgen.c	(revision 2129)
+++ common/phone/at/atgen.c	(working copy)
@@ -1094,9 +1094,12 @@
 	if (Data-ModelInfo-number[0] == 0)
 		Data-ModelInfo = GetModelData(s, Data-Model, NULL, NULL);
 
-	if (Data-ModelInfo-number[0] != 0) strcpy(Data-Model,Data-ModelInfo-number);
+	if (Data-ModelInfo-number[0] != 0) {
+		smprintf(s, Unknown model, but it should still work\n);
+		strcpy(Data-Model,Data-ModelInfo-number);
+	}
 
-	smprintf(s, [Model: %s]\n, s-Phone.Data.Model);
+	smprintf(s, [Model data: %s]\n, Data-ModelInfo-number);
 
 	return ERR_NONE;
 }
@@ -1408,6 +1411,19 @@
 		/* We don't care about error here */
 		ATGEN_WaitFor(s, AT+CPROT=?\r, 11, 0x00, 3, ID_SetOBEX);
 		error = ERR_NONE;
+	} else {
+		/*
+		 * Enable OBEX for Motorolas, they usually support this and
+		 * AT+OBEX can fallback to pure AT.
+		 */
+		if (!GSM_IsPhoneFeatureAvailable(s-Phone.Data.ModelInfo, F_NO_ATOBEX) 
+!GSM_IsPhoneFeatureAvailable(s-Phone.Data.ModelInfo, F_OBEX)
+) {
+			smprintf(s, Automatically enabling F_OBEX, please report bug if it causes problems\n);
+			GSM_AddPhoneFeature(s-Phone.Data.ModelInfo, F_OBEX);
+			GSM_AddPhoneFeature(s-Phone.Data.ModelInfo, F_MODE22);
+			GSM_AddPhoneFeature(s-Phone.Data.ModelInfo, F_IRMC_LEVEL_2);
+		}
 	}
 
 #ifdef GSM_ENABLE_ATOBEX
@@ -1511,7 +1527,7 @@
 if (AT_Charsets[i].unicode  (strstr(line, AT_Charsets[i].text) != NULL)) {
 	if ((AT_Charsets[i].charset == AT_CHARSET_UTF8 ||
 		AT_Charsets[i].charset == AT_CHARSET_UTF_8) 
-			Priv-Manufacturer != AT_Motorola) {
+			Priv-Manufacturer == AT_Motorola) {
 		IgnoredUTF8 = true;
 		smprintf(s, Skipped %s because it is usually wrongly implemented on Motorola phones\n, AT_Charsets[i].text);
 	} else if ((AT_Charsets[i].charset != AT_CHARSET_UCS2 


signature.asc
Description: PGP signature


Bug#470022: wammu: messing up phonebook entries (invalid UTF-8 characters)

2008-03-08 Thread Philipp Kern
On Sat, Mar 08, 2008 at 09:45:06PM +0100, Michal Čihař wrote:
  Another log attached with model in gammurc commented out.  Calendar
  still doesn't work, though.  I suspect that Motorola does something
  proprietary here, but who knows.  ):
 It is possible, but according to logs Gammu even does not try
 anything, so there is still some bug affecting Motorola phones. Can you
 please test attached patch?

Interesting:

[Connected]
Entering GSM_GetNextCalendar
SENDING frametype 0x00/length 0x0B/11
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|322|0D AT+MODE=22. 
1 AT+MODE=22
2 OK
RECEIVED frametype 0x00/length 0x11/17
41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|322|0D |0D |0A |4FO|4BK|0D AT+MODE=22...OK.
0A .   
Changing protocol to OBEX
Setting service 2
IrMC service requested
Connecting
SENDING frametype 0x80/length 0x10/16
10 |00 |04 |00 |46F|00 |0C |49I|52R|4DM|43C|2D-|53S|59Y|4EN|43 F..IRMC-SYNC
RECEIVED frametype 0xA0/length 0x04/4
10 |00 |0F |BC 
Connected/disconnected OK
Maximal size of frame is 4028 0xfbc
Getting first file part from filesystem
SENDING frametype 0x83/length 0x2D/45
01 |00 |2D-|00 |74t|00 |65e|00 |6Cl|00 |65e|00 |63c|00 |6Fo|00 ..-.t.e.l.e.c.o.
6Dm|00 |2F/|00 |63c|00 |61a|00 |6Cl|00 |2F/|00 |69i|00 |6En|00 m./.c.a.l./.i.n.
66f|00 |6Fo|00 |2E.|00 |6Cl|00 |6Fo|00 |67g|00 |00 f.o...l.o.g..   
RECEIVED frametype 0xC3/length 0x00/0
Security error (0xc3)
Getting first file part from filesystem
SENDING frametype 0x83/length 0x23/35
01 |00 |23#|00 |74t|00 |65e|00 |6Cl|00 |65e|00 |63c|00 |6Fo|00 ..#.t.e.l.e.c.o.
6Dm|00 |2F/|00 |63c|00 |61a|00 |6Cl|00 |2E.|00 |76v|00 |63c|00 m./.c.a.l...v.c.
73s|00 |00 s.. 


The phone says not allowed... aborting... in its outer display
and Gammu hangs afterwards.  I cannot even allow it.

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern Debian Developer
: :' :  http://philkern.de   Debian Release Assistant
`. `'   xmpp:[EMAIL PROTECTED]
  `-finger pkern/[EMAIL PROTECTED]


signature.asc
Description: Digital signature