bklunder
26th March 2003, 22:57
Hello all,

I am working on an application that requires the BW to talk to the RS232 port. Has anyone done this with success in the past?

I have tried the aux.open() aux.close() stuff but it seams these commands will only work in a unix enviroment (aux.open only comes back with a error -4 not supported by this server).

Can anyone help???

Thanks in advance.

Bert

NPRao
26th March 2003, 23:12
Hi Bert,

I couldnt find the aux.open() or aux.close() in the manuals. Are they "C" functions ?

In BaaN Tools you have to use the socket functions to read from ports/sockets.

Refer to -

sock.connect() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_interprocess_communication_cross_platform_sock_connect), sock.accept() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_interprocess_communication_cross_platform_sock_accept) and sock.listen() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_interprocess_communication_cross_platform_sock_listen)

service.name
This specifies the name of a service that maps to a port number. The service name is translated to a port number via a platform-specific lookup mechanism such as the /etc/services file or Yellow Pages (YP).

If you do not know the service name, you can specify the port number directly. For example:

sock.listen( "23" )

bklunder
26th March 2003, 23:33
Thanks for the reply.

I found the aux.open() (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=7179) command on an other baanboard post.

Are you sure that sock.listen() etc are for the RS232 (Communications) port? From what I have read you use sock.open() to open a socket connection to an IP address and then you listen to a IP port with sock.list()

If these sock commands will work with the RS232 port could you please provide an example.

Thanks

Bert

dnnslbrwn
27th March 2003, 00:11
There was a previous discussion where Joy had a bit of code to call a small program on the PC running BW that would then go and poll the serial port. Maybe take a look at thread 7645 (I just found it by searching on "serial port")

Not sure how to link it here... sorry.

Cheers,

-Dennis