Hello Jan,
Its nice to find this forum at-last.
I am writing a driver for SPP on device side in Linux. We have thermal printer board
which has linux as the image.
The problem am facing here is, getting a Event 25 time out in termination phase, when
I connect the cable to parallel port in Windows host.
Below is the sequence of operations between our SPP driver and the Windows host:
1. Host issued negotiation phase for Device Id request in nibble mode (0x04)
2. My driver responding with Event 5.
3. Data read of device id length is happening properly.
4. Once after all the data transmitted to the host, my driver giving Event 13 and 11.
5. There by, Windows host driver is giving a sequence of three termination phase requests.
In which first two termination phases are responding properly,
and in the third termination phase, am getting a Event 25 time out.
And, further windows host repeats the same sequence continuously from 1 to 5.
Upon all this, my driver is working fine and giving device id properly
when I connect to Linux host port. (observed when I run "system-config-printer" tool in Linux host).
I am not getting where am doing wrong, and why this time out is happening from Windows host driver.
Please give me your inputs.
Below is the sequence of some printks (dmesg) taken from my SPP driver on device console:
linux host:
# insmod at91_piospp.ko
[ 196.850000] Driver Name[atmel_spp]
[ 196.860000] SPPDBG: atmel_spp_probe: begin ->
[ 196.860000] SPPINFO: spp_init_module: SPP char module is loaded with dev entry sppdev
(Run "system-config-printer" tool)
# [ 214.450000] Nag: spp_termination_phase
[ 214.460000] SPPNEGO: spp_negotiation_phase: mode - 4, phase - 2
[ 214.470000] SPPNEGO: spp_negotiation_phase: dataAvail - 1
[ 214.480000] Nag: spp_termination_phase
[ 214.630000] SPPNEGO: spp_negotiation_phase: mode - 4, phase - 2
[ 214.640000] SPPNEGO: spp_negotiation_phase: dataAvail - 1
[ 214.660000] Nag: spp_termination_phase
[ 214.880000] SPPNEGO: spp_negotiation_phase: mode - 4, phase - 2
[ 214.890000] SPPNEGO: spp_negotiation_phase: dataAvail - 1
[ 214.910000] Nag: spp_termination_phase
windows host:
# insmod at91_piospp.ko
[42949383.910000] Driver Name[atmel_spp]
[42949383.910000] SPPDBG: atmel_spp_probe: begin ->
[42949383.920000] SPPINFO: spp_init_module: SPP char module is loaded with dev entry sppdev
(simply attach cable to Windows host)
# [42949385.340000] SPPNEGO: spp_negotiation_phase: mode - 4, phase - 2
[42949385.350000] SPPNEGO: spp_negotiation_phase: dataAvail - 1
[42949385.350000] Nag: spp_termination_phase
[42949385.420000] Nag: spp_termination_phase
[42949385.560000] Nag: spp_termination_phase
[42949386.560000] SPPDBG: spp_termination_phase: Event 25 time out!
[42949386.560000] SPPDBG: spp_1284Active_isr: spp_termination_phase - ERROR
[42949386.570000] Nag: spp_termination_phase
[42949387.570000] SPPDBG: spp_termination_phase: Event 25 time out!
[42949387.570000] SPPDBG: spp_1284Active_isr: spp_termination_phase - ERROR
[42949390.360000] SPPNEGO: spp_negotiation_phase: mode - 4, phase - 2
[42949390.360000] SPPNEGO: spp_negotiation_phase: dataAvail - 1
[42949390.370000] Nag: spp_termination_phase
[42949390.440000] Nag: spp_termination_phase
[42949390.580000] Nag: spp_termination_phase
[42949391.580000] SPPDBG: spp_termination_phase: Event 25 time out!
[42949391.580000] SPPDBG: spp_1284Active_isr: spp_termination_phase - ERROR
[42949391.590000] Nag: spp_termination_phase
[42949392.590000] SPPDBG: spp_termination_phase: Event 25 time out!
[42949392.590000] SPPDBG: spp_1284Active_isr: spp_termination_phase - ERROR
[42949395.370000] SPPNEGO: spp_negotiation_phase: mode - 4, phase - 2
[42949395.380000] SPPNEGO: spp_negotiation_phase: dataAvail - 1
[42949395.390000] Nag: spp_termination_phase
[42949395.450000] Nag: spp_termination_phase
[42949395.590000] Nag: spp_termination_phase
[42949396.600000] SPPDBG: spp_termination_phase: Event 25 time out!
[42949396.600000] SPPDBG: spp_1284Active_isr: spp_termination_phase - ERROR
[42949396.610000] Nag: spp_termination_phase
[42949397.610000] SPPDBG: spp_termination_phase: Event 25 time out!
[42949397.610000] SPPDBG: spp_1284Active_isr: spp_termination_phase - ERROR
[42949400.390000] SPPNEGO: spp_negotiation_phase: mode - 4, phase - 2
[42949400.390000] SPPNEGO: spp_negotiation_phase: dataAvail - 1
[42949400.400000] Nag: spp_termination_phase
[42949400.470000] Nag: spp_termination_phase
[42949400.610000] Nag: spp_termination_phase
[42949401.610000] SPPDBG: spp_termination_phase: Event 25 time out!
[42949401.610000] SPPDBG: spp_1284Active_isr: spp_termination_phase - ERROR
[42949401.620000] Nag: spp_termination_phase
[42949402.620000] SPPDBG: spp_termination_phase: Event 25 time out!
[42949402.620000] SPPDBG: spp_1284Active_isr: spp_termination_phase - ERROR
(repeatedly getting the termination phase sequence ..)
regards,
-Nagesh A