Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Devices to process rs232

Options
  • 15-05-2013 10:01am
    #1
    Closed Accounts Posts: 1,564 ✭✭✭


    Hope this this is the right place for this question.
    Basically have fire panel transmitting on RS232 text strings.I need to recieve the string,maybe do so parsing etc and then transmit the processed string out over tcp.
    I had thought of using a pc with labview running but I wondered if there was a better solution`.could I do this on a raspberry pi or another such device.Would it relatively easy and starightforward? I would be well able to get this going on labview but dont really want to install a pc if a smaller cheaper device would do the job ..thanks


Comments

  • Registered Users Posts: 20 embed


    Check out tl-703n running openwrt & ser2net. Should make a compact solution to your problem.


  • Closed Accounts Posts: 1,564 ✭✭✭notnumber


    Thanks looks feasable..but prob tricky ..three different components to figure out..still think rasberry pi might be a better solution .yeah think I'll just a buy one of them see what it can do!


  • Registered Users Posts: 20 embed


    Not really, both the Raspberry Pi and the tl 703n run a version of linux. Having both I think the tl 703n is a more compact unit. You will need to do some programming no matter which one you use. Both will require a USB to rs 232 converter.


  • Closed Accounts Posts: 1,564 ✭✭✭notnumber


    embed wrote: »
    Not really, both the Raspberry Pi and the tl 703n run a version of linux. Having both I think the tl 703n is a more compact unit. You will need to do some programming no matter which one you use. Both will require a USB to rs 232 converter.

    Thanks guys, ok will have a more in-depth look at the unit.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Unless you can find where someone has already written such a RS232-to-TCP bridge, embed is quite right in that you're going to get your hands dirty with code.

    In this regard, I wouldn't hold my breath too much, as while it's pretty easy to find applications that will take in data from an RS232 and turn it to ASCII, or others that send out ASCII over TCP/IP, finding one that does both seamlessly may be a stretch, and trying to cobble a solution that does the bridge between two of these applications may be more trouble than it's worth.

    While it depends on your programming skillset, I'd suggest going down the PC Windows route and knocking up an application using .Net, if I was you. It's very easy to take in ASCII via RS232 using System.IO.Ports.SerialPort and then fire it back out using System.Net.Sockets as a TCP client - probably less than 100 lines of code.

    Only caveat, which is going to apply no matter what approach you take, is cues and threading, as your serial port data will be able to arrive at your bridge a lot faster than it can send it on again over TCP/IP. This will require threading and complicate development a bit more than a simple synchronous bridge.

    The same could be done using Java easily enough (and the code wouldn't be all that far removed from a C# version), and would allow you to, instead of a Windows PC, use a Raspberry Pi or even an Android device.


  • Advertisement
  • Registered Users Posts: 450 ✭✭SalteeDog


    Or you could code it up in python on a raspbery pi:-

    See this and this.


Advertisement