I'm trying to get a list of the bluetooth addresses (the MAC address-like hex digits unique to each bluetooth device) within range of the bluetooth device inside my mac in the ruby language.
I'm hoping to make my work publicly available, so it'd be nice if it was platform agnostic.
Googling only helps so much:
hcitool etc aren't available on OS X: snippets.dzone.com/posts/show/5764
Ruby_Bluetooth is nearly 4 years old, and I can't make it work!: rubyforge.org/projects/ruby-bluetooth/
Herval is attempting to continue that project, but the git repo is only a day old…
I don't need to create any services or interact with bluetooth in any extensive way, only list the device ids that are within range.
Does anyone have any other ideas? (Even for non ruby, platform specific hcitool equivalents?)
Have you thought about leveraging a Java Bluetooth API and using it from JRuby?
This might make it easier to create platform agnostic code.
For instance bluecove looks like it would cover all the major platforms.
You could go the non-platform specific route and use the native frameworks instead.
For example
RubyCocoa for the bridge between Ruby and Objective-C
OSX's native Bluetooth API Call out to this from Ruby using RubyCocoa
There are other options for other platforms, such as Ruby and Win32OLE/COM.
Related
How is VirtualHere able to virtualize USB devices on macOS without requiring the user to install kernel extensions?
As far as I am aware, there's no documented way to virtualize USB devices on macOS.
The USB/IP project, for example, only supports clients on Windows and Linux.
I understand this is proprietary software but it must be using some technique available to userspace?
Thanks
Really interesting.
Seems they are using the IOUSBHost.framework, which is at most undocumented.
Using it requires getting custom entitlement from Apple:
com.apple.usb.hostcontrollerinterface, which could possibly take a lot of time.
There are some traces that it could be used to create virtual devices, but no details about it.
You could try to use tools like classdump to get some information directly from the framework, or read some headers on github.
It would be great if someone could share any information about it with community, as Apple seems to be very lazy about doing this.
I am exploring some ideas and trying to make three different applications talking each other via bluetooth.
Two of them would run on Android phones, while the third would run on a MacMini. I can use Bluetooth on the Android phones almost without problems by using native extensions, but I am a bit confused about how to access it on the Mac Mini.
Any research about native extension leads me to mobile related links.
Any idea on how I could send and receive data to/from bluetooth on osX?
Is native extensions the way to go? And in case that was the way, do you know if there is any Native Extension available that I can use? Writing one on my own can be a bit overwhelming...
Yes, you'll need a native extension to access Bluetooth on the Mac.
The process should be more or less the same as on mobile, except of course the Mac extension will need to be built to target OS X instead of Android. A quick Google search turned up this article which might help get you headed in the right direction:
How to Create an Adobe AIR Native Extension for Mac OSX
Library FPBluetooth.ane supported platforms iOS+OSX.
I'm primarily a windows developer but I need to port an app to the mac platform.
The app needs access to any scanners plugged into the computer. On windows, I've made use of the WIA library. I was wondering if the mac platform has an equivalent and also if it has bindings for the new Swift language?
Any help would be appreciated. Thanks.
You can access scanners and other devices using ImageKit + ImageCaptureCore. Some of Apple's documentation is very sparse, so you shouldn't be afraid to learn things from the header files (e.g. ICScannerDevice.h). It might help to look at some of the code I wrote for this application, particularly this file.
There is no such thing as "bindings" for Swift, since Swift currently uses the Objective-C runtime and interacts directly with Objective-C. This guide will help.
First, I can't communicate in english very well.
I will develop PKI.
I can control token in firefox, thunderbird but can't control mac native program(ex. safari, mail).
How can I control the token in os x 10.9(mavericks) native program (ex. safari, mail) ?
I heard use tokend but, also heard now tokend is deprecated.
Is that right?
and, I saw macosforge.org. but I didn't know.
frankly speaking, I'm a Windows developer. so, I don't know much about mac development environments.
Hope you can help.
TokenD is technically deprecated (as is the entire CDSA subsystem it sits upon) since at OSX 10.7.
It sounds like you want a PKCS#11 module to work with native components, you may want to take a look at Gemalto's PKCS#11 -> TokenD bridge: https://smartcardservices.macosforge.org/trac/browser/trunk/Tokend/PKCS11
Note that TokenD -> PKCS#11 usage is tricky in that updates to the contents of the PKCS#11 device may or may not show up until you remove/insert the token.
If you are unfamiliar with Mac OSX build environments, you will likely want to hire/contract out with someone familiar with legacy Mac OSX security (I say legacy since the "new" environment does not yet interact with external security devices).
I'm looking at options to access DVB data on OS X. Initially I want to support the EyeTV DTT USB device, but in the long-run I'd like to support a number of popular devices. The problem I have is that there is no standard way of controlling such devices.
All the applications I know of that use them either hide the driver code within the application (for example EyeTV itself, all it's drivers are implemented totally in userspace and are not accessible to external apps), or they use the seemingly defunkt MMInputFamily driver (no source code availible any more, author gone walkabouts).
I've done some research and found that a number of the devices I want to support are supported within the Linux DVB project. Further research indicates that some years ago there was an attempt to abstract the linux implementation so that it could potentially be recompiled on other platforms. The idea being that efforts to support devices should be pooled and the best way to do that would be to make the current open source implementation work on multiple platforms: it seems in the end to have amounted to little however.
The idea of compiling linux drivers against other *nix type platforms has also been taken up elsewhere with some success. The approach the author took is detailed on the page I linked, it seems potentially viable on OS X as well.
At any rate, there seem to be a number of options, but no clear winner:
Find the source code for the MMInputFamily driver, try to get it working on OS X 10.6 and add support for the devices I require, referrencing the linux source code for pointers. Problem: the source code is nowhere to be found, nor is the author. Additionally it seems the author might perhaps have gone down another route had he fully appreciated the previous efforts to port the linux drivers to OS X.
Attempt to port the linux drivers to OS X in a manner similar to the FreeBSD project I linked. Problem: this is very low-level work and work in this layer is not recommended by Apple if it can be avoided.
Write a driver with OS X's IOKit: this is the preferred method for implementing drivers but I would have to do everything from scratch, clearly not a small job.
If I could I would really like to use the Linux source code, but I'm unsure if such a thing is really viable. Does anyone have any advice or ideas on the best way to proceed with this task?