• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using CoreBluetooth from Command Line Tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using CoreBluetooth from Command Line Tool


  • Subject: Re: Using CoreBluetooth from Command Line Tool
  • From: Andras Kovi <email@hidden>
  • Date: Thu, 04 Apr 2013 23:34:50 +0200

Hi Dave,

I haven't tried to run CB in a command line app, but one little note: make sure you don't use WiFi while connected. WiFi and BLE interfere severely on my Mac Mini. I guess it's similar on the MacBook.

Do you want to connect to an i* device or a proprietary one? i* devices change their BLE addresses every few minutes. If you don't use secure connection, then I think they can get out of sync. This is probably the reason why you need to do a scan. Command line or Cocoa should not make any difference IMHO.

Andras

On 2013.04.04., at 22:40, email@hidden wrote:

> Hi,
>
> I'm trying to write a simple command line app that uses CoreBluetooth on an BLE capable mac book (OSX v10.8.3).
>
> If I use the retrievePeripherals I get the delegate didRetrievePeripherals to fire.  If I then try to connect to the found peripheral, the didConnectPeripheral delegate never fires.
>
> However, if I scan for peripherals and get the delegate didDiscoverPeripheral to fire.  I can then connect and connect succeeds.  However, once I'm connected and have my characteristics, the data I receive from my peripheral is not reliably received.
>
> Using similar code in a GUI application works perfect.
>
> Has anyone else been successful running the CoreBluetooth stack from within a command line app?
>
> In my main I essentially create a dispatch_queue and let it run my operations via dispatch_async.  Meanwhile, I let main just call dispatch_main().
>
> -- dave
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Bluetooth-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Using CoreBluetooth from Command Line Tool
      • From: email@hidden
References: 
 >Using CoreBluetooth from Command Line Tool (From: email@hidden)

  • Prev by Date: Using CoreBluetooth from Command Line Tool
  • Next by Date: Re: Using CoreBluetooth from Command Line Tool
  • Previous by thread: Using CoreBluetooth from Command Line Tool
  • Next by thread: Re: Using CoreBluetooth from Command Line Tool
  • Index(es):
    • Date
    • Thread