communicating through RPC with IRB140 [WebWare SDK]
Robot: ABB IRB 140 S4CPlus M2000
I am trying to set up communication between S4C controller and a PC through RPC (rpcgen) and RAP specifications.
RPC server is running on S4C controller. This is verified by following command executed on a remote PC
$ rpcinfo -p robot
program vers proto port
300456 1 tcp 1008
300457 1 tcp 1005
robot is the "robot controller IP address". As we can see, the RPC
services are available on the controller. Now, we tried to access one
of the procedures defined within program number "300456". This
procedure is "RAPGEN_RESTART" with version number 1 and procedure
number 5. Please refer to page no 16 of RAP PROTOCOL SPECIFICATION
TRP-1 (RPC, TCP/IP, SLIP) MANUAL.
First I create a file: rapgen.x
--------------------------------------------------
struct RAP_HEAD_TYPE{
long userdef ;
long data1;
};
typedef long RAP_STATUS_TYPE;
typedef struct RAP_HEAD_TYPE RAP_HEAD_TYPE;
typedef short RAPGEN_RESTART_MODE_TYPE;
struct RAPGEN_RESTART_REQ_TYPE {
RAP_HEAD_TYPE head;
RAPGEN_RESTART_MODE_TYPE restart_mode;
};
typedef struct RAPGEN_RESTART_REQ_TYPE RAPGEN_RESTART_REQ_TYPE;
struct RAPGEN_RESTART_RESP_TYPE {
RAP_HEAD_TYPE head;
RAP_STATUS_TYPE status;
};
typedef struct RAPGEN_RESTART_RESP_TYPE RAPGEN_RESTART_RESP_TYPE ;
program rapgen_restart_prog{
version rapgen_restart_vers{
RAPGEN_RESTART_RESP_TYPE rapgen_restart(RAPGEN_RESTART_REQ_TYPE)=5;
}=1;
}=300456;
---------------------------------------------------------- ---------------
$ rpcgen -C -a rapgen.x
Makefile.rapgen rapgen_client.c rapgen_clnt.c
rapgen.h & nbsp; rapgen_server.c
rapgen_svc.c rapgen.x rapgen_xdr.c
Now, we modify the client program rapgen_client.c as follows:
---------------------------------------------------------- ---------------------------------
#include "rapgen.h"
void
rapgen_restart_prog_1(char *host)
{
CLIENT *clnt;
RAPGEN_RESTART_RESP_TYPE *result_1;
RAPGEN_RESTART_REQ_TYPE rapgen_restart_1_arg;
rapgen_restart_1_arg.head.userdef=1; // it is defined as per specification
rapgen_restart_1_arg.head.data1=1; &n bsp; // stated in manual - not important
rapgen_restart_1_arg.restart_mode=0; // warm start mode
#ifndef DEBUG
clnt = clnt_create (host, rapgen_restart_prog, rapgen_restart_vers, "tcp");
if (clnt == NULL) {
clnt_pcreateerror (host);
exit (1);
}
#endif /* DEBUG */
result_1 = rapgen_restart_1(&rapgen_restart_1_arg, clnt);
if (result_1 == (RAPGEN_RESTART_RESP_TYPE *) NULL) {
clnt_perror (clnt, "call failed");
}
#ifndef DEBUG
clnt_destroy (clnt);
#endif /* DEBUG */
}
int
main (int argc, char *argv[])
{
char *host;
if (argc < 2) {
printf ("usage: %s server_host
", argv[0]);
exit (1);
}
host = argv[1];
rapgen_restart_prog_1 (host);
exit (0);
}
---------------------------------------------------------- --------------------------------
Now we compile the programs to generate rpc_client.
$make -f Makefile.rapgen
Makefile.rapgen rapgen_client.c rapgen_clnt.c
rapgen.h & nbsp; rapgen_server.c
rapgen_svc.c rapgen.x rapgen_xdr.o
rapgen_client rapgen_client.o rapgen_clnt.o rapgen_server rapgen_server.o rapgen_svc.o rapgen_xdr.c
"rapgen_client" is the executable. Now, when we execute this program, we get following error:
$ ./rapgen_client robot
call failed: RPC: Authentication error; why = Client credential too weak
Where did we commit mistake? It seems, S4C is not allowing the client to access its service.
Before doing this, we also configured rap on the controller by choosing following options:
1. Physical CHannel - Lan
2. Transmission Protocol - TCP/IP
3. Application Protocol - RAP
3.1 Remote IP address: ip of client PC
3.2 Port No. : -1 ( we also tried with port number like 1008 - same as that on controller)
3.3 Send start up message: No
3.4 Enable SUBSCW: No
Above programs were executed/compiled on a P3 machine running on Debian Linux (2.6.8-3-386).
Do we need to set some feature so that the S4C controller allows authentication automatically?
Please help.
Regards,
Swagat
I am trying to set up communication between S4C controller and a PC through RPC (rpcgen) and RAP specifications.
RPC server is running on S4C controller. This is verified by following command executed on a remote PC
$ rpcinfo -p robot
program vers proto port
300456 1 tcp 1008
300457 1 tcp 1005
robot is the "robot controller IP address". As we can see, the RPC
services are available on the controller. Now, we tried to access one
of the procedures defined within program number "300456". This
procedure is "RAPGEN_RESTART" with version number 1 and procedure
number 5. Please refer to page no 16 of RAP PROTOCOL SPECIFICATION
TRP-1 (RPC, TCP/IP, SLIP) MANUAL.
First I create a file: rapgen.x
--------------------------------------------------
struct RAP_HEAD_TYPE{
long userdef ;
long data1;
};
typedef long RAP_STATUS_TYPE;
typedef struct RAP_HEAD_TYPE RAP_HEAD_TYPE;
typedef short RAPGEN_RESTART_MODE_TYPE;
struct RAPGEN_RESTART_REQ_TYPE {
RAP_HEAD_TYPE head;
RAPGEN_RESTART_MODE_TYPE restart_mode;
};
typedef struct RAPGEN_RESTART_REQ_TYPE RAPGEN_RESTART_REQ_TYPE;
struct RAPGEN_RESTART_RESP_TYPE {
RAP_HEAD_TYPE head;
RAP_STATUS_TYPE status;
};
typedef struct RAPGEN_RESTART_RESP_TYPE RAPGEN_RESTART_RESP_TYPE ;
program rapgen_restart_prog{
version rapgen_restart_vers{
RAPGEN_RESTART_RESP_TYPE rapgen_restart(RAPGEN_RESTART_REQ_TYPE)=5;
}=1;
}=300456;
---------------------------------------------------------- ---------------
$ rpcgen -C -a rapgen.x
Makefile.rapgen rapgen_client.c rapgen_clnt.c
rapgen.h & nbsp; rapgen_server.c
rapgen_svc.c rapgen.x rapgen_xdr.c
Now, we modify the client program rapgen_client.c as follows:
---------------------------------------------------------- ---------------------------------
#include "rapgen.h"
void
rapgen_restart_prog_1(char *host)
{
CLIENT *clnt;
RAPGEN_RESTART_RESP_TYPE *result_1;
RAPGEN_RESTART_REQ_TYPE rapgen_restart_1_arg;
rapgen_restart_1_arg.head.userdef=1; // it is defined as per specification
rapgen_restart_1_arg.head.data1=1; &n bsp; // stated in manual - not important
rapgen_restart_1_arg.restart_mode=0; // warm start mode
#ifndef DEBUG
clnt = clnt_create (host, rapgen_restart_prog, rapgen_restart_vers, "tcp");
if (clnt == NULL) {
clnt_pcreateerror (host);
exit (1);
}
#endif /* DEBUG */
result_1 = rapgen_restart_1(&rapgen_restart_1_arg, clnt);
if (result_1 == (RAPGEN_RESTART_RESP_TYPE *) NULL) {
clnt_perror (clnt, "call failed");
}
#ifndef DEBUG
clnt_destroy (clnt);
#endif /* DEBUG */
}
int
main (int argc, char *argv[])
{
char *host;
if (argc < 2) {
printf ("usage: %s server_host
", argv[0]);
exit (1);
}
host = argv[1];
rapgen_restart_prog_1 (host);
exit (0);
}
---------------------------------------------------------- --------------------------------
Now we compile the programs to generate rpc_client.
$make -f Makefile.rapgen
Makefile.rapgen rapgen_client.c rapgen_clnt.c
rapgen.h & nbsp; rapgen_server.c
rapgen_svc.c rapgen.x rapgen_xdr.o
rapgen_client rapgen_client.o rapgen_clnt.o rapgen_server rapgen_server.o rapgen_svc.o rapgen_xdr.c
"rapgen_client" is the executable. Now, when we execute this program, we get following error:
$ ./rapgen_client robot
call failed: RPC: Authentication error; why = Client credential too weak
Where did we commit mistake? It seems, S4C is not allowing the client to access its service.
Before doing this, we also configured rap on the controller by choosing following options:
1. Physical CHannel - Lan
2. Transmission Protocol - TCP/IP
3. Application Protocol - RAP
3.1 Remote IP address: ip of client PC
3.2 Port No. : -1 ( we also tried with port number like 1008 - same as that on controller)
3.3 Send start up message: No
3.4 Enable SUBSCW: No
Above programs were executed/compiled on a P3 machine running on Debian Linux (2.6.8-3-386).
Do we need to set some feature so that the S4C controller allows authentication automatically?
Please help.
Regards,
Swagat
Blessed are the pure in heart, for they shall see God.
0
Comments
-
Presently i am also having the same problem.
does anybody have solution to this problem?
0 -
HelloI recommend taht you use Webware SDk which is implemeting all this dialog layerBest RegardsJC0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings