spy with LibCEC on Raspberry pi - c++

I'm trying to use LibCEC for listen HDMI-CEC devices on my local network.
I want to obtain all CEC information from all devices.
Actually LibCEC give me information about broadcasting and direct messages to my raspberry pi, but not about direct messages between other devices (for example between my TV and my ps4).
I want to undo this limitation, to be able to spy every messages on the network.
I looked for the filter in LibCEC, but i didn't find where it was filtered.
Does someone tried to create a CEC listener or has any idea of where is locate this filter?

Related

sending and recieving ROS messages to non-ROS machine

Newbie to ROS and networking. Need some help here to understand the best approach i should take. I am trying to send Ros messages from a ROS PC to another non-ROS PC. There is a few way I researched that I can do it.
Install ROS on the non ROS machine. Connect it like a network. One will act as master with a common roscore for all
Write a ros node and recieve the ROS messages and then serialize them as UDP/TCP messages and broadcast them over the network
Through rosbridge and websockets writing json
Method 1 is probably not possible as there is a requirement is that we will have to reuse the WCF interface in the non-ROS PC.
Method 2: I wanted to get some help and insights about the tools/ packages/ libraries in ROS that can help with this. Have anyone has any template or could point me to a guide/website for some help?
Also I am puzzled to of why TCP is promoted over UDP or at least I have the impression.
Method 3: This seems a bit easier (on first look) but I have out that communicating through websockets is not so much supported(not sure if i use the right words) by WCF. Am I right?
Thanks for answering my query
What ROS topic does is wrap a series of data types (ROS messages) into a buffer and transport it through the network using either TCP or UDP protocol.
Every node publish its data on a 5-digit port on ROS network. I think you can listen to that port using plain socket-programming method and deserialize (I never checked, but I think deserialize methods are determined in genmsg package) based on the ROS message and I think you can get data out of the ROS system.
Maybe rosserial would to the job. rosserial is a protocol for wrapping standard ROS serialized messages and multiplexing multiple topics and services over a character device such as a serial port or network socket.
Video: https://youtu.be/JEwhXWKXlI0
Wiki.ros : http://wiki.ros.org/rosserial

What ways do I have to stream openCV output to my own remote C++ gui?

So I have on one hand an embedded device with a camera running openCV and on the other hand a C++ (Qt) GUI. I would like to connect both i.e.:
"stream" all the output image frames/video from openCV to my remote C++ gui
send commands from my C++ gui to the embedded device
How can I do this, what possibilities do I have? I was thinking about sockets, but I don't know whether that is the easiest solution to stream the image frames from openCV to my Qt gui.
Thank you
You should give us more details about what you're trying to achieve.
You say "stream [...] to my remote C++ GUI": do you mean sending the data over a cabled connection? over a LAN network? over the Internet?
Depending on the answer this changes your system's architecture quite a bit. Especially in case you want to stream the data over the Internet. If your use case implies a LAN network, you can easily setup a peer-to-peer connection between the embedded device and the C++ app to send data. However, it's much more complicated if you want to send data over the Internet, because it is difficult to create a peer-to-peer connection if you don't have static IPs (which I'm assuming you do not have). You will need a server (which can be written with Qt as well) to work as a relay for sending data from the device to your C++ app.
Do you need actual video streaming (at 25fps), or is a low refresh rate (1-0.5fps) sufficient ?
(I'm making the assumption you want to send data over a network)
Because if a low image rate is sufficient, using WebSockets to send images on a regular basis might just do the trick.
Otherwise, you'll need to setup a UDP connection with a video buffer.
Hope this helps!
D

How to send SMS through 'Dongle' using C++

I have a USB dongle connected to my laptop which is used to get the internet connection. No need to say it has a sim card and it is possible to send/receive SMS as well. I want to know how can I get the SMS and send SMS using my own C++ windows program, through this SIM card. Is there a way to access the SIM card and do these? Any libraries? I haven't done any USB programming anyway.
Edit
I just found it is possible with something called "AT Commands" - How to Auto send SMS via Broadband USB dongle?
But the link in the answer is dead. Even though it is AT Command, which lib should I install in order to use it?
At (Attention) commands can be used to interact with the USB dongle. Each manufacturer has their own At-commands, so you will have to find out one which suits your model (mine was Huawei e173-u). Some of the common ones can be found in the Hayes command set :
Hayes Command Set (Wikipedia)
Introduction to At commands
You will need to find out which COM port your dongle uses from the Device Manager, then use a serial-port terminal like Putty to test out whether the commands are supported by your dongle. As the libraries developed for sending SMS's are mostly for .Net, you may need to use an SMS gateway instead.

Trigger an exe once My device is connected via USB

Once my embedded device is connected to USB port of my PC, it should trigger an exe as an event. How can I achieve this??
Should I create a service to keep monitoring the USB connector bus or is there any default API's available in Windows to achieve this??
thanks.
A simple exe which is started on connect is not possible. But you can write a service or user mode application which listens for device arrival events. WM_DEVICECHANGE is sent to all (registered) applications with a device interface guid which represents which device is plugged in. You can then use this id with the setupapi to see if its your device.
On receiving that event, you can then start your executable.
Depending on your version of Windows it might be possible with a workaround using a AutoRun.inf file in the root folder of a USB drive. For security reasons this is by default turned off, and in Windows 7 not allowed at all.
To achieve the same effect in a more robust way, you need to create a service that monitors whether your device is connected or not (e.g. iTunesHelper that monitors for connected Apple devices).
The easiest solution is probably a trivial UMDF driver. That's basically a small COM component called when your device is connected.

Can a VeriFone terminal application communicate via Ethernet, but also store local data?

Ideally, I would connect a VeriFone terminal to the Internet via an Ethernet cable and transmit transaction data in real time, but I also want to program the terminal to be able to work in offline mode and save transaction data to a file to transmit later. Is this possible?
I would also like to know how much of the communication is with the processing host vs the merchant services provider's application.
Yes, you can but you will need a SDK for that and what goes on or offline depends on your needs. On a Vx510 device you have access to file system, LAN, dial-up or gprs communication, keyboard, printer, display and a lot more.