Harikrishnan
Harikrishnan

Reputation: 3822

Serial Port Endpoint for Apache Camel

I wanted to know whether there is any endpoints available for reading from Serial port in Apache Camel. I heard that MINA can be used for the purpose but I can't find an example for that. Can anyone help me?

Upvotes: 1

Views: 1139

Answers (1)

tingenek
tingenek

Reputation: 141

If you're thinking usb, rather than rs232 the Stream component would do it. This is what I use to read my arduino on my MacBook:

<route>
    <from uri="stream:file?fileName=/dev/cu.usbserial-A900acSz&amp;scanStream=true&amp;scanStreamDelay=1000"/>
    <convertBodyTo type="java.lang.String"/>
<to uri="seda:myfeed"/>
</route>

scanStream gives you a tail -f equivalent on a 'file'.

Upvotes: 1

Related Questions