Attempt to log into the meter over the C12.18 protocol. Returns True on success, False on a failure. This can be
		called by modules in order to login with a username and password configured within the framework instance.

def serial_login(self):
		"""
		Attempt to log into the meter over the C12.18 protocol. Returns True on success, False on a failure. This can be
		called by modules in order to login with a username and password configured within the framework instance.
		"""
		if not self._serial_connected:
			raise termineter.errors.FrameworkRuntimeError('the serial interface is disconnected')

		username = self.options['USERNAME']
		user_id = self.options['USER_ID']
		password = self.options['PASSWORD']
		if self.options['PASSWORD_HEX']:
			hex_regex = re.compile('^([0-9a-fA-F]{2})+$')
			if hex_regex.match(password) is None:
				self.print_error('Invalid characters in password')
				raise termineter.errors.FrameworkConfigurationError('invalid characters in password')
			password = binascii.a2b_hex(password)
		if len(username) > 10:
			self.print_error('Username cannot be longer than 10 characters')
			raise termineter.errors.FrameworkConfigurationError('username cannot be longer than 10 characters')
		if not (0 <= user_id <= 0xffff):
			self.print_error('User id must be between 0 and 0xffff')
			raise termineter.errors.FrameworkConfigurationError('user id must be between 0 and 0xffff')
		if len(password) > 20:
			self.print_error('Password cannot be longer than 20 characters')
			raise termineter.errors.FrameworkConfigurationError('password cannot be longer than 20 characters')

		if not self.serial_connection.login(username, user_id, password):
			return False
		return True