Connect OBDSim to Torque on Windows through Bluetooth - android

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.

Related

Android studio on Mac cannot detect connected USB phone

Constant issue with being able to connect an Android device via USB to Android Studio running on a Mac.
Tried numerous things like:
Switching USB debugging mode on Android to MTP or PTP
Restarting the Android devices and Android Studio and/or Mac
trying adb kill-serverand then adb devices, which usually resulted in:
List of devices attached
daemon not running. starting it now on port 5037
adb E 655 23135 usb_osx.cpp:327] Could not open interface: e00002c5
adb E 655 23135 usb_osx.cpp:289] Could not find device interface
daemon started successfully
But not actually finding the connected device.
I just wanted to write it down in case someone else comes across this issue.
It took me more than a couple of days to solve this while I was banging my head trying to understand what seems to be the problem.
Note: For me it was a cable issue.
I have Nexus6P with 2 original cables:
Type-C to Type-C
Short Type-C to regular USB
The problem was I was trying to hook the cable 1 directly from the Nexus to the Mac Pro (which didn't work since I think the Mac has a thunderbolt protocol on the Type-C inputs)
Then I tried a Type-C to regular USB cable with an adapter from to make it Type-C to Type-C (bear in mind this wasn't the original cable I got with my phone)
Only when I used the original short cable (cable 2) with an adapter it worked.
Although the non-original cable I used was a high-end cable - it still didn't work
Hope it helps other people who struggle with this
There are some great responses that worked for others, like this one or this one which seemed to work for others.
In my case, the issue was Tizen Studio (I was working on a watch app for Samsung Gear). Through this poster's research, found that the adb error could not open interface: e00002c5 implies that the usb device is already in use by some other driver.
So it seems Tizen Studio takes up the usb driver resource even though it is not using it. Quitting the application will automatically allow adb devices to list your device and run the project on it.
Hope this helps other lost souls.
if Xcode runs please turn it off
then everything worked again

USB Debugging in VitualBox-hosted Android system

I have set up a virtual machine running an Android 4.4 system on VirtualBox, in a Windows 7 system, for convenience in testing an Android app I am trying to develop. What last remains, is to be able to make the guest Android OS look like it's connected to the host via USB, to be able to use USB Debugging. Is there a way to achieve that?
EDIT: By "convenience" I mean I do not have a good enough physical device at my hands at the moment, and my processor happens not to support VT-x, in which case I could just use an AVD with Android Studio. Therefore, the VirtualBox choice is the next best thing I got, until I get a new device on my hands. What has priority at the moment is to create the app's utility, looks will be taken care of later on.
If your Android system is rooted you can install Wifi ADB (or some similar application) through Android Play store and debug over TCP.
The steps can be simply:
Install Wifi ADB (from https://play.google.com/store/apps/details?id=com.ttxapps.wifiadb&hl=es)
Execute and start service (Bettle will go to green)
Open Command line in Windows 7 machine
Run the connection command, for example:
adb connect 192.168.125.232
Test device connection with
adb devices
Enjoy testing your application!

Connecting to host from Android via USB

Okay so here is the background of this problem. I commute a lot on the train and build a lot of PHP web apps optimized for mobile devices. I would like to develop code on a netbook (Running Ubuntu Server) with no GUI. All development done using Vim directly on the netbook.
I would like to connect up my Nexus 4 to the netbook via USB and "connect" to the netbooks web server in the chrome browser. I can only use USB for this since I won't be having any reliable internet access.
I understand that using adb from the Android SDK, you can forward a port from the netbook to the phone. However, I need to do it the other way around.
For example:
Run a web server on the netbook on port 4000
Connect phone via USB
Somehow forward port 4000 on the phone to port 4000 on the netbook
Open chrome browser on phone and go to localhost:4000.
I am aware of the "reverse port forwarding" method that is described in the Google docs at https://developers.google.com/chrome-developer-tools/docs/remote-debugging. However, this requires an installation of chrome on the netbook. I don't want to have to install an entire GUI just for this.
Update
With regards to the above, I have found https://groups.google.com/a/chromium.org/forum/m/#!topic/chromium-reviews/7mE61hDcFdA. Does this mean I could install Chrome on the netbook (even though I don't have a GUI) and port forward via CLI?
An APP might do the job here. If you know some java you might be able to pull it off. Basicly you tunnel a connection through adb, then use an app as proxy and a small program on the computer. There might be an easier way though

Can I test Arduino Mega ADK using an emulated Android environment?

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.

communication between Android devices from different computer

Is it possible t make two android emulator on eclipse communicate from two differents machines which are connected with a fast ethernet link ?
Thanks for reply
Yes. The outgoing side just works, but the incoming side (whichever one is receiving the connection) is a bit more complicated. You would set up an emulator or adb port forward, but that only makes a port on the loopback interface ("localhost" ie 127.0.0.1) of the machine hosting that emulator ring through to the the emulator android device it is hosting. It probably will not accept connections on the external network. So to get around that, you can ssh from one hosting machine into the other, and set up an ssh port forward so a port on the loopback of the connecting machine forwards to a port on the loopback of the receiving machine and then forwards into its emulator...
First, android emulators are independent of Eclipse. That is, you don't need Eclipse to run the emulators:
C:\android-sdk-windows\tools\emulator.exe -avd <AVD name>
So the answer to your question applies to both scenarios: emulator running from Eclipse or running without Eclipse at all.
As for your question: Yes, it is possible. The android emulator is a basically a heavily customized linux box.
From the command line, type: adb shell and you will find yourself in a familiar linux shell. :)
Then ping the IP address of the other emulator and see how communication flows.

Categories

Resources