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

[bluetooth-dev] BT_CTRL_TTY & /dev/ttyBTx ..!



Sir,
     Could anyone please tell me the difference
between BT_CTRL_TTY and /dev/ttyBTx.Do we need to use
both at the same time?
Thank you

    while(1){
    if((bt_cfd = bt_openctrl()) < 0)
      {
        perror("Could not open BT Control device");
        exit(1);
      }

    if(!bt_isinitiated(bt_cfd))
      {
        printf("Stack not initianted ,exit\n");
        exit(1);
      }
    printf("Reading proc file\n");
    pFile = fopen("/proc/bt_channel_con","r");
    if(pFile == 0)
      perror("fopen");
    temp = fread(buffer, 5, 1, pFile);
    printf("Connect on bt_cfd %d,temp %d buffer %s
line %c\n", bt_cfd,temp,buffer,buffer[0]);
    fclose(pFile);
    sprintf(t1,"%c",buffer[0]);
    sprintf(t2,"%c",buffer[2]);
    line = atoi(t1);
    srv_ch = atoi(t2);
    printf("Is Connected %d on line %d and channel
%d\n",bt_isconnected(bt_cfd,line),line,srv_ch);
    bt_showstatus();
    if(srv_ch == 5){
    if(bt_isconnected(bt_cfd,line))
    {
    read_remote_bd(bt_cfd,line,bd_addr);
    printf("Remote addr %x:%x:%x:%x:%x:%x\n"
,bd_addr[0],bd_addr[1],bd_addr[2],bd_addr[3],bd_addr[4],bd_addr[5]);
    dev = AP_add_devices(bd_addr,"0000");
    dev->tty = AP_bt_ttys[line].tty;
    
        }
    }



__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com