code: def cmd_serial(self, args):
          '''serial control commands'''
          usage = "Usage: serial <lock|unlock|set|send>"
          if len(args) < 1:
              print(usage)
              return
          if args[0] == "lock":
              self.serial_lock(True)
          elif args[0] == "unlock":
              self.serial_lock(False)
          elif args[0] == "set":
              self.serial_settings.command(args[1:])
          elif args[0] == "send":
              self.serial_send(args[1:])
          else:
              print(usagef cmd_serial(self, args):
          '''serial control commands'''
          usage = "Usage: serial <lock|unlock|set|send>"
          if len(args) < 1:
              print(usage)
              return
          if args[0] == "lock":
              self.serial_lock(True)
          elif args[0] == "unlock":
              self.serial_lock(False)
          elif args[0] == "set":
              self.serial_settings.command(args[1:])
          elif args[0] == "send":
              self.serial_send(args[1:])
          else:
              print(usage)
docs: serial control commands