@@ -393,46 +393,16 @@ def checkURC(self, hide=False):
393393
394394 # EFFECTS: Handles URC related AT command responses.
395395 def handleURC (self , urc ):
396- self .logger .debug ("URC! %s" , urc )
396+ self .logger .debug ("URC! %s" , urc )
397397 self .logger .debug ("handleURC state: %d" , self .urc_state )
398398
399- next_urc_state = self .urc_state
400-
401399 if urc .startswith ("+CMTI: " ):
402400 self ._handle_sms_receive_urc (urc )
403- elif urc .startswith ('+UULOC: ' ):
404- self ._handle_location_urc (urc )
405- elif urc .startswith ('+UUSORD: ' ):
406-
407- # Strip UUSORD socket identifier + payload length from the URC event.
408- # Example: {+UUSORD: 0,2} -> 0 and 2
409- response_list = urc .lstrip ('+UUSORD: ' ).split (',' )
410- socket_identifier = int (response_list [0 ])
411- payload_length = int (response_list [- 1 ])
412-
413- if self .urc_state == Modem .SOCKET_RECEIVE_READ :
414- self ._read_and_append_message_receive_buffer (socket_identifier , payload_length )
415- else :
416- self .socket_identifier = socket_identifier
417- self .last_read_payload_length = payload_length
418- next_urc_state = Modem .SOCKET_SEND_READ
419- elif urc .startswith ('+UUSOLI: ' ):
420- self ._handle_listen_urc (urc )
421- self .last_read_payload_length = 0
422- next_urc_state = Modem .SOCKET_RECEIVE_READ
423- elif urc .startswith ('+UUPSDD: ' ):
424- self .event .broadcast ('cellular.forced_disconnect' )
425- elif urc .startswith ('+UUSOCL: ' ):
426- next_urc_state = Modem .SOCKET_CLOSED
427401 else :
428402 self .logger .debug ("URC was not handled. \' %s\' " , urc )
429403
430- self .urc_state = next_urc_state
431-
432404
433405 # URC handlers
434-
435-
436406 def _handle_sms_receive_urc (self , urc ):
437407 self .event .broadcast ('sms.received' )
438408
0 commit comments