I want to play around with using an Android device to control hardware on an Arduino Mega ADK. At the moment I don't have an actual Android device so I'm wondering ... is it possible to use the Android emulator and still talk to an actual ADK board. I went through the "Getting started" tutorial and things built and installed as expected but when I run the DemoKit software from the emulated Android environment (GoogleAPI) it doesn't seem to detect the ADK board. I tried unplug/plug, restart, close Arduino programmer to free up the USB connection ... none of which made any difference.
I'm completely new to Android programming so not too familiar with the environment. I have gone through the basic "Hello, world" tutorial using an emulator, but other than that the only thing I've done is build and install the DemoKit app.
I am pretty sure that this is not possible. I don't think the Emulator can actually acccess your USB ports on your personal computer, and thus this will not work.
Related
I have drone( DJI Phantom 3), and in order to fly it correctly DJI provides an App for IOS and Android("DJI Go"). The thing is that I have a Kolina k100 android phone(a cheap chineese one), and I can install the app perfectly, and it runs quite well with an only exception. When I put the Drone on video-recording mode, I loose the live-video and I can not see what my drone sees. Obviously DJI has told me that he doesn't support my chinese phone so they do nothing. So I was thinking that maybe is a problem of how powerful my phone is.
So I wanted to check if the App works well in my laptop so I downloaded the app in Bluestacks, but I realised that to make the app work I have to connect the drone's RC controller by USB (as I do with my phone). But when I connect the controller to the laptop, Windows recognizes it. But Bluestack doesn't care so the app doesnt work. How can I make Bluestack recognize the USB connection of the controller?
Thanks in advance, any help will be appreciated.
Forgive me if I'm not technical enough here - I'm new, and not terribly comfortable with speaking about coding, given that I'm in QA.
I'm running into a problem when I try to connect my HTC One M8 to my Mac or PC. I've got it running in Debugging mode without problem, but when I connect it to either system, it's not recognized by either Android Studio or the HTC Sync Manager. When it's plugged in, I don't get the shade to appear letting me know it's plugged in as an MTP device - it defaults automatically to just charging. Anything anyone can tell me to fix this error so I can attach crash logs to my bugs to make my developers lives a little easier?
I suggest you consult the official Developers guide regarding connecting a phone to Android Studio Developers Guide.
In case it doesn't solve your problems, you may want to check that your USB port is currently accepting your device: in my computer, if I connect my phone to the USB 3.0 port I can use Android Studio but not Fastboot, while connecting to a USB 2.0 port does exactly the opposite.
Finally, you may want to check that the phone drivers are correctly installed: I don't own a HTC phone, but it may require a special procedure to install its own drivers.
I'm trying to install OBDSim on Win7 but am running into some trouble. My end goal is to run OBDSim as a bluetooth ELM327 OBDII Simulator and connect to it using the Torque app on my Android device.
I watched a video on youtube (http://www.youtube.com/watch?v=-dMjo5ySbcc) that demos exactly what I am trying to simulate but it was running Lubuntu 12.04.
I've been reading through posts on mp3car and other posts on stackoverflow over the last week but I'm still a little lost. I'm not sure exactly how obdsim makes use of com0com to get my bluetooth dongle to connect with Torque on my phone. Heres what I have so far:
I've paired my Android device to my computer
I've installed com0com and have a CNCA0 <-> COM5 pair set up.
I set the incoming COM Port to be COM5
I'm running the obdsimwindows-2011-06-11 build as suggested (Although
-b is giving an invalid option.. Also bluetooth isn't listed under --help either. Does this version support bt??)
I am able to launch the gui successfully using 'obdsim.exe -g gui_fltk -w COM5'
Torque still isn't being able to connect and read from the simulator.
I think theres one more big step I'm missing, but I'm not sure what it is. I found this correspondence (http://icculus.org/pipermail/obdgpslogger/2012-January/000122.html) which sort of resembles where I'm at, but I don't know how to the bind and sdptool commands translate to windows (that was a linux problem).
Has anyone tried to set up OBDSim on Windows and connected to their Android device via bluetooth successfully?
Thanks!
The man page, right under the bluetooth heading, says that bluetooth is not supported in windows.
http://icculus.org/obdgpslogger/manpages/render/obdsim.txt
One more answer from stackoverflow which worked perfectly for us.
https://stackoverflow.com/a/25763606/739262
I tried it on Win7 and it works with the -w switch ...trying to make it work on VM win7 in a Mac host still having issues.
FYI it also works thru a tcp socket I have a win7 VM where I run OBDSim and thru a redirector tcp to COM make it available from outside the VM it works ... bunch of tools to do the redirecting but none worked 4 me ended up writing my own simple socket redirector to COM in Win7. Tested it on the Mac thru a basic iOS App I wrote on the iOS simulator.
I tried to connect an Arduino Mega ADK using Demokit sources to several phones in vain.
I compiled and upload the Arduino sketch "Demokit.pde" with arduino 0022. It looks ok as the board sends "start" on its usb client port.
I compiled Demokit app under Eclipse using Google API 10 (for phones running Gingerbread) and Android API 15 (for ICS ones). Everything fine.
On the phone side, I tried these setups :
samsung i9000 running CM 7.1 and after pushing android.hardware.usb.accessory.xml and com.android.future.usb.accessory.jar
samsung i9000 running ICS
nexus S running ICS
And nothing happened. There's only a warning in the eclipse logcat :
W/PowerUI(654): unknown intent: Intent { act=android.intent.action.ACTION_POWER_CONNECTED flg=0x10000010 }
Nothing else. I wonder if the board can have a problem on its usb host...
If anybody has an idea?
Thanks
There are couple of places where things go wrong.
First to check the board, try running a simple blink program, to make sure that the board itself is working.
Next when you connect your to the board, does your phone starts to charge? This will show whether there are any issues with the phone-board connectivity.
Out of the 3 phones, I would suggest you to try with nexus S, with stock ROM, since CM (even after pushing the jars) has issues enabling ADK.
The problem came from the setup procedure in the Demokit.pde sketch. I used a bread board to run it but I didn't connect all components and the i2c joystick initialization needs the component to be connected otherwise the procedure goes into an infinite loop. So if you try to run Demokit.pde without the demokit board be sure to connect the right joystick, or comment its init procedure call.
The demokit example is actually rather complex for an initial test. I would suggest after running the blink program to make sure your Arduino Mega ADK is working to try a simpler first test.
There are a couple of good examples that are much simpler than demokit.
http://allaboutee.com/2011/12/31/arduino-adk-board-blink-an-led-with-your-phone-code-and-explanation/
http://digitalhacksblog.blogspot.com/2012/05/arduino-to-android-turning-led-on-and_29.html
Neither of these target an Arduino Mega ADK so some changes will be necessary but they should be a good place to start.
I'm a newbie to the Android development world but have some experience with embedded systems.
I'd like to use an Android phone (4.x or higher) to control other devices via its USB port. We want to set the Android device as a USB host, so solutions where other devices play the host role (e.g. Android Open Accessory Development Kit's Arduino) will not meet our goal.
We are currently using Eclipse-SDK for Android development and successfully have compiled/run/debug several apps. However, I have a very naive question. I was wondering if there is a way one could use the USB port of the development host PC as an input to the Android Virtual Device emulator.
I realize that an easier way to debug the USB-host apps we are writing would be by having a real device. However, the price of the new Ice Cream Sandwich devices is somehow far away from our reach and not the ideal way for debugging an application at its early stages.
I appreciate any help you can provide me with.
The Android Open Accessory Dev kit has been backported to 2.3.4 see here http://developer.android.com/guide/topics/usb/adk.html
So install CM7 or earlier (http://www.cyanogenmod.com/) on your HTC desire and you should be good to go!
Look at the example projects for the 2.3 SDK should help get you going in the right direction.
Path to SDK Samples for me was C:\Program Files\Android\android-sdk\samples
If your looking for USB Host Support basically control and talk to another usb device such as mouse, keyboard, usb thumb drive etc the following should help.
Nexus One as USB Host: http://sven.killig.de/android/N1/2.2/usb_host/
USB Host: External USB devices to Android phones?
Official Android SKD UsbDevice Class: http://developer.android.com/reference/android/hardware/usb/UsbDevice.html
You should take a look at this project, its a great reference
https://code.google.com/p/mover-bot/