It's looking like the problem is related to the framing of the received
data. When I set debugging to level 2 and add some additional debugging
statements to wrapper.c, I get the following output (with annotations in
CAPS). I get 'incomplete frames' while I try to send user data. The
incomplete frame appears just before the frame with the data. This only
seems to happen when sending user data. Other times there are no incomplete
frames.
Any ideas out there?
Thanks,
Robert
.
.
.
<7>irda_extract_integer(), pi=0x0, pl=1, pi=4
<7>ircomm_param_service_type(), services in common=04
<7>ircomm_param_service_type(), resulting service type=0x04
<7>ircomm_tty_send_initial_parameters(), data-rate = 0
<7>ircomm_tty_send_initial_parameters(), data-format = 0
<7>ircomm_tty_send_initial_parameters(), flow-control = 0
<7>ircomm_param_request()
<7>ircomm_param_data_rate(), data rate = 9600
<7>irda_insert_integer(), pi=0x10, pl=4, pi=9600
<7>ircomm_param_request(), skb->len=6
<7>ircomm_param_request()
<7>irda_insert_integer(), pi=0x11, pl=1, pi=3
<7>ircomm_param_request(), skb->len=9
<7>ircomm_param_request()
<7>ircomm_param_flow_control(), flow control = 0x00
<7>irda_insert_integer(), pi=0x12, pl=1, pi=0
<7>ircomm_param_request(), skb->len=12
<7>ircomm_param_request()
<7>irda_insert_integer(), pi=0x20, pl=1, pi=12
<7>ircomm_param_request(), skb->len=15
<7>ircomm_tty_link_established()
<7>ircomm_tty_link_established(), starting hardware!
<7>irda_extract_integer(), pi=0x10, pl=4, pi=9600
<7>ircomm_param_data_rate(), data rate = 9600
<7>irda_extract_integer(), pi=0x11, pl=1, pi=3
<7>irda_extract_integer(), pi=0x12, pl=1, pi=0
<7>ircomm_param_flow_control(), flow control = 0x00
<7>irda_extract_integer(), pi=0x20, pl=1, pi=12
<7>ircomm_tty_check_modem_status()
<7>ircomm_tty_do_softint()
<7>ircomm_control_request()
<7>ircomm_ttp_data_request(), clen=15
Jan 1 05:30:13 Linux kern.debug ircomm_param_request()
<7>irda_insert_integer(), pi=0x20, pl=1, pi=12
<7>ircomm_param_request(), skb->len=3
<7>ircomm_tty.c(372):block_til_ready after blocking on ircomm open_count=1
Jan 1 05:30:13 Linux kern.debug ircomm_tty_do_softint()
<7>ircomm_control_request()
<7>ircomm_ttp_data_request(), clen=3
Jan 1 05:30:13 Linux kern.debug ircomm_tty_ioctl()
Jan 1 05:30:13 Linux kern.debug state_inside_frame(), got: 160
<7>state_inside_frame(), got: 16
<7>state_inside_frame(), got: 16
<7>state_inside_frame(), got: 0
<7>state_inside_frame(), got: 3
<7>state_inside_frame(), got: 32
v-- LOOKS OK TILL
HERE
Jan 1 05:30:13 Linux kern.debug state_inside_frame(), Discarding incomplete
frame
<7>state_inside_frame(), got: 162
<7>state_inside_frame(), got: 16
<7>state_inside_frame(), got: 16
<7>state_inside_frame(), got: 0
<7>state_inside_frame(), got: 0
<7>state_inside_frame(), got: 97 <-- here is the data
I'm catting
from the other
sending side
Jan 1 05:30:13 Linux kern.debug state_inside_frame(), got: 10
<7>state_inside_frame(), got: 98
<7>state_inside_frame(), got: 98
<7>state_inside_frame(), got: 10
<7>state_inside_frame(), got: 99
<7>state_inside_frame(), got: 99
<7>state_inside_frame(), got: 99
<7>state_inside_frame(), got: 10
Jan 1 05:30:13 Linux kern.debug state_inside_frame(), got: 100
<7>state_inside_frame(), got: 100
<7>state_inside_frame(), got: 100
<7>state_inside_frame(), got: 100
<7>state_inside_frame(), got: 10
<7>state_inside_frame(), got: 101
<7>state_inside_frame(), got: 101
<7>state_inside_frame(), got: 101
Jan 1 05:30:13 Linux kern.debug state_inside_frame(), got: 101
<7>state_inside_frame(), got: 101
<7>state_inside_frame(), got: 10
<7>state_inside_frame(), got: 102 <- DATA LOOKS
GOOD
.
.
.
Jan 1 05:30:13 Linux kern.debug state_inside_frame(), got: 117 <-- DATA
LOOKIN GOOD
<7>state_inside_frame(), got: 117
<7>state_inside_frame(), got: 117
<7>state_inside_frame(), got: 117
<7>state_inside_frame(), got: 117
<7>state_inside_frame(), got: 117
<7>state_inside_frame(), got: 117
<7>state_inside_frame(), got: 117
Jan 1 05:30:13 Linux kern.debug state_inside_frame(), got: 117
<7>state_inside_frame(), got: 117 <- END
OF MY DATA
<7>state_inside_frame(), got: 10
<7>state_inside_frame(), got: 48
<7>state_inside_frame(), got: 144
<7>state_inside_frame(), EOF: 193
Jan 1 05:30:14 Linux kern.debug state_inside_frame(), got: 177
<7>state_inside_frame(), got: 202
<7>state_inside_frame(), got: 200
<7>state_inside_frame(), EOF: 193 <-
PROMISING
Jan 1 05:30:14 Linux kern.debug state_inside_frame(), got: 160
<7>state_inside_frame(), got: 16
<7>state_inside_frame(), got: 16
<7>state_inside_frame(), got: 0
<7>state_inside_frame(), got: 3
<7>state_inside_frame(), got: 32
v--- SAME ERROR
HAPPENS AGAIN
Jan 1 05:30:14 Linux kern.debug state_inside_frame(), Discarding incomplete
frame
<7>state_inside_frame(), got: 178
<7>state_inside_frame(), got: 16
<7>state_inside_frame(), got: 16
<7>state_inside_frame(), got: 0
<7>state_inside_frame(), got: 0
<7>state_inside_frame(), got: 97 <- MY DATA AGAIN
Jan 1 05:30:14 Linux kern.debug state_inside_frame(), got: 10
<7>state_inside_frame(), got: 98
<7>state_inside_frame(), got: 98
-----Original Message-----
From: Whaley, Robert
Sent: Sunday, February 10, 2002 3:16 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [Linux-IrDA] IRDA discovery works, but nothing else does
Still having this problem. I switched to 2.4.17 irda modules and all the
irda stuff is modules - no irda stuff in the kernel. My test script looks
like this:
insmod ./irda.o
insmod ./ircomm.o
insmod ./ircomm-tty.o
insmod ./irtty.o
insmod ./sa1100_ir.o
irattach irda0 -s 1
echo 38400 > /proc/sys/net/irda/max_baud_rate
Then after checking that discovery has worked, on one computer I enter:
cat /dev/ircomm0 > /tmp/irda.out
and on the other computer:
cat a_big_file > /dev/ircomm0
The first time the sending cat returns immediately. The second time it
hangs for minutes until I kill it. The receiving side times out after a
minute or so without writing anything to /tmp/irda.out
With a scope I can see stuff happening on the Rx and Tx pins of the IRDA
transceiver. But it doesn't look like normal async ascii characters.
If someone out there could point me to a resonable debugging strategy, I
would be greatly appreciative.
dmesg on the sending side says:
irda_init()
IrCOMM protocol (Dag Brattli)
irlap_change_speed(), setting speed to 9600
ircomm_tty_attach_cable()
ircomm_tty_ias_register()
irlap_change_speed(), setting speed to 38400 ircomm_param_service_type(),
services in common=06 ircomm_param_service_type(), resulting service
type=0x04 ircomm_param_port_type(), port type=0
ircomm_tty_close()
ircomm_tty_shutdown()
ircomm_tty_detach_cable()
ircomm_close()
ircomm_tty_attach_cable()
ircomm_tty_ias_register()
IrLAP, no activity on link!
irlmp_state_setup() WATCHDOG_TIMEOUT!
IrLAP, no activity on link!
IrLAP, no activity on link!
IrLAP, no activity on link!
irlap_change_speed(), setting speed to 9600
ircomm_tty_close()
ircomm_tty_shutdown()
ircomm_tty_detach_cable()
ircomm_close()
-----Original Message-----
From: Whaley, Robert [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:20 PM
To: [EMAIL PROTECTED]
Subject: [Linux-IrDA] IRDA discovery works, but nothing else does
I'm trying to get a single board computer with StrongARM SA1110 processor to
run IRDA. I'm using linux 2.4.9.
Discovery seems to work well on everything I have tried to connect to (Palm,
Cassiopeia, Win2000 laptop, other SBCs). But I seem to be unable to
transfer data using IrNET, IrLAN, or IrCOMM.
Right now I'm testing by trying to get 2 of my single board computers to
talk with each other using IrCOMM.
I have sa1100_ir.o and irda.o built into the kernel and everything else is a
module.
To get things started, on both systems I run:
insmod ./ircomm.o
insmod ./irtty.o # (or ./irport.o)
insmod ./ircomm-tty.o
irattach irda0 -s 1
echo 38400 > /proc/sys/net/irda/max_baud_rate
echo 9 > /proc/sys/net/irda/debug
The at this point discovery seems to work fine. Both computers have good
looking discovery entries for the other one.
So I try to send something across from one to the other.
On the first computer I run:
cat /dev/ircomm0 > /tmp/foo
On the second computer I run:
echo foobarbaz > /dev/ircomm0
The 'cat' on the first computer seems to wait for some data to come over the
port, but eventually it returns with zero status and outputs nothing.
The 'echo' on the second computer sometimes will return immediately, other
times it hangs forever and eventually I kill it. The characters 'foobarbaz'
never seem to make it from the second computer to the first one.
I get a lot of debugging output. There is so much, that I'm having a hard
time understanding it. I seem to get a lot
of watchdogtimer expirations.
Can anyone point me toward a good debugging strategy from here?
Thanks,
Robert Whaley
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda