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

ERROR : giving up on rtx!



Hi,

I have a problem that I can't find any solution on so therefore I ask you folks on this list if you can.

I am using the OpenBT stack (recently downloaded from the CVS). I have written a program that shall find devices and connect to them. This works pretty good but once in a while I get a "ERROR : giving up on rtx!" from my CSR module. I suppose this means that I have lost contact with the btmodule but I do not think that this problem is related to hardware. I have run different programs that does not do inquiry/connect on the same hardware and it works perfect.

In short, my program works like this:

while(1)
{
        inquiry();
        if(found devices)
        {
                find_free_line();
                connect_to_found_device();
                start_thread_that_reads_from_ttyBTX();
        }
}

This program executes on a dev-board LX with a CSR module. Often it can connect and disconnect devices 20-60 times before "ERROR : giving up on rtx!" occurs.

Anyone who has got the same problem or has any clue what could cause this problem?

Thanks,

Peter


And heres a log showing the situation (there are also some debug from my controll program in this log):

BTRIND: inquiry
BT (driver) __bt_ioctl: HCINQUIRY

[040.596822 <004.020000>] hci_inquiry (9):
0x01 0x01 0x04 0x05 0x33 0x8b 0x9e 0x03 0x07
BD addr 1

[043.981093 <003.384271>] BD (6):
0x00 0x02 0x5b 0xff 0x0a 0x16
BTRIND: efter inquiry
BT (driver) bt_close: Line 7
BT (driver) Unregistering tty on line 7
BT (driver) bt_open: Line 7
BT (driver) Registering tty on line 7 (btgrind)
BT (driver) Now 1 open fd:s for ttyBTC [btgrind]
BT (driver) bt_close: Line 7
BT (driver) Unregistering tty on line 7
BT (driver) bt_open: Line 7
BT (driver) Registering tty on line 7 (btgrind)
BT (driver) Now 1 open fd:s for ttyBTC [btgrind]
BTRIND: connect
BT (driver) __bt_ioctl: BTCONNECT
BT (driver) bt_connect: Connecting srv ch 1 on line 0
          RFCOMM rfcomm_connect_req: server channel:1, line:0
    L2CAP get_con: look for connections in state ANY_STATE (7)
    L2CAP get_con: connection not found
    L2CAP get_lcon: lcid 65 con_list.count = 0
    L2CAP get_lcon: connection lcid : 65 not found
    L2CAP create_con: rcid 0

[046.617291 <002.636198>] bd (6):
0x16 0x0a 0xff 0x5b 0x02 0x00
show_con: insert_con (65:0) [CLOSED] [RFCOMM] r_mtu[672] C[yes] link_up[no]
    L2CAP insert_con: now 1 connections
    L2CAP get_con: look for connections in state ANY_STATE (7)
l2ca_connect_req: wait baseband, sleep on wq 0xc01f0938
    L2CAP get_con: look for connections in state CLOSED (0)
lp_connect_cfm (pos), wake up wq 0xc01f0938
lp_connect_cfm, wake up flag not set
BT SYS: process_event: ACL link is up
l2ca_connect_req: wait baseband, woke up !
l2ca_connect_req: wait rsp, sleep on wq 0xc01f0938
    L2CAP get_lcon: lcid 65 con_list.count = 1
rfcomm_connect_pnd : reason 2
    L2CAP get_lcon: lcid 65 con_list.count = 1
l2cap con rsp, wake up wq 0xc01f0938
          RFCOMM rfcomm_connect_cfm: status 0

[047.471614 <000.854323>] l2cap options:  (0):
l2ca_connect_req: wait rsp, woke up !
    L2CAP get_lcon: lcid 65 con_list.count = 1
    L2CAP get_lcon: lcid 65 con_list.count = 1
BT SYS: Setting remote mtu (65:64) to 53 bytes
          RFCOMM rfcomm_config_ind : remote cid 64
BT SYS: l2cap channel (65,64) [RFCOMM] connected
          RFCOMM rfcomm_config_cfm:
BT SYS: rfcomm_config_cfm: l2cap is now open
          RFCOMM sending sabm
          RFCOMM send_sabm: Creating SABM packet to DLCI 0
    L2CAP get_lcon: lcid 65 con_list.count = 1
          RFCOMM rfcomm_receive_data: UA packet received on line 0
          RFCOMM send_pn_msg: DLCI 0x02, prior:0x07, frame_size:127, credit_flow:f, credits:7, cr:1
    L2CAP get_lcon: lcid 65 con_list.count = 1
          RFCOMM process_mcc
          RFCOMM process_mcc: Received DLC parameter negotiation, PN
          RFCOMM process_mcc: received PN response with:
          RFCOMM process_mcc: Frame size:48
          RFCOMM process_mcc: credit_flow:14
          RFCOMM process_mcc: credits:7
BT SYS: process_mcc: Credit flow control used
          RFCOMM process_mcc: Local credits:7
          RFCOMM process_mcc: process_mcc : mtu set on dlci:2 to 48
          RFCOMM send_sabm: Creating SABM packet to DLCI 2
    L2CAP get_lcon: lcid 65 con_list.count = 1
          RFCOMM rfcomm_receive_data: UA packet received on line 0
BT SYS: bt_register_rfcomm: dlci 2 on line 0
BT (driver) bt_connect_cfm: Line 0 [RCOMM]
          RFCOMM rfcomm_receive_data: successfully connected on DLCI:2
          RFCOMM rfcomm_msc_msg: val:141, cr:1, dlci:2
    L2CAP get_lcon: lcid 65 con_list.count = 1
          RFCOMM process_mcc
          RFCOMM process_mcc: Received Modem status command
          RFCOMM process_mcc: Flow ON, dlci 2
          RFCOMM rfcomm_msc_msg: val:141, cr:0, dlci:2
Connected.
BT (driver) bt_close: Line 7
BTRIND: efter connect
BT (driver) Unregistering tty on line 7
BT (driver) bt_open: Line 0
BT (driver) Registering tty on line 0 (btgrind)
BT (driver) bt_set_termios: Forwarding to serial driver
OnSessionEvent: Connect
Device: btid://00-02-5b-ff-0a-16
'btid://00-02-5b-ff-0a-16' ... 'btid://00-02-5b-ff-0a-16'
OnError: * Info
  situation: pthread_create
  errorcode: 0
  errortext: 'Device thread created'
ERROR : giving up on rtx!
Connected a new device, wait...done

BT (driver) bt_open: Line 7
BT (driver) Registering tty on line 7 (btgrind)
BT (driver) Now 1 open fd:s for ttyBTC [btgrind]
BT (driver) __bt_ioctl: BTREADREMOTEBDADDR
BT SYS: get_remote_bd: 00:02:5b:ff:0a:16
BT (driver) __bt_ioctl: BTREADREMOTEBDADDR
BT SYS: get_remote_bd: 00:00:00:00:00:00
BT (driver) __bt_ioctl: BTREADREMOTEBDADDR
BT SYS: get_remote_bd: 00:00:00:00:00:00
BT (driver) __bt_ioctl: BTREADREMOTEBDADDR
BT SYS: get_remote_bd: 00:00:00:00:00:00
BT (driver) __bt_ioctl: BTREADREMOTEBDADDR
BT SYS: get_remote_bd: 00:00:00:00:00:00
BT (driver) __bt_ioctl: BTREADREMOTEBDADDR
BT SYS: get_remote_bd: 00:00:00:00:00:00
BT (driver) __bt_ioctl: BTREADREMOTEBDADDR
BT SYS: get_remote_bd: 00:00:00:00:00:00
BT (driver) bt_close: Line 7
BT (driver) Unregistering tty on line 7
BT (driver) bt_open: Line 7
BT (driver) Registering tty on line 7 (btgrind)
BT (driver) Now 1 open fd:s for ttyBTC [btgrind]
BTRIND: inquiry
BT (driver) __bt_ioctl: HCINQUIRY

[059.166770 <011.695156>] hci_inquiry (9):
0x01 0x01 0x04 0x05 0x33 0x8b 0x9e 0x03 0x07
hour event 1
start_connect_thread()
gethostbyaddr()
 IP 0100000a
connect_thread(): he is NULL
connect_thread join
inq_timeout: Timeout when waiting for inquiry response