esp8266.py
def connectToAccessPoint(self, ssid_str, password_str):
    '''Call is ignored if already connected to the given access point. If
    already connected to another access point, the old access point is
    automatically disconnected first.'''
    current_ssid_str = self.getConnectedAccessPoint()
    if current_ssid_str == ssid_str:
      logging.info('Already connected to access point: {}'.format(ssid_str))
      return
    if current_ssid_str != '<NOT CONNECTED>':  
      self.disconnectFromAccessPoint()
    self.setDeviceMode(1)
    self.sendCmd('AT+CWJAP="' + ssid_str + '","' + password_str + '"')
Call is ignored if already connected to the given access point. If
    already connected to another access point, the old access point is
    automatically disconnected first.
Call is ignored if already connected to the given access point. If
already connected to another access point, the old access point is
automatically disconnected first.
Call is ignored if already connected to the given access point . If already connected to another access point the old access point is automatically disconnected first .
def connectToAccessPoint(self, ssid_str, password_str):
    current_ssid_str = self.getConnectedAccessPoint()
    if current_ssid_str == ssid_str:
      logging.info('Already connected to access point: {}'.format(ssid_str))
      return
    if current_ssid_str != '<NOT CONNECTED>':  
      self.disconnectFromAccessPoint()
    self.setDeviceMode(1)
    self.sendCmd('AT+CWJAP="' + ssid_str + '","' + password_str + '"')
def connectToAccessPoint ( self , ssid_str , password_str ) : current_ssid_str = self . getConnectedAccessPoint ( ) if current_ssid_str == ssid_str : logging . info ( 'Already connected to access point: {}' . format ( ssid_str ) ) return if current_ssid_str != '<NOT CONNECTED>' : self . disconnectFromAccessPoint ( ) self . setDeviceMode ( 1 ) self . sendCmd ( 'AT+CWJAP="' + ssid_str + '","' + password_str + '"' )
Call is ignored if already connected to the given access point.
Call is ignored if already connected to the given access point .
'''Call is ignored if already connected to the given access point. If
    already connected to another access point, the old access point is
    automatically disconnected first.'''
self
ssid_str
password_str