R2D2 HTTP API: Difference between revisions
No edit summary Tag: 2017 source edit |
No edit summary |
||
| Line 26: | Line 26: | ||
In order to allow the HTTP interface to work, it has to be enabled by the following command (through SSH): | In order to allow the HTTP interface to work, it has to be enabled by the following command (through SSH): | ||
<code>reg add services/gsmrobotd/parameters /v HTTPListeningPort /t REG_DWORD /d | <code>reg add services/gsmrobotd/parameters /v HTTPListeningPort /t REG_DWORD /d 8000</code> | ||
It sets the HTTP ListingPort to | It sets the HTTP ListingPort to 8000, or any desired and available value (note that 80 will conflict with the robot web interface). | ||
<code>reg add services/gsmrobotd/parameters /v HTTPSListeningPort /t REG_DWORD /d | <code>reg add services/gsmrobotd/parameters /v HTTPSListeningPort /t REG_DWORD /d 8443</code> | ||
It sets the HTTPS ListingPort to | It sets the HTTPS ListingPort to 8443, or any desired and available value. And the following line saves the modification on disk. | ||
<code>reg regsave</code> | <code>reg regsave</code> | ||
| Line 38: | Line 38: | ||
Then to take into account the changes the following commands must be entered: | Then to take into account the changes the following commands must be entered: | ||
<code>sc | <code>sc restart all</code> | ||
The following command can then be used to check if the configuration is correct: | The following command can then be used to check if the configuration is correct: | ||
Revision as of 10:19, 28 January 2026
Any command from the R2D2 API can be accessed through a HTTP Interface.
It has the following syntax:
| Syntax: | http://[user:password@]IP_Address[:Port_Number]/cgi-bin?command=R2D2Command&arg1=val1&arg2=val2...&argN=v |
| - User:password are user & password to connect to the Robot
- IP_Address is the TCP/IP address of the Robot, Port is the port used to access the R2D2 API - R2D2Commmand is the R2D2 API command to be executed - arg1 to argN depend on the arguments needed for the R2D2 API command entered. Argument between brackets are optionals. | |
| Examples: | If Robot's credentials are user=root and password=admin, at IP Address 192.168.1.1 with port 8000:
|
In order to allow the HTTP interface to work, it has to be enabled by the following command (through SSH):
reg add services/gsmrobotd/parameters /v HTTPListeningPort /t REG_DWORD /d 8000
It sets the HTTP ListingPort to 8000, or any desired and available value (note that 80 will conflict with the robot web interface).
reg add services/gsmrobotd/parameters /v HTTPSListeningPort /t REG_DWORD /d 8443
It sets the HTTPS ListingPort to 8443, or any desired and available value. And the following line saves the modification on disk.
reg regsave
Then to take into account the changes the following commands must be entered:
sc restart all
The following command can then be used to check if the configuration is correct:
reg query services/gsmrobotd/parameters /v HTTPListeningPort
reg query services/gsmrobotd/parameters /v HTTPSListeningPort
It will either return the HTTP or the HTTPS Listening port depending on the command above entered.