Dear All,
I am currently doing a linux irda project. 
 
My program is running in StrongArm-1110, making use of Ircomm.  The other side is a PC running win98 with a dongle which support SIR mode.  
 
I am using linux 2.4.9 kernel with patches: diff-2.4.9-ac10-rmk2-np1.gz, patch-2.4.9-ac10-rmk2.gz.  After configuring the kernel, the Ircomm is working properly.  After ifconfig irda0 up, the two sides can detect each other.  
 
Then I run my program, I open Ircomm, waiting for input from the PC( hyper terminal) using select.  The problem comes now, when I type anything or press Call button in hyperterminal, the link is brought up, but the link can not be maintained, it keeps being up and down repeatedly.  
 
**************************
Jan  1 00:29:49 SG2 kern.debug ircomm_tty_attach_cable()
<7>ircomm_tty_ias_register()
<7>irlmp_register_client()
 
Jan  1 00:30:19 SG2 kern.debug irlap_change_speed(), setting speed to 115200
 
Jan  1 00:30:20 SG2 kern.debug irlmp_state_active(), Unknown event
LM_LAP_DISCOVERY_CONFIRM
 
Jan  1 00:30:20 SG2 kern.debug iriap_connect_indication()
 
Jan  1 00:30:23 SG2 kern.debug irlap_recv_disc_frame()
<7>irlap_change_speed(), setting speed to 9600
 
Jan  1 00:30:24 SG2 kern.debug irlap_state_ndm(), media busy!
 
Jan  1 00:30:29 SG2 kern.debug irlmp_state_setup_pend() WATCHDOG_TIMEOUT!
 
Jan  1 00:30:31 SG2 kern.debug irlap_change_speed(), setting speed to 115200
 
Jan  1 00:30:32 SG2 kern.debug irlmp_state_setup(), Unknown event
LM_LAP_CONNECT_CONFIRM
<7>iriap_connect_indication()
 
Jan  1 00:30:35 SG2 kern.debug irlmp_state_setup() WATCHDOG_TIMEOUT!
 
Jan  1 00:30:37 SG2 kern.debug irlap_recv_disc_frame()
<7>irlap_state_nrm_p(), RECV_RD_RSP
 
Jan  1 00:30:39 SG2 kern.debug irlap_change_speed(), setting speed to 9600
 
Jan  1 00:30:43 SG2 kern.debug irlap_change_speed(), setting speed to 115200
 
Jan  1 00:30:44 SG2 kern.debug irlmp_state_setup(), Unknown event
LM_LAP_CONNECT_CONFIRM
<7>iriap_connect_indication()
 
Jan  1 00:30:47 SG2 kern.debug irlmp_state_setup() WATCHDOG_TIMEOUT!
 
Jan  1 00:30:49 SG2 kern.debug irlap_recv_disc_frame()
<7>irlap_state_nrm_p(), RECV_RD_RSP
 
Jan  1 00:30:51 SG2 kern.debug irlap_change_speed(), setting speed to 9600
*******************************************************
 
My question is:
1, after open Ircomm, do I need to set the options for linux serial port, e.g. c_iflag, c_oflag, c_lflag, c_cflag...
2, It seems that when one side is going to send data to the other side, it will first send request and wait for response, Do I need to catch the request and answer through my program, or the protocols will handle it?  
3, why the link is not stable?  some bug or my program problem?   
 
Regards.
Jack
     

Reply via email to