15.1. Get SSH public key
Prototype | GetSSHKeygen() |
description | Get SSH public key |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
15.2. Issue the SCP command
New in version python: SDK-v2.1.3
Prototype | SetSSHScpCmd(mode, sshname, sship, usr_file_url, robot_file_url) |
Description | Issue the SCP command |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.3. Calculate the MD5 value of a file in a specified path
Prototype | ComputeFileMD5(file_path) |
Description | Calculates the MD5 value of a file in the specified path. |
Mandatory parameter |
|
Default parameters | NULL |
Return Value |
|
15.4. Robot SSH, MD5 instruction code example
from fairino import Robot
import time
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
file_path = "/fruser/airlab.lua"
md5 = ""
emerg_state = 0
si0_state = 0
si1_state = 0
sdk_com_state = 0
ssh_keygen = ""
retval,ssh_keygen = robot.GetSSHKeygen()
print(f"GetSSHKeygen retval is: {retval}")
print(f"ssh key is: {ssh_keygen}")
ssh_name = "fr"
ssh_ip = "192.168.58.45"
ssh_route = "/home/fr"
ssh_robot_url = "/root/robot/dhpara.config"
retval = robot.SetSSHScpCmd(1, ssh_name, ssh_ip, ssh_route, ssh_robot_url)
print(f"SetSSHScpCmd retval is: {retval}")
print(f"robot url is: {ssh_robot_url}")
error, md5 = robot.ComputeFileMD5(file_path)
print(f"md5 is: {md5}")
robot.CloseRPC()
15.5. Setting the Robot 20004 Port Feedback Cycle
New in version python: SDK-v2.0.5
Prototype | SetRobotRealtimeStateSamplePeriod(period) |
Description | Setting the robot 20004 port feedback cycle |
Mandatory parameter |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.6. Get robot 20004 port feedback cycle
New in version python: SDK-v2.0.5
Prototype | GetRobotRealtimeStateSamplePeriod() |
Description | Get robot 20004 port feedback cycle |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
15.7. Robot 20004 port state feedback cycle configuration code example
from fairino import Robot
import time
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
robot.SetRobotRealtimeStateSamplePeriod(10)
error,getPeriod = robot.GetRobotRealtimeStateSamplePeriod()
print(f"period is {getPeriod}")
time.sleep(1)
robot.CloseRPC()
15.8. Robot software upgrade
New in version python: SDK-v2.0.5
Prototype | SoftwareUpgrade(filePath, block) |
Description | Robot Software Upgrade |
Required parameters |
|
Default parameters | NULL |
Return Value |
|
15.9. Get robot software upgrade status
New in version python: SDK-v2.0.5
Prototype | GetSoftwareUpgradeState() |
Description | Get robot software upgrade status |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
15.10. Robot software upgrade code example
from fairino import Robot
import time
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
error = robot.SoftwareUpgrade("D://zUP/QNX382/software.tar.gz", False)
print(f"SoftwareUpgrade error is {error}")
while True:
curState = robot.GetSoftwareUpgradeState()
print(f"upgrade state is {curState}")
time.sleep(3)
robot.CloseRPC()
15.11. Download Point Table Database
New in version python: SDK-v2.0.1
Prototype | PointTableDownLoad(point_table_name, save_file_path) |
Description | Download Points Table Database |
Required Parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.12. Upload point table database
New in version python: SDK-v2.0.1
Prototype | PointTableUpLoad(point_table_file_path) |
Description | Upload point table database |
Required Parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.13. Point table update lua file
New in version python: SDK-v2.0.1
prototype | PointTableUpdateLua(point_table_name, lua_file_name) |
Description | Point table update lua file |
Required Parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.14. Robot point table operation code example
from fairino import Robot
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
save_path = "D://zDOWN/"
point_table_name = "point_table_FR5.db"
rtn = robot.PointTableDownLoad(point_table_name, save_path)
print(f"download : {point_table_name} fail: {rtn}")
upload_path = "D://zDOWN/point_table_FR5.db"
rtn = robot.PointTableUpLoad(upload_path)
print(f"retval is: {rtn}")
point_tablename = "point_table_FR5.db"
lua_name = "test0610.lua"
rtn,error = robot.PointTableUpdateLua(point_tablename, lua_name)
print(f"retval is: {rtn}")
robot.CloseRPC()
15.15. Controller log download
New in version python: SDK-v2.1.1
Prototype | RbLogDownload(savePath) |
Description | Controller log download |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.16. Download all data sources
New in version python: SDK-v2.1.1
Prototype | AllDataSourceDownload(savePath) |
Description | Download all data sources |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.17. Data backup package download
New in version python: SDK-v2.1.1
Prototype | DataPackageDownload(savePath) |
Description | Data backup package download |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.18. Download the controller data code example
from fairino import Robot
import time
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
rtn = robot.RbLogDownload("D://zDOWN/")
print(f"RbLogDownload rtn is {rtn}")
rtn = robot.AllDataSourceDownload("D://zDOWN/")
print(f"AllDataSourceDownload rtn is {rtn}")
rtn = robot.DataPackageDownload("D://zDOWN/")
print(f"DataPackageDownload rtn is {rtn}")
robot.CloseRPC()
15.19. Set up encoder upgrade
New in version python: SDK-v2.1.4
Prototype | SetEncoderUpgrade(path) |
Description | Set up encoder upgrade |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.20. Set up joint firmware upgrade
New in version python: SDK-v2.1.4
Prototype | SetJointFirmwareUpgrade(type, path) |
Description | Set up joint firmware upgrade |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.21. Set up control box firmware upgrade
New in version python: SDK-v2.1.4
Prototype | SetCtrlFirmwareUpgrade(type, path) |
Description | Set up control box firmware upgrade |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.22. Set up the end firmware upgrade
New in version python: SDK-v2.1.4
Prototype | SetEndFirmwareUpgrade(type, path) |
Description | Set up the end firmware upgrade |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.23. Joint full parameter profile upgrade
New in version python: SDK-v2.1.4
Prototype | JointAllParamUpgrade(path) |
Description | Joint full parameter profile upgrade |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.24. Example of robot slave firmware upgrade code
from fairino import Robot
import time
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
robot.RobotEnable(0)
time.sleep(0.2)
rtn = robot.JointAllParamUpgrade("D://zUP/MT/joint0603/jointallparameters.db")
print(f"robot JointAllParamUpgrade rtn is {rtn}")
rtn = robot.SetCtrlFirmwareUpgrade(2, "D://zUP/MT/FAIR_Cobot_Cbd_Asix_V2.0.bin")
print(f"robot SetCtrlFirmwareUpgrade rtn is {rtn}")
rtn = robot.SetEndFirmwareUpgrade(2, "D://zUP/MT/FAIR_Cobot_Axle_Asix_V2.4.bin")
print(f"robot SetEndFirmwareUpgrade rtn is {rtn}")
robot.SetSysServoBootMode()
time.sleep(0.2)
rtn = robot.SetCtrlFirmwareUpgrade(1, "D://zUP/MT/FR_CTRL_PRIMCU_FV201412_MAIN_U4_T01_20250630(MT).bin")
print(f"robot SetCtrlFirmwareUpgrade rtn is {rtn}")
rtn = robot.SetEndFirmwareUpgrade(1, "D://zUP/MT/FR_END_FV2010010_MAIN_U1_T01_20250603.bin")
print(f"robot SetEndFirmwareUpgrade rtn is {rtn}")
rtn = robot.SetJointFirmwareUpgrade(1, "D://zUP/MT/FR_SERVO_FV504215_MAIN_U7_T07_20250603.bin")
print(f"robot SetJointFirmwareUpgrade rtn is {rtn}")
robot.CloseRPC()
15.25. Robot Operating System upgrade (LA control box)
New in version python: SDK-v2.1.6
Prototype | KernelUpgrade(filePath) |
Description | Robot Operating System upgrade (LA control box) |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.26. Obtain upgrade results of robot operating system (LA control box)
New in version python: SDK-v2.1.6
Prototype | GetKernelUpgradeResult() |
Description | Obtain upgrade results of robot operating system (LA control box) |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
15.27. Robot MCU log generation
New in version python: SDK-v2.1.7
Prototype | RobotMCULogCollect() |
Description | Robot MCU log generation |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |