How to write a rapid data by web services when robot controller in manual mode.

Hello,

I am trying to write a rapid data by using web services.
It works when the robot controller in auto mode.
but it can not work then the robot controller in manual mode. It needs to be granted. But I can not get the granted by web services.
What should I do?

Hello there,

You need to request for mastership: http://developercenter.robotstudio.com/blobproxy/devcenter/Robot_Web_Services/html/msh_main_page.html

This is a safety feature.

I can get the mastership when the robot is on auto mode.
But when the robot is on manual mode, I will receive the message like this:
"

<?xml version="1.0" encoding="UTF-8"?> rw
-1073445862rws_resource_mastership.cpp[165] ERROR: rws_component_mastership.cpp[54]: org_code: -2 new_code: 0xc004841a; code:-1073445862 icode:-1
" after I send the httppost of "http://localhost/rw/mastership?action=request". Can you show me the example of how to get the mastership? Thank you very much.

Hello,

I’m looking into this and will get back as soon as I have new information / solution for you.

Alright, a collegue found something.

Before requesting mastership, you have to invoke RMMP. Read more here:
http://developercenter.robotstudio.com/blobproxy/devcenter/Robot_Web_Services/html/users_rmmp_resource_operation_page.html

RMMP stands for Request Manual Mode Privileges.

So,

Step 1: Request RMMP while the controller is in Manual mode, read more in the link above:
Example call: curl (-d “privilege=modify” -X POST “http://localhost/users/rmmp

Step 2: Grant RMMP via the FlexPendant (hurry, the popup disappears really fast).

Step 3: Request Mastership (all domains, or specific doman, for example RAPID), read more here:
http://developercenter.robotstudio.com/blobproxy/devcenter/Robot_Web_Services/html/msh_main_page.html
Example call: curl --digest -u “Default User”:robotics -X POST “http://localhost/rw/mastership?action=request

This should be enough.

Hello,

It works!
Thank you very much.

Hello. I still have the same error. After I get the RMMP invoked and ROBAPI client has access, I request Mastership by this call : curl --digest -u “Default User”:robotics -X POST “http://localhost/rw/mastership?action=request

and I receive this error :

415 Unsupported Media Type

<?xml version="1.0" encoding="UTF-8"?> rw
-1073414146 d:\workspaces\robotsoftware\kernel\6.08.00.xx\areas\robapi2\components\rws_mastership\rws_resource_mastership.cpp[121] content type is not supported code:-1073414146 icode:415
:smile: Can you help me with this error?

I am stuck at after step 3 mastership request call. The controller returns 415-unsupported media type error. What should I do?