[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] question of bluetooth



 hi:
  I have read the file of 'bluetooth.c' and  I have 
tried to write an application for it to complete the 
simple function of receiving and sending data,but I
found I cann't receive the data I send.
    I use the following code to complete the sending
function:
        fd=open("/dev/ttyS0",......);
        bt_fd=open("/dev/ttyBT0",....);
                  .
                  .
        scanf("%s",buf);
        write(bt_fd,buf,strlen(buf));
        write(fd,buf,strlen(buf));
                  .
                  .
    And I use the following code to try to complete
the
receiving function:
                   .
                   .
         read(fd,buf,strlen(buf));
         read(bt_fd,buf,strlen(buf));
         write(1,buf,strlen(buf));
                   .
                   .
    But I cann't receive the data I send.I'm perplexed
over it very much .I wish you can help me out.
    Thanks and happy new year.

                               
                          email:daiyongus@xxxxxxx.com

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com