Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
So I am hoping to use a Futaba remote controller (specifically the Futaba 7c 2.4ghz) for a c++ + OpenGL simulator that I wrote.
Are there Ubuntu packages available to assist with this? I am okay with buying the USB cable to connect the controller to the computer, but then I need a c/c++ SDK to allow the controller to communicate with my program.
Thanks
Futaba and all other controllers send/receive PPM signals. You need a device (USB device for example) which is capable of receiving PPM signals.
For example this device:
http://www.mftech.de/usb-interface_en.htm
Also you can go "hackish" way
Just like this:
http://wiki.neuronrobotics.com/PPM_Reader_Channel
and
http://diydrones.com/profiles/blogs/705844:BlogPost:38393
You can use an Arudino or ArduPilot board to receive signals from controller, then send it with Serial port to USB converter to PC for processing.
I remember I've done something similar to this with a basic Arduino. If I recall correctly, I had a signal cable connected from Futaba's RC receiver part to Arduino and I was able to receive PPM signals. Something like this: https://www.sparkfun.com/tutorials/348
Also you can simply use this http://www.rctoys.com/rc-products/GWS-GWFSM002A-ROUND.html
directly connected to RC transmitter and all buttons pressed on RC will be sent directly to USB port, you'll have a virtual COM port and you can read all signals
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have 2 keyboards and I want to know if it's possible to know which keyboard generated an input event in Windows (using WINAPI)?
Windows has a RAW Input API that can be used to monitor events from keyboards, mice, and HIDs (joysticks, etc) without using low-level hooks.
Use GetRawInputDeviceList() and GetRawInputDeviceInfo() to discover which keyboard devices are connected to the system.
Use RegisterRawInputDevices() to register for events from the desired keyboard devices.
You will receive a WM_INPUT message whenever an input event occurs on a registered device. It will tell you which device sent it.
There is also a WM_INPUT_DEVICE_CHANGE message to notify you when devices are added and removed.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm using C++ and libusb-win32 to try and communicate with a commercial USB device ... I don't know much about USB programming, but I want to send some commands to the device that I know from using a sniffer program. Libusb-win32 seemed OK, but it looks like it can only be used on a device that uses the libusb driver for the device.
I want to use it on a device with a driver "USB Composite Device" driver provided by windows usbccgp.sys ... is it even possible? If not, how can I do this?
I just need to send some Control Transfers
This is currently not possible. libusb is designed around the Linux driver model where composite devices are treated as a single device by the system. Windows treats composite devices as multiple separate ones - a parent composite device and child devices for each interface.
As such libusb cannot access the child devices without first changing the parent driver to a libusb supported one. It can be done but then the device won't work with the vendor supplied software.
If you want to talk to a commercial device you need to contact the manufacturer and find out if there is an interface to that device that is published through their driver. Most manufacturers won't have a way to interface with generic control requests in a product. There may be an undocumented IOCTL, but again you'll need to work with them to get this information.
If you just want to hook the device and send it a control request then you need to replace the manufacturer's driver with the libusb driver. The problem here is that while you can get at the device it may not function the way you want unless you spoof what the manufacturer does (for example, the device might expect some vendor specific communication to get the device ready to interact with the host). If you do see problems then you can reverse engineer the vendor specific protocol by looking at the USB line through some hardware analyzer.
Read USB Complete, it's a great introduction to the USB protocol and will help you understand more of what's going on between a USB device and your host PC.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm trying to build a program in c++ to see what game servers a client is connected to for a gaming site. For the program we need to be able to see if a client is connected to a specific server or not. I've tested using wireshark and this program can see the incoming/outgoing connections to and from the server - which is the exact thing I need but i'm just not sure how to do it. I understand you can see which port connections are going in and out through using command prompt using netstat, but netstat doesnt give the details i'm after. All I need to be able to do is basically scan through their outgoing connections and compare it to an IP, and if the IP matches then they're connected to the server.
Is this possible through c++? If not, does anyone know how wireshark does it?
Cheers.
This depends on your operating system and is different in Windows and Linux.
In Linux you can get all of the information about a program's sockets using lsof -p [PID] where PID is the program's PID.
To do this in your own program look up the lsof source code and see how it is done. As I recall, it is done by reading files in /proc.
In Windows you could try C++ Get Handle of Open Sockets of a Program
Check out libpcap http://www.tcpdump.org/
You may need to deconstruct the UDP/TCP packets themselves.
If you want a simpler solution you could pipe the output of tcpdump as stdin. You can give tcpdump filter to ensure your application isn't spammed with useless content.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm looking to create a mobile app on IOS devices before I started I just needed to check up on one thing. How can I detect other IOS mobile devices within local rage e.g same room, same train, etc..
I want to be able to do it while the phone is locked, so bluetooth wouldn't be a great example as most people have it turned off.
Thanks!
The application has to send its location to the server.
Then the server knows where every devices that shared its location are.
Then your application can ask "who is around?" to your server... and your server calculates (let's suppose within a radius of 2 miles) who is around... and sends back to you.
It doesn't have anything to do with bluetooth. It's done via regular internet.
For other users of your app who want to be discovered you could use Bluetooth LE and the new iBeacon support added in iOS 7. Each user would have to launch your app and give it permission to start "advertising" their presence. However, the range of Bluetooth LE is like 10-20 meters (I forget the exact figure) and that will go down in "RF hostile" environments.
If everybody's connected to the same WiFi network you could use Bonjour.
Another option, as suggested by Wagner, above, is to have the devices send their locations to a central server.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I need something a little more feature rich than Sysinternals TCPView (which I regularly use) ... but it also must be freeware. :)
Well, the question is a bit old and I realize that probably you already found the software you were looking for... just in case, an interesting connection monitor utility is CurrPorts, by Nir Sofer.
Freely adapted from the program's home page:
displays the list of all currently opened TCP/IP and UDP ports on your local computer;
for each port in the list, information about the process that opened the port is also displayed, including the process name, full path of the process, version information of the process (product name, file description, and so on), the time that the process was created, and the user that created it;
allows you to close unwanted TCP connections, and kill the process that opened the ports;
allows custom filters for inclusion/exclusion of connections.
Maybe a full blown traffic sniffer like Wireshark will complement your tool set?
Amongst wiresharks features are:
packet analysis
traffic statistics
capture
coloring
data export
I recommend TCPView for Windows v2.53.
image http://i.technet.microsoft.com/bb897437.TcpView(en-us,MSDN.10).gif
TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections. On Windows Server 2008, Vista, NT, 2000 and XP TCPView also reports the name of the process that owns the endpoint. TCPView provides a more informative and conveniently presented subset of the Netstat program that ships with Windows. The TCPView download includes Tcpvcon, a command-line version with the same functionality.
Not sure what features you are looking for so this is my suggestion.
Without having used it, I have seen TCPStat advertised a few times.
It looks like it was a discontinued project somewhere around 2003 and it's an awful blue color.
There's the MS Network Monitor.
Process Hacker shows also send/receive bytes, speed, country flag etc.