Connecting Linux and Android through Wifi-Direct (BeagleBone Black and Android-app) - android

For a quadcopter application, an FPV system is being built for custom Android app. The problem is in the connection between BeagleBone's Angstrom Linux and Android App through Edimax EW-7811Un Wifi device.
Wifi-Direct apparently supports the connection if just one of the two devices is WiFi-Direct-certified (has an internal access point). But, Sony phone's website (The phone on which app is being deployed) suggests that both devices must be WiFi-Direct compliant.
Some of the relevant materials can be found at WiFi organization's website, Sony phone's website and Android developer's official website.
While modifying etc/network/interfaces, something went wrong and SSH is not working properly now. Before that (as far as memory recollects), wpa_supplicant was working and wpa_cli was not working well and both phone and BeagleBone weren't discovering each other. So, the problem is now in the connection. Can you please guide me and let me know if a new WiFi device is to be purchased (if so, the name of the device as well) or if it can be resolved with Android and Linux codes? (You are humbly requested to include the relevant code snippets too) [Two android devices equipped with WiFi-Direct are getting paired]
It is not clear in some question(s) if the problem is mainly because of drivers like RTL8192CU. You are also requested to let me know if both devices must be WiFi-Direct certified always (and why).
Finally, a big-thanks to StackOverflow community for the simplification of entire process of software development.(My entire app got over without much difficulties mainly because of StackOverflow)
[Please note that this is my first proper post on StackOverflow. Please consider flagging this question if you find this question irrelevant or wasted your time]

Finally, an answer has been provided officially by Edimax. We are thankful to Edimax for their frank response. The image attached explains the issue.

Related

Android Automotive (AOSP) - How to enable and test AP/AP, STA/STA, STA/AP concurrency features? (A12.1)

I recently started to work with AOSP to build android automotive images (currently version A12.1) and i would like to know how to enable and how to use features such as
Dual access point (AP/AP concurrency)
Dual wifi connection (STA/STA concurrency)
and bridging internet access from wifi network to devices connected to the android hotspot (STA/AP concurrency).
Im using imx8qm board with 88Q9098 wifi chip from NXP.
https://www.nxp.com/products/wireless/wi-fi-plus-bluetooth/2-4-5-ghz-dual-band-2x2-wi-fi-6-802-11ax-plus-bluetooth-5-3-automotive-solution:88Q9098
I was told that this wifi chip should be able to support these features (with its concurrent dual wifi architecture)
I found some documentation from google about these features here:
https://source.android.com/docs/core/connect/wifi-sta-ap-concurrency
https://source.android.com/docs/core/connect/wifi-sta-sta-concurrency
https://source.android.com/docs/core/connect/wifi-ap-ap-concurrency
Following this it looks like we were able to make STA/AP work, because we were able to connect to wifi network with internet access and start hotspot at the same time, and the device connected to the hotspot was also able to access internet.
Trying this was fairly easy since i was just using already existing UI of android automotive => activating both sliders for hotspot and wifi (in network settings) at the same time. But how do I test AP/AP and STA/STA features? Im not really experienced in AOSP development, so any suggestions are appreciated.
Is there already a way to use these features but it is not by default shown in UI? or do I need some external app to do this? Or something entirely different?
And if there is someone who could explain to me or link some guide to the whole process of how features like this should be supported by vendor, I would really appreciated it :). I was unable to find any straightforward examples of what needs to be done.
Thank you for any comments. Sorry for mediocre english and sorry if the structure of the question is not what is expected here (this is my first question on stackoverflow).
Have a nice day :)

Android as an UVC Camera

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).

Android: any-screen capture without ROOT and constant USB connection

I'm trying to make an app that takes a video capture of the screen by taking individual snapshots. I've been looking into taking the snapshot without root, and seems that most solutions use ddmlib and require the device to be constantly connected via USB.
The only solution that doesn't require root and a constant usb connection is the android screenshot library. However, from the forum comments as well as my experience with the demo app, this library doesn't work very reliably/consistently.
Is there any other solution?
Note: I've also looked at the Noroot Screenshotit app (https://play.google.com/store/apps/details?id=com.edwardkim.android.screenshotitfullnoroot&hl=en), and seem like they have a similar approach to the android screenshot library, but have no idea how they make it more reliable. If anyone has an idea, that would be helpful as well.
Thanks
Edit: We've already got the USB-connected implementation, but we want to be able to do it on the device alone, without needing any connection to another PC.
As of Android 5.0+, you can use the new functionality in the SDK called media projections to do screen capture without root privileges or a USB connection. There is sample code by Google available here.

How do you develop Android apps with Bluetooth?

How do you effectively develop, debug, and test an android app that is based on Bluetooth.
I have been googling and searing stack overflow for the answer to this question and I am not getting a clear answer.
I understand that the emulators do not support Bluetooth. I also know of various guides explaining the functions, classes, and such, and I know people have mentioned that setting up a Bluetooth emulator is possible with Virtualbox. I even came across some old projects like BT-Sim that seemed like a way to create fake BT signals (though if my android emulator doesn't support BT, it doesn't help too much)
But no solid guide on how to get this going. It just likes a few scattered puzzle peaces that need to be stitched together. It makes me wonder how app developers reliably make BT enabled apps?
Are there any guides that dissect how to do this process? I imagine the steps to accomplish are:
Create a custom emulator on Virtualbox that can simulate Bluetooth?
Get the AVD Manager to talk to this emulator so my compiled Android code will work with it
Run a Bluetooth simulator to send BT signals over a port in your computer
(I don't really know how to do either of those 3 though!)
My overall goal is as follows:
Create an app that will collect data from a Bluetooth transmitter
But first, create a simulator on my computer that can talk to my android emulator as if it were the real thing
I'll be honest, I do find it odd that the Google folks don't allow Bluetooth emulation on their AVD. I understand not allowing real telephone calls, but I don't see how Bluetooth can be abused like that.
Anyway, any help in setting up Bluetooth would be greatly appreciated and hopefully help many others out there!
NOTE: I am using the standard Eclipse + Android SDK setup with AVD to do my Android development. Planning to use API 10. However, if I need to use a different set up, I am fine. As long as it comes with a step by step guide! That would be very nice.
Old question, but it's still unanswered. If you have a physical device, that seems easiest way to go. If, like me, you don't have a device it's still possible to develop with bluetooth and android.
Download an android x86 iso, load it into virtualbox with bridged network setting and install it.
Plug in your bluetooth dongle and select the device from the 'usb' menu, alternatively you can set a device filter in the vm's settings page.
Now just use adb and connect to it, you can find the ip by going to console (alt+f1) and typing netcfg or ifconfig eth0. You may also need to type adbd on the android console - I do, but I don't see many people mention it so seems it's not always needed.
It still works with eclipse, and is much faster than the emulator. Even when I'm not doing bluetooth dev I use the vm rather than the emulator.

Android app for reading data from external USB-Device

OK i know there are much threads about this topic. But most of em are like 2 years old. Because of that and the fact of new developments from googles side like ADK and stuff, im starting this question again.
All i want to know is, whether it is possible to establish a USB connection to an USB-Device now or not. Like to open a stream to receive the data from a sensor. Think about a device which can be the USB-Host and sends data permanently. All i wanna do is to grab that data.
Im using a smartphone with Android 2.3.6.
Are there any APIs now for this version? Or i have to go a way which includes a modification for the linux kernel or the usage of arduino or a similar interface? Because i would like to avoid that.
Most usb stuff starts coming into play with 3.0 > but I believe its back ported to 2.3 (not sure on it) but basically yes it is possible now. If you can get your device to be a usb host device you shouldn't have a problem, I use an acer iconia a500, running ics, I have a picaxe connected to an ftdi chip feeding me sensor data, once you have the basics sorted out its easy, if you go through my questions and find the usb related ones you should get a lot of information, ill link you if you want to the questions?
In short its entirely possible with the newer versions of Android, however back porting that functionality might cost you the same in time as it would in money to buy a new tablet or phone.
Heres everything I've talked about with usb on here... this stuff should save you a few hours I think https://stackoverflow.com/search?q=user:1174869+[usb]

Categories

Resources