in

Sending a serial stream from a brick (RS232)

Last post 02-24-2009 11:28 AM by engineering.team. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-16-2009 12:52 AM

    Sending a serial stream from a brick (RS232)

    I understand that the brick has a serial port.

    How would I send a pre-configured serial stream (ASCII chars) out of the line (RS232)?
    In conjuction with that, what is the maximum buffer that can be sent and how do I configure the rx buffer ignore & baud rate etc?

    Cheers, Ian.

    Filed under:
  • 02-18-2009 1:12 PM In reply to

    Re: Sending a serial stream from a brick (RS232)

     Ian,

     

    The WebBrick serial interface can be configured to operate in the following modes RS232, RS485 or DMX. To setup the mode and baud rate use the CR command.

    To send serial data (applies to RS232 and RS485 mode), you will have to use the RD command. This allows you to send a string of ASCII characters. The ASCII characters will have to be specified using their decimal representation.

     

    You can find more information on http://docs.webbrick.co.uk/, all commands are listed in the WebBrick Command Sheet (http://docs.webbrick.co.uk/WebBrick/CommandSheet6_00.pdf).

     

    All commands can be passed to the WebBrick via the URL:

    http://<ip Address>/hid.spi?com=<commandString>

     

    Example:

    Set serial interface to RS232 and to baud rate of 9600:

    CR2;5:

    Send the string: Hello

    RD72;101;108;108;111:

     

     A good page for getting the decimal ASCII codes is:http://www.paulschou.com/tools/xlate/

    Filed under: , ,
  • 02-21-2009 1:00 AM In reply to

    Re: Sending a serial stream from a brick (RS232)

    That's great,

    I've tried looking in the Command Sheet but I can't find any reference as to have to receive serial data. Is that a seperate spec or is it hidden in an event that I can't see somewhere?

    Also, if I wanted to change the protcol parameters i.e. 8 data bits, 1 start, 1 stop no parity how do I do that?

    Cheers,

    Ian.

     

  • 02-24-2009 11:28 AM In reply to

    Re: Sending a serial stream from a brick (RS232)

    Receiving Serial Data:


    When the WebBrick Controller receives data on the serial interface it pushes this information out on the network in UDP packets. We provide a serial receiver module in the WebBrick Gateway, which allows you to pick up the data. If you are interested in developing your own code to interpret the serial data, then I suggest using a network monitor like wireshark to see the exact content of the UDP packages from a WebBrick. Alternatively you could also use the WebBrick monitor, available from downloads section on this site.


    Changing Protocol Parameters:


    The only parameter that is changeable at the moment is the baud rate. The number of data bits, stop bits or the parity type cannot be changed.

Page 1 of 1 (4 items)
(c) WebBrick Systems