Warning: Can't synchronize with repository "(default)" (No changeset 96d22ec3fa3ef6de3ea8dc0d7d398adc9aa071cf in the repository). Look in the Trac log for more information.

Ticket #90 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

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 :

(<framework.subsystems.ogsmd.modems.ti_calypso.channel.MiscChannel? 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/channel.py", line 230, in _readyToSend


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

result = fn( *args, kwargs )

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

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

File "/usr/lib/python2.5/site-packages/serial/serialposix.py", 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

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:

--- ./channel.py.old	2008-08-15 22:37:58.000000000 +0000
+++ /var/lib/python-support/python2.5/framework/subsystems/ogsmd/gsm/channel.py	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
  • 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
  • Milestone set to milestone3

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.

Thanks, Joachim

comment:6 Changed 6 years ago by mickey

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