Opened 6 years ago

Closed 6 years ago

#90 closed defect (fixed)

Unicode strings appearing in AT command queue

Reported by: phyce Owned by: mickey
Priority: major Milestone: milestone3
Component: framework/ogsmd Version:
Keywords: VirtualChannel Cc:



When I start the FSO/zhone stack, I enter my pin and the zhone app just hangs. When starting the framework by hand, I got this :

(< object at 0x6162d0> queue is: deque([(u'AT+CPIN="1234"\r\n', <bound method SimSendAuthCode?.responseFromChannel of <ogsmd.modems.abstract.mediator.SimSendAuthCode? object at 0x6af450>>, <bound method SimSendAuthCode?.errorFromChannel of <ogsmd.modems.abstract.mediator.SimSendAuthCode? object at 0x6af450>>, 7)]))
Traceback (most recent call last):

File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/gsm/", line 230, in _readyToSend


File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/gsm/", line 45, in logIt

result = fn( *args, kwargs )

File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/gsm/", line 345, in readyToSend

self.serial.write( self.q.peek()[0] ) # channel data

File "/usr/lib/python2.5/site-packages/serial/", line 330, in write

raise TypeError?('expected str, got %s' % type(data))

TypeError?: expected str, got <type 'unicode'>

This was tested debian ; but it was crashing on FSO milestone 2 before. On FSO I could kill zhone, and on second startup IIRC it showed the network was registered. On debian I'm still figuring out how to make it work.

This is a French Orange FR simcard that works OK with Qtopia and ASU.

Change History (6)

comment:1 Changed 6 years ago by nomeata@…


this is an aggreate confirmation message: Several people who have tried the Debian installation have hit this issue.

(this also means that unless you have more information to add, you do not have to add a note to this bug, to save mickey nerves ;-) )

comment:2 Changed 6 years ago by lock

i have quick fix for that issue

here is path:

--- ./	2008-08-15 22:37:58.000000000 +0000
+++ /var/lib/python-support/python2.5/framework/subsystems/ogsmd/gsm/	2008-08-15 22:39:02.000000000 +0000
@@ -342,7 +342,7 @@
         if VirtualChannel.DEBUGLOG:
             self.debugFile.write( self.q.peek()[0] ) # channel data
-        self.serial.write( self.q.peek()[0] ) # channel data
+        self.serial.write( str(self.q.peek()[0]) ) # channel data
         if self.q.peek()[3]: # channel timeout
             self.watchTimeout = gobject.timeout_add_seconds( self.q.peek()[3], self._handleCommandTimeout )
         return False

comment:3 Changed 6 years ago by r0rschach@…

confirm that the quickfix works

comment:4 Changed 6 years ago by mickey

  • Keywords VirtualChannel added; pin crash removed
  • Milestone set to milestone3
  • Status changed from new to assigned
  • Summary changed from cannot unlock sim ; zhone hangs on PIN input to Unicode strings appearing in AT command queue

Ah, thanks a lot. This is very helpful. I can't apply this in the present form though, since I rather want the actual input fed into the command queue being well formatted in the first place. I'll have to add a safe-guard / conversion in QueuedVirtualChannel?.enqueue().

comment:5 Changed 6 years ago by nomeata@…

Hi mickey,

thanks for looking into that. I can confirm that this happens also for dialing a number, so probably for every action that passes user input from zhone via dbus to the modem (I have not tried sending SMS).

I will include lock’s patch temproarily in the Debian package and revert that once it’s fixed properly upstream.


comment:6 Changed 6 years ago by mickey

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.