Hi
I used open function to open bluetooth port on
MacOS 10.5.1. (configured bluetooth port as RS-232) 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).
I do operation in sequence open then close then
again open immediately... first time it open successfully .. second time
it block in open. (open function block) ...after that open blocks all the
time
Note :: Same thing works on MacOS 10.4
successfully
What may be the problem ?
p2
--
eInfochips Business Disclaimer:
This message may contain confidential, proprietary or legally Privileged
information. In case you are not the original intended Recipient of the
message, you must not, directly or indirectly, use, Disclose,distribute,
print, or copy any part of this message and you are requested to delete
it and inform the sender. Any views expressed in this message are those
of the individual sender unless otherwise stated.Nothing contained in
this message shall be construed as an offer or acceptance of any offer
by eInfochips Limited and/or eInfochips Inc(“eInfochips”) unless sent
with that express intent and with due authority of eInfochips.EInfochips
has taken enough precautions to prevent the spread of viruses. However
the company accepts no liability for any damage caused by any virus
transmitted by this email.
|