Built-in Service Ports
WARNING
These services do not restrict request sources. For security reasons, users should deploy robots in an intranet environment and configure firewalls.
LEBAI Robots 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 these commands. Besides the graphical interface, we provide several API calling methods. These interfaces each have their advantages and disadvantages, and developers can use one or more to program the robot according to their needs.
The L Master® service running on the robot listens to the following ports by default:
80
: Provides HTTP Service and WebSocket Service, with requests and responses in JSON format.5170
/5171
: Provides two Simple Socket Services, with requests and responses in custom format.5180
Recommended: 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 run in queue according to request order.5181
/5182
: Provides internal gRPC communication services, not open for now, users should use with caution.
After L Master® version 3.1, the following ports are added, where ports ending with '0' are for simulation environment; ports ending with '1' are for real robot environment:
3010
/3011
Recommended: Provides independent Lua Socket Services. If multiple Socket clients send requests to this port, each client will generate its own independent context. Variables are not shared between clients, communication can be done through semaphores.3020
/3021
Recommended: Provides HTTP-based JSON-RPC Service interface.3030
/3031
Highly Recommended: Provides WebSocket-based JSON-RPC Service interface.3050
/3051
: Provides Modbus TCP Slave Service.
In the examples of this documentation, we assume the robot's IP address is 10.20.17.1
(which is also the default address when the robot is in hotspot mode). In applications, please replace it with the actual IP address. LEBAI Robots provides mDNS-based device discovery service, users can also assign fixed IP to the robot in the router.