Bluetooth Drivers on Android Device - android

I'm currently looking into communicating with a bluetooth enabled device from an android app that I'm developing. In order for a PC to communicate with this device, one must install drivers on the computer. My question is, if I am required to install bluetooth drivers on the PC, will I not be able to communicate with the device using an android app? Essentially I'm trying to find out how the drivers come into play with the communication of the dev

Android only supports certain Bluetooth device "profiles". What is the device you are trying to communicate with? Fortunately many Bluetooth peripherals use Serial Port Profile (SPP), so there's a decent chance you can easily talk to your device via a BluetoothSocket.
See this topic for more info on writing apps for Bluetooth
EDIT: Sorry, to more directly answer your specific question, your users will not/cannot install OS "drivers" on their Android devices for your Bluetooth peripheral. Assuming you can use BluetoothSocket to talk to your peripheral, everything else will be up to you and your app.

The idea of a driver is that it is software to enable a hardware component. Hardware drivers generally sit between the Hardware Abstraction Layer and device. In addition, hardware that works without having a formal driver installation step still has a driver which was bundled into the operating system. I am confused how your research could bring your understanding this direction: will I not be able to communicate with the device using an android app. If you mean, "will your end users require a driver", the short answer is yes and "will my development computer require a driver to write the computer side of my application", again yes.

Related

How windows detect nearby network printers connected with wifi?

Can some please explain how Windows detect near by printer as Mac OS uses Bonjour to detect them. I want my android device to be detected as printer in the nearby list of Windows. I am using NSD to register a network service with ipp protocol and it works fine in Mac OS. Now I want the same functionality for Windows as well. Please help me here.
As of Windows Vista, I believe it uses Web Services Dynamic Discovery (WS-Discovery).
The component WSDMON in Windows 7 and later uses WS-Discovery to automatically discover WSD-enabled network printers, which show in Network in Windows Explorer, and can be installed by double-clicking on them. In Windows 8 or later installation is automatic. WS-Discovery is enabled by default in networked HP printers since circa 2008.
https://en.wikipedia.org/wiki/WS-Discovery
Earlier versions of Windows used NetBIOS and SMB but I presume we're talking modern Windows here.
I currently work a technical support position - Windows is not guaranteed to find anything actually. You could have multiple printers on a network, shared in different methods. Printers may also be on separate vlans and you network can also have rules and devices which interfere with these protocols operating.
Instead of relying on the integrity of the users network (which is improbable to account for), you should find your users devices IP address and give the user instructions on how to connect a Windows device to your app.
If you would like to fight Goliath however, read this: https://technet.microsoft.com/en-us/library/cc783789%28v=ws.10%29.aspx

controlling Embedded system from MOBILE. ANDROID or iOS? suggestions and explanations please

As a part of feasibly study. I need to choose between Android or iOS for integrating it with an embedded system.
Basically, that embedded system will have an AVR or a PIC Microcontroller. I want to establish a communication between a mobile and that particular system.
Need some wireless technology for communication (bluetooth,wifi,internet etc..)
Micro Controllers have communication ports like UART, USART etc..
It really depends on the kind of communication you need.
I particular, if you have a normal WIFI connection and your controller can work with receiving & sending your data via wifi, you may go iOS or Android.
If however you need some kind of free format serial communication, you need to go Android, serial cable via USB.
recarding other factors, I guess it really is just a personal taste issue.
Could you give more info on how & what needs to be communicated and what kind of communication device you have between your phone and the device itself.
Not sure if this is similar to what you have in minde, but you might look at this: http://www.arduino.cc/ being probably the best known example in this context.
Using some serial to bluetooth module would be the most easier to implement.
I would go with Android unless your target audience are photographers. Seriously. Also, with iOS you need to be careful. For instance you want to use BlueTooth, but not all iOS devices will connect to, say, the Bluetooth protocol for a keyboard. (Ah! You didn't know there were more then one Bluetooth protocol did you?) And I don't think any iOS device will let you connect using the Bluetooth serial port protocol.
With Android you can jump in and start flying immediately by using the (or a copy of) the PIC 24F based IOIO board. And if you are an Android / Eclipse developer (I think) you can down load and use the IOIO JAVA / Android libraries. I have been told this makes programming the IOIO board just about as easy as programming an Arduino. Especially if you are well versed in JAVA, Android and the Eclipse editor. Add to this the IOIO board can be a host to the Android (i.e. connected by wired USB) or host to some Bluetooth modules (i.e. connect to the Andoid's bluetooth radio).
If you don't want to go it along you can buy the Microchip Android Development Kit (ADK) board which is also a PIC 24F based "USB wired" using AOA protocol to connect to an Android. I say "not going it alone" as I would expect you can then get limited support from Microchip w.r.t. their hardware (the ADK board), software (Android) and firmware (PIC ADk board). This solution, however, does not have built in Bluetooth support. I am guessing you can add it, it's just not part of the ADK software/firmware that Microchip put together.

USB code for Android 2.3.4

I want to use usb in my application to retrieve data from my computer (present in text files) to android mobile and read it... what are the neccessities in terms of hardware and helpful links for the usb code...
Recently google launched USB accessory for android 2.3 ... it have classes UsbManager, UsbAccessory etc... i want to use that ... how can it be used.??
Usually the opposite of this is observed, where the android mobile projects itself as a usb device (client) , The USB host controller driver on the computer recognizes the device and handles future USB requests from your client. This is just the hardware layer, mind you. Since the USB protocol has become so ubiquitous, the computer actually stores multiple families of drivers both at the kernel layer and user space to be able to handle the variety of requests and their user space interpretations.
Since android mobiles are primarily linux-based devices, to achieve your end you will need to integrate these USB host-based driver families to your device's kernel / ROM. You will need to create a custom ROM (someone else asked this question here). This link provides you a list of drivers corresponding to specific hardware families.
Additionally, you will need to set up necessary programs on your computer that allows it to project itself as a USB client.
If you use linux on the computer too, this article might help you to start.

Embedded System USB to Android Device

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.

How to communicate with a USB device from Android tablet?

From a year ago, Is there a way to communicate with USB devices on Android? this didn't look like a common requirement, but tablets have evolved, and hopefully, the OS has, as well.
I need to operate a simple USB relay card from my Curtis LT8025 tablet, currently running 2.1 patched.
I'm also a newcomer to both Android and java, so relatively clueless!
No need for bi-directional communication, just a simple serial command out to the device.
Any suggestions?
Thanks!
Dave
Sadly, there is currently no standard API to achieve wired communication with Android devices. I was facing a similar issue a while back (see Android: Communicating with a USB device which acts as host ).
I was able to successfully implement the solution provided by CommonsWare. Leave a comment if you need more help regarding this and I can provide details.
Edit (more details) -
Basically, I narrowed down to two possible solutions for this problem:
Modify the Android source itself to include custom drivers for whatever purpose you need and install this in your tablet. Since its mostly based on Linux, if you develop the drivers for Linux, the same can be used in Android with a little modification. This solution is simpler to develop, but not practical commercially if you are not providing the tablet/phone yourself.
Make your USB device act as an host and implement the ADB driver/command-set in your device. When connected, you can issue "adb forward" to forward tcp ports so you can interact with your Android apps and have two way communication between the device and the app.
I used the second method and it works flawlessly. But its only practical if you are making USB host devices. for USB slaves, first method is the only way I recon.
If you are using a serial device and have the ability to talk to it over native serial, you might want to consider IOIO (see http://ytai-mer.blogspot.com/2011/04/meet-ioio-io-for-android.html for more details).
I'm building an Android custom system. I did connect several devices on the USB. I looked to connect a device on the OTG port, the one that usually gets out of a tablet on which you use ADB. I gave up. This is a nightmare. I don't think you can use ADB on the OTG USB that is currently a device and expect to be able to use another device like a USB to serial converter. That means that you loose the whole ADB toolchain for debugging when you want to use the port as a host. On top of that, the USB OTG drivers you have for your tablet was probably not very well tested in host mode since it's not really used that way. So lots of headakes.
The simple way that I found was to use the second USB port on the CPU. This one is a plain HOST port (unfortunately limited to 12 Mbit/s). Unfortunately, I don't know if there are any tablet out there with 2 USB port available from outside (One OTG and one host).
If you get a set-up with two USB port (one HOST) then it's possible to compile as a module (drivername.ko), a usb to serial converter. There are several chipset supported in the kernel source tree and I already used a few of them and it works.
hope this bit of info is helpful.

Categories

Resources