I have a very specific answer for which I am looking. I hope that there is someone out there that is smart enough as to point me in the correct direction.
Background: I have an Android phone (LG Power on 5.0 rooted) as well as a Nexus 10 running 6.0. In my house I have set up a very nice PA system to which I would love to stream audio. I am fully capable of plugging in a 3.5mm cord to listen to audio or to stream audio over WiFi.
However, I am a stubborn person and have always fancied the idea of streaming audio from one device to another via bluetooth. After all, Android is Linux.
After searching on the Internet, quite extensively, there seem to be MANY people who would love to find a solution. There are answers ranging from:
'This cannot be done',
'Why would you ever want to do that?'
to
'Here are all the things to may need. Build away. Oh and by the way, there may be more that you need'
I do not find these answers satisfactory and would like to put out there a request to all of higher intelligence than myself to find an easy (not requiring building a custom ROM, modifying the kernel, making my own application etc) way to achieve this goal.
Here is one source that seems to be very close to the answer:
Android device as a receiver for A2DP profile
If any more info is needed, PLEASE ASK!
Thanks in advance for all of the hard work and effort that is put forth on this site. I am truly thankful for all of the people willing to set aside time to help myself, an invalid when it comes to the intricacies of Android.
Related
I'm stuck at home with a rather bad webcam. I was considering upgrading, but then it struck me: phones these days have really good cameras embedded in them. So why not use it as a webcam?
However, as I was researching this further I was really disappointed with the available apps for this. As far as I was able to find, we have Android apps that work roughly as follows:
Present phone camera as a network attached camera. Then you can use local software to use that feed as a webcam. See e.g., IP Webcam. This may be sufficient, but it's a complicated setup, and network latency makes this far from ideal.
The Android app sends the camera feed to an custom host application that in turn creates a virtual web camera. See e.g., DroidCam. This mostly solves the latency problem, but it is still rather complicated, and requiring us to install a specific third party application is troublesome in regard to user privacy. Especially since the applications are closed source.
So, I took the engineering approach and tried to see if it was even possible to improve the situation. As far as I was able to find, Android supports being used as a custom USB accessory. And looking over the USB video class documentation, it strikes me that it should be possible to create an Android app that presents the phone as a generic UVC webcam, such that we do not have to resort to tricks such as the ones above.
Ideally, I would have liked Android to add another USB device option ("Use USB connection as webcam") in addition to debug mode, file-transfer, etc. This seems quite unlikely to happen in the short term however.
So, my question is this: Does an application that does the above already exist? My searching thus far haven't yielded any results, but I might be missing something as googling for this turned out a bit harder than I expected.
Alternatively, am I wrong in my assumption above, such that there is some fundamental issue why an Android application cannot be made to work in that way?
There does not seem to be any complete app yet as of 2020-10, but the parts are mostly there:
https://github.com/tejado/android-usb-gadget has code to switch the Android device into gadget mode (but no UVC yet)
https://git.ideasonboard.org/uvc-gadget.git feeds v4l2 into the uvc gadget output
Sources:
http://www.davidhunt.ie/raspberry-pi-zero-with-pi-camera-as-usb-webcam/
https://www.raspberrypi.org/forums/viewtopic.php?t=148361
https://www.reddit.com/r/androiddev/comments/iabc2o/can_i_use_my_android_as_wired_camera_ie_as_a/g1nrijl/
It appears Google has started to take notice on this issue and are currently working on a "DeviceAsWebcam" service, which is exactly the solution to this problem, as seen in the Android review below:
https://android-review.googlesource.com/c/platform/system/sepolicy/+/2410788
Naturally though, this is a Android 14 feature, so it will like take a while before this is usable on a lot of devices. Hopefully, someone is able to backport this feature to older versions of Android.
If android / the version of Android that comes on your target phone provides / permits use of the USB gadget driver, then libguvc,
https://developer.ridgerun.com/wiki/index.php?title=USB_Video_Class_Gadget_Library_-_libguvc
can be used to "make an application appear as a USB webcam".
Potentially relevant to get you started would be https://stackoverflow.com/search?q=Android+USB+gadget (other SO references to the use of the USB gadget driver on Android).
So, what I want is just to scan the environment and see if any packages are sent without pairing or connecting to a device. Just a general scan of bluetooth in the air and being able to see some of what comes up, like packages exchanged and maybe some information of them. Everything I've read so far is about pairing or connecting first.
Thanks in advance!
The question is old, but since nobody gave an answer I try to fill the gap.
Bluetooth is, because of its technical specifications (frequency hopping etc.), difficult to sniff. A monitor mode like in WiFi doesn't exist out of the box. You would need to scan all Bluetooth channels at the same time. And then there is the challenge that since you managed to detect something, you need to know the next hop (to which channel the devices jump next). There are commercial hardware that can do that. Also some open source projects come up like Ubertooth, but with less capabilities.
You could try to purchase an Ubertooth and play with it.
I know that this question has been asked before many times but not recently and the API have changed so Google might have fixed some bugs. I was thinking it might be possible with two ways.
1st: Using Bluetooth Low Energy API of Android and then use android as central mode to scan for Bluetooth devices(iPhone). That is similar to what here edoardotognoni asked, which it is seems after some seconds iPhone is rejecting him. I am still currently reading about this post and the raised issue he made but I mentioned it in case someone knows something has changed.
2nd: Using and WiFi-Direct. About this method I have not found anything but If it is possible for two Droids to connect why can't it be possible for a Droid and an iPhone to connect. I have read about that matter this answer.
I also found this example on GitHub iPhone part, Android part.
Unfortunately I am not very good with xcode so I don't know exactly what is written in the iPhone part.
edit: Actually after searching I already found that it is possible with BLE but not with WiFi-Direct since iPhone does not support it. Of course being able to do it does not mean it is easy. Despite that though I have not yet found concrete proof because all I have seen is theories, an xcode that I don't understand and an Android code which seems to work when I checked it, but I have not run it.
Any help will be much appreciated, sorry for the long post!
I'm trying to create an Android App which would allow my Galaxy SIII to connect to my Arduino Board through Bluetooth using a eBay cheap module I just bought.
Thing is, I can't figure out how to make a proper connection and such.
I looked lots of things over the internet, found dozens of source codes, but I still don't understand how it works (I might be dumb, at least a little bit). Some of the source codes I found are very complicated with lots of possibility, and I'm still in the learning process.
Obviously I tried the http://developer.android.com/ but didn't understand it all.
My question is : Would it be possible to describe me what is required (step by step) to make a connection using an Insecure Rfcomm (I read that online, I might be wrong).
For example : First you need to activate Bluetooth and enable the discovery, then to create a socket ... stuff like that.
I'm obviously willing to have more information than what is written above. (Dunno if willing is very polite, English isn't, as you might have seen, my mother tongue).
For now, I managed to activate bluetooth when checking a checkbox, or if the bluetooth is already enabled, my app check automatically the checkbox. Well what I did is pretty basic, still it works.
My project is basically to send a letter or some letters to my Arduino so that it can interpret it and switch on and off a LED (pretty simple).
And since I'm curious and eager to learn, I want to develop my own app instead of using an already existing one.
In advance, thanks for your time, and thanks for reading my whole message :)
Have a good day !
PS : My code goes like that : http://pastebin.com/k9sSGTuC
I am looking for a way of displaying an analog video stream on an android phone. On a pc/mac/etc you can achieve this using a cheap usb analog-digital converter such as a grabby: http://www.terratec.net/en/products/Grabby_82248.html, and then view on VLC, for example.
Would such a thing work (in theory) on android if the proper drivers were available? (ie. are there any hardware issues which make this impossible?)
Does anyone know if such a device with android drivers is available?
Ultimately I want to make an app which interfaces with the grabby (or similar device) and allows the user to view video on the android and capture and send short clips.
First of all the Android device needs to support USB Host. This limits your userbase significantly.
Then there is the problem with power. Some USB Host devices will be incompatible simply because an Android phone will not be able to push enough power through to port to get it running properly.
I'm not sure about the drivers, but I'm 99% sure it won't work "out of the box".
You should certainly take a look at THIS project. It is pretty similar to what you are trying to do. Maybe you should consider getting in touch with that person.
EDIT:
Based on what it took to get that DVB-T dongle running in the project i mentioned above the chances of creating an app that everyone will be able to simply download and use are EXTREMELY slim. Getting that dongle running required using a modified kernel and special scripts. Of course I could be wrong. You can continue the research yourself or wait for someone with more experience than me to reply.