@@ -400,46 +400,16 @@ def checkURC(self, hide=False):
400400
401401 # EFFECTS: Handles URC related AT command responses.
402402 def handleURC (self , urc ):
403- self .logger .debug ("URC! %s" , urc )
403+ self .logger .debug ("URC! %s" , urc )
404404 self .logger .debug ("handleURC state: %d" , self .urc_state )
405405
406- next_urc_state = self .urc_state
407-
408406 if urc .startswith ("+CMTI: " ):
409407 self ._handle_sms_receive_urc (urc )
410- elif urc .startswith ('+UULOC: ' ):
411- self ._handle_location_urc (urc )
412- elif urc .startswith ('+UUSORD: ' ):
413-
414- # Strip UUSORD socket identifier + payload length from the URC event.
415- # Example: {+UUSORD: 0,2} -> 0 and 2
416- response_list = urc .lstrip ('+UUSORD: ' ).split (',' )
417- socket_identifier = int (response_list [0 ])
418- payload_length = int (response_list [- 1 ])
419-
420- if self .urc_state == Modem .SOCKET_RECEIVE_READ :
421- self ._read_and_append_message_receive_buffer (socket_identifier , payload_length )
422- else :
423- self .socket_identifier = socket_identifier
424- self .last_read_payload_length = payload_length
425- next_urc_state = Modem .SOCKET_SEND_READ
426- elif urc .startswith ('+UUSOLI: ' ):
427- self ._handle_listen_urc (urc )
428- self .last_read_payload_length = 0
429- next_urc_state = Modem .SOCKET_RECEIVE_READ
430- elif urc .startswith ('+UUPSDD: ' ):
431- self .event .broadcast ('cellular.forced_disconnect' )
432- elif urc .startswith ('+UUSOCL: ' ):
433- next_urc_state = Modem .SOCKET_CLOSED
434408 else :
435409 self .logger .debug ("URC was not handled. \' %s\' " , urc )
436410
437- self .urc_state = next_urc_state
438-
439411
440412 # URC handlers
441-
442-
443413 def _handle_sms_receive_urc (self , urc ):
444414 self .event .broadcast ('sms.received' )
445415
0 commit comments