<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_set_hub_connection(self, args):
 """Set Hub connection parameters. Usage: set_hub_connection username password host [port] Arguments: username: Hub username password: Hub password host: host name or IP address port: IP port [default 25105] """

        params = args.split()
        username = None
        password = None
        host = None
        port = None

        try:
            username = params[0]
            password = params[1]
            host = params[2]
            port = params[3]
        except IndexError:
            pass

        if username and password and host:
            if not port:
                port = 25105
            self.tools.username = username
            self.tools.password = password
            self.tools.host = host
            self.tools.port = port
        else:
            _LOGGING.error('username password host are required')
            self.do_help('set_hub_connection')