Welcome to MacForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

open Bluetooth port in 10.5

 
   Macintosh computer (Home) -> Programmer Help RSS
Next:  FileMaker Pro Bug Workaround in AppleScript  
Author Message
p2

External


Since: May 19, 2007
Posts: 18



(Msg. 1) Posted: Tue Feb 26, 2008 8:46 pm
Post subject: open Bluetooth port in 10.5
Archived from groups: comp>sys>mac>programmer>help (more info?)

Hi

I have filed thread previously, but it confusing, so i filed it again
properlly.

I used open function to open bluetooth port on MacOS 10.5.1.

My code is as below


int fd = -1;
fd = open(Bluetooth port path,O_RDWR + O_NOCTTY + O_NONBLOCK +
O_EXLOCK); \\it open port successfully
if(fd == -1)
printf("\nPort open failed..");
else
{
printf("\nPort successfully opened..);
close(fd);
fd = -1;
}
fd = open(Bluetooth port path,O_RDWR + O_NOCTTY + O_NONBLOCK +
O_EXLOCK); \\it blocks (no return).


but it hangs in open function, it is not returning....i also tried
with various flags..


I do operation in sequence open then close then again open
immediately...
first time it open successfully .. second time it hand in open. (open
function block)

Note :: Same thing works on MacOS 10.4(it's return success or failed)

What may be the problem ?


p2

 >> Stay informed about: open Bluetooth port in 10.5 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Mac OS Classic port needed (Open Source SDL app for childr.. - Hello there! I'm the author of "Tux Paint," a paint program for kids that's released as Open Source (read: free / libre) for Linux, Windows, and Mac OS X. http://www.newbreedsoftware.com/tuxpaint/ The program is written in C, using the Si...

USB Port Communication - Help? - Does anyone here have any experience writing code to send information to a USB port and receive information back from it? I've done this kind of work in the past with Serial ports, and I'm trying to get up to speed with USB. So far I can find the..

How to Specify port # in BSD Sockets? - I'm using BSD's open() to get my host's socket. The trouble is passing it a specific port -- when I try the app, it returns with "connection refused." I try the same with telnet -- telnet myhost.com 110 -- and it works fine. I specify the port ...

serial port - hi, where can I find information on programming directly against a serial port on a mac? thanks Ole Andre Karlson oleaka@ifi.uio.no

BLuetooth - Hello! Can sy tell me, how can I turn on the internal Bluetoot device without mouse? I need an AppleScript and/or a Terminal command. I always have to use the mouse OR use an AppleScript (to open System Prefs, bring to the front the Bluetooth panel and...
   Macintosh computer (Home) -> Programmer Help All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]