创建蓝牙应用程序最快的移动平台是什么?

发布于 2024-09-16 07:59:45 字数 1341 浏览 7 评论 0原文

大多数时候,我在计算机上为嵌入式模块或小程序编写代码来分析所述代码生成的数据。现在,我被要求制作一个移动应用程序原型来分析/显示该数据。我(6 岁的 CS101)没有使用任何一种流行语言(Obj-C/Java?)的经验,更不用说使用 4-5 种流行移动操作系统上可用的 API/库了,所以我更喜欢或小于一平方。

调整嵌入式硬件以与手机通话相当简单,只需添加一个蓝牙模块,我可以将其配置为模拟串行端口(使用 SPP 配置文件),但我不知道从哪里开始。

我应该以哪种类型的移动操作系统/设备为目标,以便在拥有相同(没有)经验的情况下轻松/快速地开发蓝牙串行端口配置文件 (SPP) 应用程序?

黑莓

  • 这里每个人都有一个(除了我),所以这就是我被推动的地方,除非有重大障碍或另一个更好(更快)
  • 较小的社区
  • 许多开发博客抱怨糟糕的 SDK/工具
  • “黑莓设备对 SPP 的支持有限。” (PDF,第 9 页)

Android

  • 手机很少这里。
  • API 使得查找设备并连接到它们看起来非常直接
  • 大型开发社区(还有更多示例可供细读)。

WM6

  • 我有一部(坏的)WM6.5 手机。
  • 较小的社区
  • 手机可以有各种堆栈(MS、Widcomm),这些堆栈不可互操作,有些不支持 SPP,而且我不知道我的手机(HTC Ozone)有什么...

iOS

  • 没有/从未使用过Mac、iPhone 在我的组织中只稍微受欢迎。
  • 大型开发社区
  • 只能连接到批准的蓝牙设备(? )如果我读对了,就会杀死这个选项。

一些便携式框架(Appcelerator、PhoneGap)

  • 似乎不可能,因为它们无法连接蓝牙。

Most of the time I write code for embedded modules or small programs on my computer to analyze data that said code generates. Now I've been asked to prototype a mobile application to analyze/display that data instead. I have no (6-year old CS101) experience with either of the popular languages (Obj-C/Java?), let alone with any of the APIs/libraries available on the 4-5 popular mobile OSs, so I'm more or less at square one.

Adapting the embedded hardware to talk to a phone is fairly straightforward, just add a Bluetooth module that I can configure to emulate a serial port (using SPP profile), but I don't know where to start on the other side.

What sort of mobile OS/device should I target for ease/speed of developing a Bluetooth serial port profile (SPP) application from having equal (no) experience on them all?

BlackBerry

  • Everyone has one around here (except me), so this is where I'm being nudged towards unless there are significant obstacles or another is vastly better (faster)
  • Smaller community
  • Lots of dev-blogs moan about poor SDK/tools
  • "BlackBerry devices have limited support for SPP." (PDF, p. 9)

Android

  • Very few phones around here.
  • API makes it seem very straightforward to look for devices and connect to them.
  • Large dev community, (many more examples to peruse).

WM6

  • I have a (bad) WM6.5 phone.
  • Smaller community
  • Phones can have various stacks (MS, Widcomm), which are not interoperable, some don't support SPP, and I don't know what my phone (HTC Ozone) has...

iOS

  • Don't have/never used a Mac, iPhones only marginally popular around my organization.
  • Large dev community
  • Can only connect to approved Bluetooth devices(?) Kills that option dead if I read it right.

Some portable framework (Appcelerator, PhoneGap)

  • Seems impossible as they can't get at the Bluetooth.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

森林很绿却致人迷途 2024-09-23 07:59:45

如果您热衷于将蓝牙作为通信渠道,而您的唯一标准是构建工作原型的时间:

  • 最佳选择:Windows Mobile
  • 亚军:Android

为什么?

  1. iOS可以立即被淘汰。蓝牙通信只能通过 iOS 批准的配件来实现,除非您加入了 MFi 开发者计划,否则您无法构建或购买该配件。标准的支持 SPP 的嵌入式无线电模块无法解决这个问题(MFi NDA 禁止我透露更多内容)。

  2. 我从未在 BlackBerry 平台上进行过蓝牙开发,因此我没有太多经验可以贡献,但我的印象是他们的支持更多地基于 J2ME JSR 实现,而不是任何特定于平台的实现,因此您可能会得到flakey 结果。

  3. Android 在 Android 2.1+ 中对 RFCOMM(SPP 所在的位置)有很好的支持。连接一个小模块和流数据相当简单,并且这些示例有很大帮助。不过,有一个技巧在于查找为嵌入式设备上的 SPP 服务发布的 UDID。 Android API 并没有很好地帮助您发现这个值(无论我提交了多少错误报告)。我必须通过其他方式找出它是什么,并将其硬编码到应用程序中才能运行(如果您仍然感兴趣,可以详细了解)。

  4. Windows Mobile 是赢家,因为您可以在代码中完全绕过蓝牙,但仍然使用它。 WinMo 有一个用于设置蓝牙设备的控制面板,因此您可以打开嵌入式无线电、与其配对、连接并将 SPP 配置文件附加到 COM 端口……所有这些都可以通过控制面板进行。然后,您可以使用 C# 和 .NET 编写应用程序并使用 SerialPort 类连接到您的设备,因为它只是另一个 COM 端口。这可以让您远离 WinMo 蓝牙 API(低级 C++)或 32Feet.Net 等第三方驱动程序(这不是一个糟糕的驱动程序)。

希望有帮助。我试图将其进一步浓缩。

If you're sold on Bluetooth as the communications channel, and you're only criteria is time to a working prototype:

  • Best Choice: Windows Mobile
  • Runner Up: Android

Why?

  1. iOS can be eliminated immediately. Bluetooth communication can only be achieved with an iOS approved accessory, which you can't build or buy unless you are in the MFi developer program. A standard SPP-capable embedded radio module won't do the trick (the MFi NDA prohibits me from saying any more than that).

  2. I have never done Bluetooth development on the BlackBerry platform, so I don't have much to contribute here with experience, but my impression is their support is based more on the J2ME JSR implementation than anything platform specific, so you might get flakey results.

  3. Android has good support for RFCOMM (where SPP lives) in Android 2.1+. Getting connected with a small module and streaming data is fairly simple, and the examples help a lot. There is one trick, though, which resides in finding the UDID that is published for the SPP service on the embedded device. The Android API doesn't do a great job (not matter how many bug reports I file) of heping you discover this value. I had to find out what it was by other means and hard-code it into applications to get things running (more on that if you're still interested).

  4. Windows Mobile is the winner because you can get around Bluetooth altogether in your code, but still use it. WinMo has a Control Panel for setting up Bluetooth devices, so you can turn on your embedded radio, pair with it, connect, and attach the SPP profile to a COM port...all from the control panel. Then you can use C# and .NET to write your application and connect to your device using the SerialPort class, because it's just another COM port. This keeps you out of the WinMo Bluetooth API (which is low-level C++) or a 3rd party driver like 32Feet.Net (which isn't a bad driver).

Hope that helps. I tried to condense it down more.

江湖彼岸 2024-09-23 07:59:45

我不确定您的应用程序的目标受众是什么,但如果它是内部应用程序或有限的部署应用程序,并且您只是想了解它在移动设备上的工作原理,那么可能值得简单地使用现有的应用程序通过蓝牙将 CSV 文件从嵌入式设备传输到您想要评估的手机,然后使用另一个现有应用程序分析收到的 CSV 文件。

至少有适用于 Android 和 Windows Mobile 的蓝牙文件传输应用程序,我认为在黑莓上也是可能的(但据我所知,尚未正式用于未越狱的 iPhone)。

在这些平台上还有查看和编辑 csv 文件的应用程序(例如,谷歌“Android 电子表格 csv”,您将找到 Android 文件的链接)。

如果您重复执行此操作,手动执行此操作可能会非常痛苦,但它会让您感受到它是如何工作的,并且可能有助于决定使用哪个手机平台(哪个手机平台)的“外观和感觉”部分你可能会发现,在使用了几种不同的手机类型后,你变得更加固执己见了!)

一种稍微偏左的方法可能是在你的嵌入式机器中构建一个 WiFi 接入点(如果可能的话)(我意识到这可能是不可能的。) .) 和文件共享,甚至内置一个简单的 http 服务器来提供数据。后者可以让你使用任何带有 WiFi 和不错的浏览器的手机。

I am not sure what the target audience for your application is, but if it is an in house or limited deployment application and you just want to get a feel for how this might work on a mobile device, it might be worth simply using an existing application to transfer a CSV file over bluetooth from your embedded device to a mobile phone you would like to evaluate, and then another existing application to analyze the received CSV file.

There are bluetooth file transfer applications available for Android and Windows Mobile at a minimum and I think it is possible on blackberry also (but not officially for non jail broken iPhone yet as far as I am aware).

There are also applcitaions to view and edit csv files on these platforms (e.g google 'Android spreadsheet csv' and you will find links for Android ones).

Doing this manually will likely be pretty painful if you are doing it repeatedly but it will let you get a feel for how it might work, and maybe help with the 'look and feel' part of the decision on which phone platform to use (which you may find you are a lot more opinionated on after using several different phone types!)

A slightly more left field approach might be to build a WiFi access point into your embedded machine if this is possible (and I realise it probably is not...) and file share or even have a simple http server built in to provide the data. The latter would allow you use any phone with WiFi and a decent browser.

终遇你 2024-09-23 07:59:45

简单说明一下,我的 Windows Mobile(和桌面)库 32feet.NET 支持 Microsoft 和 Widcomm 堆栈。

Just a quick note that my library 32feet.NET for Windows Mobile (and desktop) supports both Microsoft and Widcomm stacks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文