Package: frameworkd
Version: 0.2.0-git20080805-1
Severity: normal

Steps to reproduce:
1) add 

log_level = DEBUG

to [ogsmd] in /etc/frameworkd.conf

2) start frameworkd
3) start cli-framework and type

gsmsim.SendAuthCode("PIN_XXXX")

Expected results:
3) frameworkd sends PIN code to GSM chip

Actual results:
3) frameworkd prints the following exception:

ogsmd    DEBUG    |...|...|...|...|...|...> SimSendAuthCode.__init__: ENTER 
(<framework.subsystems.ogsmd.objects.Device at /org/freesmartphone/GSM/Device 
at 0x530390>, <function <lambda> at 0x6278b0>, <function <lambda> at 
0x6276b0>),{'code': dbus.String(u'PIN_XXXX')}
ogsmd    DEBUG    |...|...|...|...|...|...> SimSendAuthCode.__init__: LEAVE
ogsmd    DEBUG    
(<framework.subsystems.ogsmd.modems.ti_calypso.channel.MiscChannel object at 
0x5d78d0>: last communication with modem was 32 seconds ago. Sending EOF to 
wakeup)
ogsmd    DEBUG    |...|...|...|...> MiscChannel.readyToSend: ENTER (),{}
(<framework.subsystems.ogsmd.modems.ti_calypso.channel.MiscChannel object at 
0x5d78d0> queue is: deque([(u'AT+CPIN="PIN_XXXX"\r\n', <bound method 
SimSendAuthCode.responseFromChannel of 
<ogsmd.modems.abstract.mediator.SimSendAuthCode object at 0x5d78f0>>, <bound 
method SimSendAuthCode.errorFromChannel of 
<ogsmd.modems.abstract.mediator.SimSendAuthCode object at 0x5d78f0>>, 7)]))
ogsmd    DEBUG    
(<framework.subsystems.ogsmd.modems.ti_calypso.channel.MiscChannel object at 
0x5d78d0>: sending 20 bytes to /dev/pts/0: u'AT+CPIN="PIN_XXXX"\r\n')
Traceback (most recent call last):
  File 
"/var/lib/python-support/python2.5/framework/subsystems/ogsmd/gsm/channel.py", 
line 230, in _readyToSend
    self.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'>
frameworkd.controller DEBUG    alive and kicking

More info:
1) The problematic data is

u'AT+CPIN=PIN_XXXX"\r\n'

2) Adding .encode("ascii") to channel.py seems to work around the
issue and allows me to register to network:

>>> gsmsim.GetAuthStatus()
dbus.String(u'READY')



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to