如何在 VirtualBox 上使用内置笔记本电脑蓝牙在 Androidx86 上测试基于蓝牙的应用程序 [英] How to test Bluetooth Based Application on Androidx86 on top of VirtualBox with inbuilt laptop bluetooth

查看:198
本文介绍了如何在 VirtualBox 上使用内置笔记本电脑蓝牙在 Androidx86 上测试基于蓝牙的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在笔记本电脑上的 Android 模拟器上运行基于蓝牙的应用程序.当我运行蓝牙应用程序时,据说蓝牙设备未连接.我被谷歌搜索并找到了一种使用 Oracle VM VirtualBox 的方法.我也跟着这个步骤,

How can I run Bluetooth Based application on Android emulator on my laptop. When I run the Bluetooth application, it's said, Bluetooth Device not connected. I was googled and I found a way for using Oracle VM VirtualBox. and I followed this steps too,

  1. http://www.android-x86.org/ 下载 Androidx86.这是一个 .iso 文件,因此您需要 VMWare 或 VirtualBox 之类的东西来运行它.我,我用的是 VirtualBox.
  2. 创建虚拟机时,需要将guest OS的类型设置为Linux,而不是Other.
  3. 创建虚拟机后,将网络适配器设置为桥接".
  4. 启动虚拟机并在启动时选择Live CD VESA".
  5. 现在你需要找出这个虚拟机的 ip.转到 VM 中的终端(使用 Alt+F1 和 Alt+F7 切换)并使用 netcfg 命令找到它.
  6. 现在您需要打开命令提示符并转到您的 android 安装文件夹(在主机上).这通常是 C:Program FilesAndroidandroid-sdkplatform-tools>.
  7. 输入 adb connect IP_ADDRESS
  8. 大功告成!现在您需要添加蓝牙.插入您的 USB 蓝牙加密狗.
  9. 在 VirtualBox 屏幕中,转到设备>USB 设备.选择您的加密狗.
  10. 完成!现在你的安卓虚拟机有了蓝牙.尝试开启蓝牙并发现/配对其他设备.
  11. 现在剩下的就是转到 Eclipse 并运行您的程序.Android AVD 管理器应将 VM 显示为列表中的设备.
  1. Download Androidx86 from http://www.android-x86.org/. This is an .iso file, so you'd need something like VMWare or VirtualBox to run it. Me, I use VirtualBox.
  2. When creating the virtual machine, you need to set the type of guest OS as Linux instead of Other.
  3. After creating the virtual machine, set the network adapter to 'Bridged'.
  4. Start the VM and select 'Live CD VESA' at boot.
  5. Now you need to find out the ip of this VM. Go to terminal in VM (use Alt+F1 & Alt+F7 to toggle) and use the netcfg command to find this.
  6. Now you need open a command prompt and go to your android install folder (on host). This is usually C:Program FilesAndroidandroid-sdkplatform-tools>.
  7. Type adb connect IP_ADDRESS
  8. There done! Now you need to add Bluetooth. Plug in your USB Bluetooth dongle.
  9. In VirtualBox screen, go to Devices>USB devices. Select your dongle.
  10. Done! now your Android VM has Bluetooth. Try powering on Bluetooth and discovering/paring with other devices.
  11. Now all that remains is to go to Eclipse, and run your program. The Android AVD manager should show the VM as a device on the list.

我这样做了,它工作正常.但问题是,如果我使用蓝牙加密狗,它工作得很好,但我不能将笔记本电脑的内置蓝牙设备与 VM Machine 一起使用.如何将我的内置蓝牙设备与 VM Machine 连接,如何将其用于测试基于蓝牙的应用程序.?请提出一些想法.提前谢谢..

I did this and it's working fine. but the problem is, if I use Bluetooth Dongle it's working good, but I can't use my Laptop's inbuilt Bluetooth device with VM Machine. How can I connect my inbuilt Bluetooth device with VM Machine and how can I use it for Test Bluetooth Based Application.? Kindly suggest some ideas. thanks in Advance..

推荐答案

在虚拟盒子里:

  1. 右击进入设置

  1. right click and go to settings

选择串行端口并启用它

点击确定.

现在点击开始

从顶部菜单中选择设备

选择 USB 设备

选择您的蓝牙适配器就这样.现在您可以将笔记本电脑蓝牙用于 VM.

Select your Bluetooth Adapter that's all. now You can use your Laptop Bluetooth for VM.

这篇关于如何在 VirtualBox 上使用内置笔记本电脑蓝牙在 Androidx86 上测试基于蓝牙的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆