Accessing Apple IR Receiver with C# (Windows 7 in bootcamp)? - c#

My school gave us MacBook Pros when we were accepted. I bought an IR remote for it later and I have the IR receiver (built in) working normally on itunes and other apps that accept input from it. I want to receive input from the remote in my own programs and I have no idea how to do that.
I've looked and a lot of examples talk about using the System.Net.Ports.SerielPort class but when I look under device manager it says that the IR receiver is connected via USB and I don't believe the SerielPort can access a USB device (although I know very little about the class).
What APIs are available that would help me receive input from the IR Receiver that's appearantly plugged into USB?

If it is an HID device (you should be able to confirm in the device manager)then you can look at this project for an example of how I used Windows API to access another USB HID device. You'll still need information on the IR receiver itself to know how it's commands work.

Related

Arduino sending serial data to Hololens 2(Unity) via USB C

im trying to find my Arduino on my hololens with the Windows.Devices.Enumeration.DeviceWatcher.Added event but it doesnt come up, on my pc the uwp console app works and i can read the arduino serial data.
DeviceInformation.FindAllAsync(SerialDevice.GetDeviceSelector()) also does not work as it only returns the hololens itself. Looking specificly for the device using its VID an PID also returns device.Count == 0:
string selector = SerialDevice.GetDeviceSelectorFromUsbVidPid(vid,pid); DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(selector, null);
all these methods work and have been tested on pc, Hololens seems to not add the arduino to the DeviceInformation list. the weird thing is when you go to Setting/Devices on the hololens you can see the arduino even with name(Seeeduino nano in my case) but it gets disconnected and reconnected every other second.
also when you put this in the uwp Package.appxmanifest the unity app wont start on the hololens, but this has nothing to do with finding the device in the list only with creating the SerialDevice.
<DeviceCapability Name="serialcommunication"/>
Does anyone know if it is possible to read the serial data from arduino using usb c connected to the hololens?
Currently, it is recommended you try to communicate with Arduino over Network such as Bluetooth or Wi-Fi. Besides, you can provide more information about your request and submit a feature request via feedback hub on new feature request to be considered in future releases of HoloLens OS and devices. If it's a hot impacted feature, it will be possible to be given priority to jump in the development schedule.
For how to post feedback request, you can follow this doc: Send feedback to Microsoft with the Feedback Hub app.

Bluetooth Call Receive with 32feet.net and c#

I need to perform two task in c#
1) with USB cable
2) with Bluetooth
i want to dial and receive calls from smart android mobile. Mobile can be connected with USB cable or Bluetooth. I can dial and receive calls using USB cable by AT commands. Android mobile is connected as USB GSM Modem (Virtual com port). AT+CLIP=1 give a number information along with RING when someone is calling. So i can attend call by viewing a specific number. This part is working Well.
The second part is same thing with Bluetooth. I used 32feet.net for dialing a call. I am able to make a call after going through these forums links
Bluetooth dial with 32feet.net and c#
Bluetooth communication from PC to mobile phone, use laptop speaker and mic during voice call
Get Data from Bluetooth device in C#
now i am not able to get any information when anyone is calling on Bluetooth
i am using hand free profile as using serial port i get an error may be my mobile not support Bluetooth virtual com port.
can anyone point out me how i can get information that which one is calling or invoke some function when anyone call. I need to get a number which one is calling that help me in decision to accepting or rejecting a call.
Bluetooth: use HandsFree Profile. It runs RFCOMM control channel that allows your application to place a call, handle incomming calls, 3-way calling and other things using AT commands (HFP is well documented so you can find all the commands in its specification). However Windows standard Bluetooth driver from Microsoft does not support connection to HFP Audio Fateway. You can do it with BlueSoleil only.
USB: There is no USB HFP profile. Android supports only DUN through USB so it can act as USB GSM Modem only and supports only modem commands. No voice and no other commands.

using arduino input in mobile

I need to know how hard will it be to get input from a heartbeat sensor connected to arduino to a android running a unity made app. Im making for my degree final project a vr system that take a real time heartbeat input to effect the unity game, and i need to decide if i want a simple android vr or oculus (which is less common and more expensive). The plan is to connect the arduino via usb and call the serial port, but i think it may be more complicated then that. Since I have no prior experience in arduino i would love to get your advice in what I will need to do to make it work.
The easiest way is to send the collected data through Bluetooth controller. You can buy an HC-05 Wireless Bluetooth Serial Transceiver Module for 3 US dollars. You can connect the device to Rx and Tx terminals on Arduino. See this link for details on how to use HC-05 with Arduino.
In android device side Install or create an android application which can send data through Bluetooth serial terminal. You can find lot of BT serial port terminal applications in play store. I think some of the applications are open source and you can use their code in your own application.

What information is required to find connected USB/Serial communication device with PC

I have a device which i have connected to my laptop. This device connects to computer using serial port, however my laptop doesn't have a serial port so i have added a connector to the serial cable to convert it to USB. Now i can see it in Device manager
But here you can see, i can just see the information about the converter not about the device. Why is it so? How i would be able to know about the device?
But the device software shows that it has detected it.
My purpose to get the information is, i want to know the information of the device manufacturer and its ID.
For this i have used software like: Device Monitoring Studio and Advanced USB Port Monitor. But the information they provided is just about the Serial to USB converter not about the device.
Below is the snapshot of the information i am getting from these software:
Please help me finding the manufacturer of that device.
Main Aim: This will help me to loop through all the ports and check which one is the right port, so that i can recognize that my device is connected to which port.
Serial ports are an I/O port design that dates from the stone age of computing. Used for example back when Dennis Ritchie typed in the source of the first C compiler on a teletype. The electrical interface is very simple and the chip required to generate signals is not much more than a glorified shift register. In particular it doesn't has the dedicated embedded processor that a USB device needs. Nor has it any kind of protocol to have a device identify itself. Albeit that a standard exists for modems (the Hayes AT protocol).
Accordingly, serial devices are not plug-and-play devices. And there's no way for the computer to figure out what kind of device is on the other end of the cable.

programming an universal remote control

I have a remote control RM200 and I want to program it
so I can detect key presses and send them to applications.
Now, which API can I use in Windows?
HID usb API? IRDA API?
I'm confused.
My remote is an IRDA remote but sometime I read that I can program this device
with HID USB API????
AFAIK you cannot use the IRDA interface to receive infrared remote control sinals, because IRDA is a special protocol and the interface cannot be "abused" to receive other signals.
To receive your remote control's infrared signals you will need an extra device. Infrared receivers for your serial port are quite easy to build.
A good source for information and software is: http://www.lirc.org/
The windows port of lirc is called WinLIRC an can be found here: http://winlirc.sourceforge.net/overview.html

Categories