Built-in Service Ports

WARNING

These services do not restrict request sources. For security, users should deploy the robot in an internal network environment and configure a firewall.

Lebai robot provides a series of robot control commands. Users can call basic control commands through L Master® and scene editor, or write Lua programs in the code editor to precisely control the execution of these commands. In addition to the graphical interface, we provide several API calling methods. These interfaces have their own pros and cons, and developers can use one or more to program the robot based on their needs.

The L Master® service running on the robot listens to the following ports by default:

  • 80: Provides HTTP Service and WebSocket Service, requests and responses are in JSON format.
  • 5170/5171: Provides two Simple Socket Services, requests and responses are in custom format.
  • 5180Recommended: Provides Lua Socket Service with Lua runtime environment, request format is Lua instructions. If multiple Socket clients send requests to this port, they share one context, and commands will queue for execution in request order.
  • 5181/5182: Provides internal gRPC communication service, not yet open, please use with caution.

After L Master® version 3.1, the following port support was added. Ports ending with '0' are for virtual environment; ports ending with '1' are for real robot environment:

  • 3010/3011Recommended: Provides mutually independent Lua Socket Service. If multiple Socket clients send requests to this port, each client will have its own independent context. Variables are not shared between clients, and communication can be done via semaphores.
  • 3020/3021Recommended: Provides JSON-RPC Service interface based on HTTP.
  • 3030/3031Strongly Recommended: Provides JSON-RPC Service interface based on WebSocket.
  • 3050/3051: Provides Modbus TCP Slave Service.

In the examples in this documentation, the robot's IP address is assumed to be 10.20.17.1 (this is also the default address when the robot is in hotspot mode). In applications, please replace with the actual IP address. Lebai robot provides mDNS-based device discovery service, and users can also assign a fixed IP to the robot in the router.