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?
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&scanStream=true&scanStreamDelay=1000"/>
<convertBodyTo type="java.lang.String"/>
<to uri="seda:myfeed"/>
</route>
scanStream gives you a tail -f equivalent on a 'file'.
Related
I'm trying to implement a native SFTP protocol with simple terminal interface like SSH in Apache Guacamole.
I've done the official tutorial from: https://guacamole.apache.org/doc/gug/custom-protocols.html
But the "bouncing ball protocol" it's too simple and i can't understand how to, in this case, implement an interactive terminal. Also i didn't found any project related to the creation of non-native protocols in Guacamole.
Any info is useful, thanks for reading.
I am using Camel in a multi-homed environment. Therefore I need to specify which local address should be used as the source address when building outbound SFTP connections. I did not find any configuration to do so, the only way I currently see is to write a proxy which simple opens the TCP connection using the correct local address and provide that to Camel.
Are there any obvious ways besides that which I probably simply missed?
Thanks for your help,
Heri
I don't think there is an out-of-the-box solution in Camel.
Camel uses Jsch component to make SFTP connections.
This question/answer implies that it is also not possible out-of-the-box when you use Jsch directly.
Perhaps you can adapt the solution from the question/answer link above.
Actually I'm using D-Feet (D-Feet can be used to inspect D-Bus interfaces of running programs and invoke methods on those interfaces) to connect to a BLE peripheral that advertises proximity profile.
When I try the Connect() method on the remote object /org/bluez/hci0/dev_88_6B_0F_00_C4_3A every thing is fine and the connection succeed but when I try to connect only the proximity profile using ConnectProfile("0x1802") method an error occurs saying that the host is down:
g-io-error-quark: GDBus.Error:org.bluez.Error.Failed: Host is down
(36)
Can anyone help me solving this problem (I'm blocked for 2 weeks and there still to much to deal with in the project :/)
ConnectProfile("0x1802")
ConnectProfile (and the Bluez API in general) does not deal with handles, only UUIDs. Your input argument does not look like a UUID: I suggest you find the remote service UUID that matches the handle (I'm assuming your current input argument is a handle).
I believe you can find the UUID with d-feet (after Connect() the service objects should be there) or with bluez command line tools.
I'm lookin at the camel SNMP component: http://camel.apache.org/snmp.html and it looks like it's a consumer only component.
Am I misunderstanding? Is there a way to generate SNMP traps from within a route?
not yet, but it has been requested: https://issues.apache.org/jira/browse/CAMEL-5271
As boday stated. However, you could of course do SNMP stuff within a bean or processor using regular Java. Maybe with a third party lib such as http://www.snmp4j.org/
can we in a network gateway write a program with libpcap to extract destination web address and other info like squid? in c language.
is any better way? if yo can give me some example and guide.
libcap could not be used for realtime monitoring as it has big impact on network performance. I think it can perform at a maximum of 25% of the effective bandwidth. You can observe that by using wireshark (based on libpcap).
You can configure squid to be a transparent proxy. This can be done on Linux by editing the IPTable rules. This way all traffic goes via squid, which can then log or do whatever you want. Additionally no traffic is missed, but performance will be effected.
Yes you can quite easily. Just capture packets on port 80, and look in the first one or two for the HTTP request. The HTTP request is easily parsed.
Please read the libpcap documentation and look at some of the examples for getting started.