MonoMac.CoreBluetooth and BlueTooth framework

Dear,
i 'm developing with xamarin's mac a demo for connect to a standard SPP Bluetooth device (NO LowEnergy)
On XamMac.dll i found MonoMac.CoreBlueTooth, but this is usefull ONLY with LE BlueTooth devices.
Is there an implementation of IOBluetooth.framework in MonoMac? (for example IOBlueToothDevice ecc)
If no, Are there alternatives ?
My goal is make a unique xamarin frontend for Win/Android/Mac and use a specific DLL for connect to my BT 2.1 SPP device.

Thanks

Posts

  • dlechdlech USMember ✭✭

    I have made bindings for IOBluetooth in my github branch.

  • FalappiCardiolineFalappiCardioline ITMember ✭✭

    Thank David L.
    Your branch will join as soon the official master of the Xamarin Mac > 1.6.x?
    For example: I installed your branch and Xamarin releases update 1.6.3 Xamarin.Mac this overwrites the previous D.L. branch, or i can choose from Xamarin Studio the right reference ?
    How do I install and / or compile your branch?

    thanks

  • dlechdlech USMember ✭✭

    It has been a while since I have used this. I think I was building it from a terminal window by running make (need XCode command line tools to do this). I was not using Xamarin.Mac, so I am not sure if my MonoMac can live side-by-side with Xamarin.Mac. If they can, then I would use Xamarin.Mac in most of your code and use my MonoMac just for the bluetooth stuff. Or you could try extracing the IOBluetooth bindings and making a new dll with just the IOBluetooth bindings like this. I am afraid that I had to fix some things in some of the core libraries though, so this may not work.

    Sorry I am not more helpful, but it has been too long since I looked at this.

  • FalappiCardiolineFalappiCardioline ITMember ✭✭
    edited March 2014

    Dear David,
    a strange things: i see your branch but you have builded the IOBluetoothUI i don't find the IOBluetooth framework, the UI contains only for "showing device selection window"
    I miss somethings?
    The MonoMac.csproj there are more files miss.. i have read it's only for future implementation.
    Thanks a lot

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    You'll notice there's a linked framework (maccore). The readme also clearly states that you need both maccore and monomac packages to build monomac. IOBluetooth is in maccore.

  • dlechdlech USMember ✭✭
    edited March 2014

    Like Dave said, maccore is a submodule of the monomac git repository. You will need to add my maccore git repo as the remote. In the maccore directory, run git remote set-url origin git://github.com/dlech/maccore. Then you should be able to run git submodule update from the monomac directory and the correct commit of maccore will be checked out.

  • dlechdlech USMember ✭✭

    I made a few mistakes above. If you are getting this via email, follow the link to the webpage to see the corrected version.

  • FalappiCardiolineFalappiCardioline ITMember ✭✭
    edited March 2014

    I have successfully compiled the mono branch!
    (i have deleted the sample dir in monomac because there are some compiling errors)

    "David:so I am not sure if my MonoMac can live side-by-side with Xamarin.Mac"
    No, they CAN'T live side-by-side both use the "MonoMac" namespace.

    Now i'm traspose to C# an Objective-C sample "RFCOMM_Open_SPP_Example" for open BT device and
    comunicate in SPP.

    I will ask to XAMARIN to merge your IOBluetooth and IOBluetoothIO branch into the Xam.Mac.dll, if possible? I dont know.

    THANKS A LOT to Dave and David!

  • dlechdlech USMember ✭✭

    This article may help with the side-by-side issue.

  • AshokGelalAshokGelal USMember, Beta ✭✭
    edited March 2014

    I had similar issue a couple of weeks ago - Xamarin not merging my core API changes pull requests (on time). I tried pulling out all kind of tricks; including that dll aliasing that @dlech‌ is mentioning. Nothing worked. Fortunately, they merged the PR at the last moment and it was all unicorns and rainbows everywhere. I'm pretty sure there is a way to use core APIs as an independent dll without having to wait for them to merge a PR. Hopefully, Xamarin guys will write a guide on how to do it and save us from a lot of frustrations and swear words. Fingers crossed.

  • dlechdlech USMember ✭✭

    @FalappiCardioline, if you are still having trouble converting the sample code, post it somewhere and I will have a look at it.

Sign In or Register to comment.