Stream audio from device to computer (Windows 10) via bluetooth & 32feet lib - c#

I would like stream audio from a smartphone-device to the computerspeakers(Windows 10)
So far, I can make a connection between the two devices with the Bluetooth headset-service. Whilst the sound on the smartphone is muted because of the active Bluetooth-connection I can't hear any sound coming out of the computer. I don't receive a bitstream with the 32feet getStream-method either.

Windows 10 does not support the Bluetooth A2DP SNK profile, so streaming music will not work unless you build the profile yourself.
When audio is streaming between to Bluetooth devices, the host (in your case the smartphone) uses A2DP SRC to send the audio. The endpoint (Windows 10) has to support A2DP SNK to correctly receive the audio. You can find the full specification for A2DP here.

Finally. Here's the solution I found:
First, pair your android to your PC, then, make sure that audio stream option is enabled in bluetooth preferences (this is in the Android device. You might need to change some stuff in developer options for bluetooth).
Finally, install Bluetooth Audio Receiver from Microsoft store. Open it, select your android device and click on "open connection" and you're done!

Related

Bridge connection between Hololens, Android and Haptic Vest to send events?

I have an issue connecting my Unity application on Hololens to a (haptic vest) Bluetooth. The problem is there is no SDK for Hololens to connect to the Haptic vest.
**- I want to maintain a connection between my HoloLens unity app and the haptic vest but cannot figure out how.
There is an Android SDK for the Vest but I am confused about how to use it with my application. For example, I connect my Hololens to Android, and then I send events from my unity application to android to play a specific pattern because the android Bluetooth pairs with it only.
I read about sockets TCP or UDP connection but I have no idea how this can be achieved. I am not an advanced-level programmer but just a rookie.**
Please help me regarding this issue, been stuck now for a month...
Does the haptic vest only provide Android SDK? It is easier if there is an C# SDK.
However, it is possible If you want to have an Android device to host the bridge between HoloLens and the vest.
You may simply add a TCP/UDP Client on HoloLens. For the Android project, basically there are 2 things to do. Adding a TCP/UDP Server and implementing the haptic vest SDK. There are plenty of steps to build the system and the configuration steps for players may take long. The player needs to open Android app to pair the vest, then start TCP/UDP server. Then the player open HoloLens App, find the TCP/UDP server in the local network (maybe manually input IP address). The game starts when the connection is established.
Apar from HID and Audio devices, HoloLens 2 supports the following Bluetooth APIs:
GATT
Server and Client
RFCOMM
If your vest doesn't support accessing via the above APIs, you may need to refer to the previous answer to set up the connection. If you have further questions on HoloLens Bluetooth, you may submit a support ticket via http://aka.ms/hololenssupport

Discover Nearby Smartphone Devices on Android

Problem Statement
I am trying to make an application for Android that can detect nearby smartphone devices. I need to discover smartphone devices regardless of their connection to a WLAN or their operating system. The only requirement is that their bluetooth or wifi setting is enabled. I am trying to capture the MAC Address and maybe RSSI of these devices. An example of an application I am trying to emulate is Meshlium.
Methods Already Considered
Android Classic Bluetooth:
I have followed the guide to discover devices that aren't currently paired with my device.
The smartphones I am trying to discover need to be in "discovery" mode in order to be found. For most modern phones that means they need to be on their bluetooth settings page.
Android P2P (Wifi Direct):
I have followed the guide again and can't discover smartphones nearby.
Similar to bluetooth, both devices (mine and the device I am trying to find) need to be both trying to discover wifi direct devices.
Also it seems iOS doesn't support wifi direct anyways.
Google Nearby:
Nearby Connections works only with devices running an application that is using the nearby connections api. So only devices with the app currently running the advertising or discovery feature will be available for detection.
Wifi Network Service Discovery:
This lets me see devices that are currently advertising services on a network and not the actual devices themselves.
Device Specifications
The device I am using is running android version 6.0.1 and Model number rk3368-box. The device also has root permissions.
Question
Is there a way on my android device to discover the nearby smartphones with the only requirement being their wifi or bluetooth is enabled? Perhaps packet sniffing the probe requests of the devices? I have researched packet sniffing but can't find any solid resources for Android. Also I would love to be able to do so in c# and Xamarin.Android if possible.
Update
Is a custom ROM an option? I am not looking to make an application for the play store, but one for custom hardware. Perhaps when I enable the wifi hotspot on the device it logs the probe requests from the devices nearby and saves as a file to export later?
There is no way to do this. And there shouldn't be- unless I'm working with you (in which case multiple of the above will work) its a massive invasion of my privacy for you to be able to detect my device.
If you are able to find mac address for WLAN adaptor of a device than try to search for bluetooth devices having mac address same as WLAN adaptor but last digit changed by 1.
This way you can find a Bluetooth device even if it's visibility is hidden

Android to PC/ PC to android bluetooth/wifi live audio stream

I've searched for this for some time, but I can't find anything about my problem. What I would like to do is to connect an android phone to PC via bluetooth or wifi (already done using sockets) and use the PC's headset (with microphone) to talk on the phone.
I've found some examples/tutorials on how to stream music but I would need live audio from the microphone and it should be full duplex.
Is this possible?Any comments are appreciated
I think you may be able to accomplish this in the bluetooth settings for the device (in this case, the device is your PC)
On your android phone, you go to your bluetooth settings, select settings icon next to the the paired device (probably the PC name), and then select with the check boxes what activities you want to use the device for. All available activities such as phone calls and media will and keyboard will show up here. If it does not show up, then it must not be a supported bluetooth capability either on your phone or the PC.

Using Bluetooth to RECEIVE file - From Mobile to PC

I took me several time and days to research and try some codes applicable to my problem but unfortunately I wasn't able to see codes that pair and receive files (text, images etc..NOT audio or video in particular) from a mobile device.
Most of the examples found are for SENDING only (From PC to Mobile).
I have bluetooth device (USB) physically attached to my PC.
Summary:
All I need is a sample code that automatically detect/pair when a device is trying to send the file (like in Kodak kiosk but not limited to images only).
I also wanted to understand and study the code.
Perhaps use my 32feet.NET library and its ObexListener class see e.g. http://32feet.codeplex.com/wikipage?title=Server-side&referringTitle=OBEX
For more advanced scenarios use Andy Hume's Brecham.Obex library and his server sample application. See http://inthehand.co.uk/files/folders/objectexchange/entry9942.aspx
Which Bluetooth stack does your PC have installed? Microsoft, Widcomm, BlueSoleil...? See e.g. http://32feet.codeplex.com/wikipage?title=Supported%20Hardware%20and%20Software On Widcomm for instance the build-in OBEX server would have to be disabled to allow your server to get all the incoming connections...

How can i send data by USB port in Android C#?

I am developed a app in Visual Studio with mono for android. C#
So. How can i send data by USB port in Android. C#?
The type serialPort1.Write("1");
Long story short - you can not do it the way you intended. USB is not a serial port that you can just write to and data comes out on the other side.
Serial ports can be emulated over USB, but Android does not support that. Android typically can act as device that offers different profiles: disk, camera and proprietary debug (if enabled on device).
Since Android 3.1 you also have two special modes: host mode where Android device acts as a host to usb devices (much like PC does) and special proprietary accessory mode. Read more about it here: http://developer.android.com/guide/topics/usb/index.html
Start here: Android USB Api

Categories