• 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: How to set up a serial port with a paired BT device and get the file descriptor of it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set up a serial port with a paired BT device and get the file descriptor of it


  • Subject: Re: How to set up a serial port with a paired BT device and get the file descriptor of it
  • From: Alexander Traud <email@hidden>
  • Date: Fri, 10 Feb 2012 08:49:06 +0100
  • Thread-topic: How to set up a serial port with a paired BT device and get the file descriptor of it

> i'd like to set up a serial port to the paired device, and get the file
> descriptor of it.

Introduction to Accessing Hardware From Applications (I/O Kit)
<https://developer.apple.com/library/mac/#documentation/DeviceDrivers/Concep
tual/AccessingHardware/>

Introduction to Device File Access Guide for Serial I/O (tty)
<https://developer.apple.com/library/mac/#documentation/DeviceDrivers/Concep
tual/WorkingWSerial/WWSerial_Intro/>

Code Example
<https://developer.apple.com/library/mac/#samplecode/SerialPortSample/>

> This is intended to be a mac port of an existing software, and thus i need to
> use the file descriptor to write/read to/from the serial port rather than
> using the available rfcomm methods at the framework.

IOBluetooth does not help then. However, I recommend to go for IOBluetooth
because with tty Bluetooth ports my experience is rather bad ­ difficult to
set-up or to auto-detect new devices.

If you code in Objective-C, Xcode (Developer Tools) installed several
examples in Macintosh HD » Developer » Examples » Bluetooth. Your¹s are
RFCOMMClientSample and RFCOMM_Open_SPP_Example.

If you code in Java, I recommend to look at BlueCove
<http://code.google.com/p/bluecove/wiki/Documentation>. It bridges
IOBluetooth to JSR-82, an standard Java API for Bluetooth access
<http://www.jcp.org/en/jsr/detail?id=82>. BlueCove even works in Windows and
is open source ­ it is another code example for C.

If you code in REALbasic, have a look at the bridge, I made on my own
<http://www.traud.de/realbasic/IOBluetooth.img> which is open source, too.
The latest version is available on request.

If you (really) want to link between IOBluetooth and tty ­ for
auto-detection and device selection ­, I traversed IORegistry of IOKit. An
example is in my REALbasic bridge.



 _______________________________________________
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


References: 
 >How to set up a serial port with a paired BT device and get the file descriptor of it (From: Anton Albajes-Eizagirre <email@hidden>)

  • Prev by Date: speed up the BLE connection progress
  • Next by Date: long service/characteristic discovery times in BLE
  • Previous by thread: Re: How to set up a serial port with a paired BT device and get the file descriptor of it
  • Next by thread: How to use iOS Simulator to test BLE?
  • Index(es):
    • Date
    • Thread