I want to connect my Xbee module to my android phone and communicate with it by sending AT commands.
I do know of the USB host facility provided by Android phones, but I do not know how to send data to it.
I have the java-Xbee API and I am able to talk to the Xbee using my computer but since my project involves using the Android OS, any help on this topic will be appreciated.
According to this Google Code Page, the java-Xbee API requires Java >= 5 and RXTX. Considering those two requirements:-
RXTX on android is not an out of the box lib and may require some hacking which may or may not work.
I'm not a Java VM expert, but i know desktop OS JVMs work differently from Dalvik.How well would Dalvik run code developed for JVM? Here is a nice StackOverflow topic discussing the two.
Faced with the above challanges, are you brave enough to boldly go where no man has gone before?
Could you also consider the following well documented and supported approaches:-
Ytai Ben-Tsvi & Sparkfun's IOIO-OTG
Saves you the headache writing android 3.1+ USB host code and thus allows you to use cheaper phones that run droids 1.5 to 2.3 (without hacking the latter).
Digi's WiFi to Xbee
Allows you to link your android phone (or any other programmable wifi enabled computer) to your device over the internet.
Related
I'm trying to develop a C++ application on Windows 10 (using Visual Studio 2017) capable of looking for nearby mobile devices and sending data (images) via Bluetooth. I'm new to Bluetooth applications, but from what I understand, the best solution is to use BLE and make the computer a GATT server.
For this purpose, I'm quite confused about which tool I should use in order to start creating my application, since most of the libraries I have found online are outdated or poorly documented (libblepp, gattlibpp, bluetoe).
I've also found this Windows API but I don't understand if this is what I should use and I don't know how to include it in my project neither.
Has anybody had some experience with this and could provide me some hints concerning the right tool to use, in order to get started with my project?
On the other side, I would like to develop a mobile app using Flutter capable of receiving the image and reading the data sent by the computer. flutter_blue looks like the best option to go with.
Edit: The idea for the application is the following: the computer runs an application that generates various frames. In the meanwhile, it constantly scans for nearby devices and, whenever a user makes a request, it sends the current output image to the device that makes the request.
The Windows API is what you should use if you write a C++ application for Windows. That will be the best supported option. If you happen to find some library that also does BLE it will probably just be a wrapper around the Windows API.
Unfortunately these APIs use the WinRT architecture which is not the easiest to set up but should work fine once you've managed to set up the environment.
I have one custom made device for measuring current. This device can be connected to PC and communication is done over USB. It is based on FTDI chip. I have application written in Java and that application is using rxtxSerial.dll library and gnu.io.rxtx_2.1.7.4.jar. Now I want to port this application on my android device and I'm litte bit confused what to do that? All I have is android tablet (os version 4.1.1), OTG cable and this measuring device.
Should my device be rooted? Is there any kind of library that I can simply add to my Java Android application and read data over USB? Where to start?
I have tried to port existing application for PC using same library, but rxtxSerial.dll is missing and I can't transfer it to my android device.
I can really recommend the USB-Serial-For-Android library, it supports multiple popular usb-to-serial chips (also FTDI) and there is no rooting required. Check out the GitHub project here.
There is a project dedicated to serial communication on Android. android-serialport-api. I think, it is a good resource to start with.
FTDI also provides Android related resources.
I think there's currently only one properly maintained library for serial USB communication and it's felHR85/UsbSerial. It supports several USB chips including FTDI (see Devices Supported).
Unfortunately mik3y/usb-serial-for-android seems to be dead.
And no, you don't need to root your device for connecting to and communicating with a USB device.
EDIT: We have a maintained fork of mik3y's library. See kai-morich/usb-serial-for-android
EDIT2: It seems that all of these libraries are maintained again, mik3y joined forces with kai-morich and they are working together.
I want to create a small wireless network with a Windows 8.1 laptop as the "hub," connected to up to 8 Android devices. I need to transfer files in both directions, between the laptop and the devices.
This needs to be a system that requires minimal setup since it will be distributed to the laptop owners. The developer will not be available to help. Minimal hardware and software requirements can be specified, but not actual models of laptops and devices.
It seems to me that Wi-Fi Direct is the best option to do this. I know VB.Net best, so I would like to use that for development. Does anyone have sample code that could get me started? Would I also need an app to run on the devices to set up the pairing and network?
Thanks!
Well, I believe this should be able to be implemented on the Android.
Recently, I found some Android developers created the Android remote controller(KB/MOUSE) app by
installing an app onto the server side(could be Windows or Mac or Linux) system and interact each other by bluetooth.
However, I believe it shouldnt be necessary to install an app onto host side if
we can take advantage of standard Bluetooth HID profile.
I have implemented the Android Bluetooth HID application which can make your android device play as a bluetooth kb/mouse input device.
to control my Ubuntu without installing any host side daemon.
The engineering approach involves Bluez deeply so it doesnt work on Mac or Windows.
Please bear my lack of bluetooth knowledge. I am really curious about the possibility of this matter.
If any of you has any approach or idea about this, please kindly share.
Thank you.
well, it seems this question is not yet implemented by the developer.
However, if any of you is interested in how to do this for Linux system. Feel free to write me an email. I would be happy to share the skill.
I am writing an Android 2.1 application that needs to get data from a USB device. The USB device is an embedded system i created. The embedded system has no OS. Also, the android device does not send any data to the embedded system.
How should i go about this, I'm guessing i will need to make a high-level driver to communicate from USB to the application. But, i have never made a Linux driver before.
If creating a high-level driver is the best way to do this, can someone give me some references so i have somewhere to start.
If there are other ways to accomplish this i would also like to hear about it
-Thanks
The Android Open Accessory Development Kit is where you should start looking. Like many of other Google's documents, the tutorial is reasonably complete and should provide you with a good starting point
Good Luck!
I think you will need to recompile Android kernel to add usb device support.
It can be an option if you are working on some dedicated project and only one Android phone should be supported. If you want to support all kinds of Android phones, I can suggest to implement USB host in your embedded system( if it is possible), thus your Android phone can be connected using ADB protocol.