Zaptel 1.4 - Inappropriate ioctl for device

I am having problems with zaptel 1.4.

This problem occurs on more than one machine

When modprobe wcte11xp
ZT_CHANCONFIG failed on channel 1: Inappropriate ioctl for device (25)

On another machine I get the same problem with a TDM 400 when I modprobe wctdm

If I compile zaptel-1.2.12 and ‘make install’ the problem does not appear.

The Server is a HP ML110 g3 with openSUSE 10.2 with TE110 installed
The other machine is a Dell SC440 with a TDM400 card.

Here is some info on the HP server

cat /etc/zaptel.conf
span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16
loadzone = au
defaultzone=au

gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)

uname -a
Linux olcs-iPBX 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 i686 i686 i386 GNU/Linux

ztcfg -vvvv
Notice: Configuration file is /etc/zaptel.conf
line 5: Unable to read Zaptel version information.

Zaptel Version:
Echo Canceller: t.N=�
Configuration

SPAN 1: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Slaves: 01)
Channel 02: Clear channel (Default) (Slaves: 02)
Channel 03: Clear channel (Default) (Slaves: 03)
Channel 04: Clear channel (Default) (Slaves: 04)
Channel 05: Clear channel (Default) (Slaves: 05)
Channel 06: Clear channel (Default) (Slaves: 06)
Channel 07: Clear channel (Default) (Slaves: 07)
Channel 08: Clear channel (Default) (Slaves: 08)
Channel 09: Clear channel (Default) (Slaves: 09)
Channel 10: Clear channel (Default) (Slaves: 10)
Channel 11: Clear channel (Default) (Slaves: 11)
Channel 12: Clear channel (Default) (Slaves: 12)
Channel 13: Clear channel (Default) (Slaves: 13)
Channel 14: Clear channel (Default) (Slaves: 14)
Channel 15: Clear channel (Default) (Slaves: 15)
Channel 16: D-channel (Default) (Slaves: 16)
Channel 17: Clear channel (Default) (Slaves: 17)
Channel 18: Clear channel (Default) (Slaves: 18)
Channel 19: Clear channel (Default) (Slaves: 19)
Channel 20: Clear channel (Default) (Slaves: 20)
Channel 21: Clear channel (Default) (Slaves: 21)
Channel 22: Clear channel (Default) (Slaves: 22)
Channel 23: Clear channel (Default) (Slaves: 23)
Channel 24: Clear channel (Default) (Slaves: 24)
Channel 25: Clear channel (Default) (Slaves: 25)
Channel 26: Clear channel (Default) (Slaves: 26)
Channel 27: Clear channel (Default) (Slaves: 27)
Channel 28: Clear channel (Default) (Slaves: 28)
Channel 29: Clear channel (Default) (Slaves: 29)
Channel 30: Clear channel (Default) (Slaves: 30)
Channel 31: Clear channel (Default) (Slaves: 31)

31 channels configured.

Changing signalling on channel 1 from Unused to Clear channel
ZT_CHANCONFIG failed on channel 1: Inappropriate ioctl for device (25)

ls -l /dev/zap/
total 0
crw-rw---- 1 asterisk asterisk 196, 1 Dec 19 12:43 1
crw-rw---- 1 asterisk asterisk 196, 10 Dec 19 12:43 10
crw-rw---- 1 asterisk asterisk 196, 11 Dec 19 12:43 11
crw-rw---- 1 asterisk asterisk 196, 12 Dec 19 12:43 12
crw-rw---- 1 asterisk asterisk 196, 13 Dec 19 12:43 13
crw-rw---- 1 asterisk asterisk 196, 14 Dec 19 12:43 14
crw-rw---- 1 asterisk asterisk 196, 15 Dec 19 12:43 15
crw-rw---- 1 asterisk asterisk 196, 16 Dec 19 12:43 16
crw-rw---- 1 asterisk asterisk 196, 17 Dec 19 12:43 17
crw-rw---- 1 asterisk asterisk 196, 18 Dec 19 12:43 18
crw-rw---- 1 asterisk asterisk 196, 19 Dec 19 12:43 19
crw-rw---- 1 asterisk asterisk 196, 2 Dec 19 12:43 2
crw-rw---- 1 asterisk asterisk 196, 20 Dec 19 12:43 20
crw-rw---- 1 asterisk asterisk 196, 21 Dec 19 12:43 21
crw-rw---- 1 asterisk asterisk 196, 22 Dec 19 12:43 22
crw-rw---- 1 asterisk asterisk 196, 23 Dec 19 12:43 23
crw-rw---- 1 asterisk asterisk 196, 24 Dec 19 12:43 24
crw-rw---- 1 asterisk asterisk 196, 25 Dec 19 12:43 25
crw-rw---- 1 asterisk asterisk 196, 26 Dec 19 12:43 26
crw-rw---- 1 asterisk asterisk 196, 27 Dec 19 12:43 27
crw-rw---- 1 asterisk asterisk 196, 28 Dec 19 12:43 28
crw-rw---- 1 asterisk asterisk 196, 29 Dec 19 12:43 29
crw-rw---- 1 asterisk asterisk 196, 3 Dec 19 12:43 3
crw-rw---- 1 asterisk asterisk 196, 30 Dec 19 12:43 30
crw-rw---- 1 asterisk asterisk 196, 31 Dec 19 12:43 31
crw-rw---- 1 asterisk asterisk 196, 4 Dec 19 12:43 4
crw-rw---- 1 asterisk asterisk 196, 5 Dec 19 12:43 5
crw-rw---- 1 asterisk asterisk 196, 6 Dec 19 12:43 6
crw-rw---- 1 asterisk asterisk 196, 7 Dec 19 12:43 7
crw-rw---- 1 asterisk asterisk 196, 8 Dec 19 12:43 8
crw-rw---- 1 asterisk asterisk 196, 9 Dec 19 12:43 9
crw-rw---- 1 asterisk asterisk 196, 254 Dec 19 12:43 channel
crw-rw---- 1 asterisk asterisk 196, 0 Dec 19 12:43 ctl
crw-rw---- 1 asterisk asterisk 196, 255 Dec 19 12:43 pseudo
crw-rw---- 1 asterisk asterisk 196, 253 Dec 19 12:43 timer

I have spent a lot of time trying to sort this without any luck.
Can you help?

hello,

Well, I am also facing the same error. I have installed Zaptel 1.2.12 before.

When i have installed the asterisk 1.4, i realize that i need to install the zaptel 1.4 too, b’coz in case of zaptel 1.2, somehow, asterisk couldn’t realize that it has zaptel, and don’t compile the chan_zap.c. May be i have made some mistake. Please guide me if anybody has already face this problem…

Now, after installing the zaptel 1.4. when i tried to run the ztcfg -vvvv, i got the message like below,

Channel map:

Channel 01: FXS Kewlstart (Default) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)

4 channels configured.

Changing signalling on channel 1 from Unused to FXS Kewlstart
ZT_CHANCONFIG failed on channel 1: Inappropriate ioctl for device (25)

Can anybody please guide me to solve this problem?

Thanking You,

Jigar Thakkar.

Regards,
I am using TDM04B card with asterisk 1.4. I have downloaded and installed Zaptel 1.4.0. Earlier I was using Asterisk 1.2 and Zaptel 1.2 with the same card, and it was working properly. Now when I give the command ztcfg -vvvv, I get the following logs:
Notice: Configuration file is /etc/zaptel.conf
line 4: Unable to read Zaptel version information.

Zaptel Version:
Echo Canceller:
Configuration

Channel map:

Channel 01: FXS Kewlstart (Default) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)

4 channels configured.

Changing signalling on channel 1 from Unused to FXS Kewlstart
ZT_CHANCONFIG failed on channel 1: Inappropriate ioctl for device (25)

The zaptel.conf file
loadzone = us
defaultzone=us
fxsks=1,2,3,4

When i restart the system still i get the same error while loading. Inappropriate ioctl for device (25).

Please guide…

Thanks,
Riyaz Kajalwala

Helluss,
I have succeded in configuring the problem of “Inappropriate ioctl device” with Aterisk 1.4 and Zaptel 1.4… Please dont change the EXTRAVERSION variable in linux kernal source’s MAKEFILE… Just ignore the step suggested at the installation guide and things will work fine…

C ya.

EXTRAVERSION value should be the tail part of the command
cat /proc/version

example : suppose the output of the above command is 2.6.11-1.1369_FC4 then the value of the EXTRAVERSION should be

vi /usr/src/kernels//Makefile

EXTRAVERSION = -1.1369_FC4

Enjoy…

I have changed to Fedora Core 6 (fc6) and everything compiles and loads correctly with no problems.

Until now I have never had to change EXTRAVERSION to get anything working with SUSE or fc6.

In SUSE the EXTRAVERSION information is not the same as the kernel name.
Example
EXTRAVERSION = .2
uname -r
2.6.18.2-34-default
In fc6 these are the same.

I am in the process of changing to fc6 because I am not happy with the stinking Novell - Microsoft (Microvell) deal.

I have the same problem and EXTRAVERSION is properly configured what else can I do ?

Regards,
Fernando

[quote=“riyazkajalwala”]EXTRAVERSION value should be the tail part of the command
cat /proc/version

example : suppose the output of the above command is 2.6.11-1.1369_FC4 then the value of the EXTRAVERSION should be

vi /usr/src/kernels//Makefile

EXTRAVERSION = -1.1369_FC4

Enjoy…[/quote]

UPDATE:

Fixed!!!: I noticed it was a newer 1.4.4 driver in the digium web (I was using 1.2.20). This time it all worked as expected.

The digium card (TE220B) shares the IRQ with the Network card (There is no way to fix it in the Dell BIOS). Still I have read that for PCI-E that must not be a problem.

The zaptel driver gets compiled but with lot of warnnings (is that normal?)

LaPantoja:/usr/src# cat /usr/src/zaptel-1.2.20/make.salida | grep -i warn
/usr/src/zaptel-1.2.20/zaptel-base.c:188: warning: 'fcstab' defined but not used
/usr/src/zaptel-1.2.20/wcfxo.c:911: warning: passing argument 1 of '__constant_c_and_count_memset' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wcfxo.c:962: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wctdm.c:2313: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type
...
/usr/src/zaptel-1.2.20/wctdm.c:2260: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wctdm.c:2273: warning: passing argument 1 of '__constant_c_and_count_memset' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wct1xxp.c:1310: warning: passing argument 1 of '__constant_c_and_count_memset' discards qualifiers from pointer target type
...
/usr/src/zaptel-1.2.20/wcte11xp.c:1541: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/pciradio.c:1761: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type
...
/usr/src/zaptel-1.2.20/wcte12xp.c:1989: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wcte12xp.c:1927: warning: passing argument 1 of '__constant_c_and_count_memset' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wcte12xp.c:1928: warning: passing argument 1 of '__constant_c_and_count_memset' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wcte12xp.c:1942: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wcte12xp.c:1955: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type
...
/usr/src/zaptel-1.2.20/wct4xxp/base.c:3182: warning: passing argument 1 of '__constant_c_memset' discards qualifiers from pointer target type
/usr/src/zaptel-1.2.20/wctc4xxp/base.c:1813: warning: passing argument ...
LaPantoja:/usr/src/libpri-1.4.1# gcc --version
gcc (GCC) 4.2.1 (Debian 4.2.1-3)

Modprobe load modules with no complains.

modprobe -a zaptel
Zapata Telephony Interface Registered on major 196
Zaptel Version: 1.2.20
Zaptel Echo Canceller: MG2
modprobe -a wct4xxp
(no output)
LaPantoja:/usr/src# uname -a
Linux LaPantoja 2.6.22-1-686 #1 SMP Sun Jul 29 14:37:42 UTC 2007 i686 GNU/Linux
02:08.0 Communication controller: Digium, Inc. Unknown device 0220 (rev 02)
        Subsystem: Unknown device 0004:0000
        Flags: bus master, medium devsel, latency 32, IRQ 15
        Memory at fe9ffc00 (32-bit, non-prefetchable)

04:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 11)
        Subsystem: Dell Unknown device 01e6
        Flags: bus master, fast devsel, latency 0, IRQ 15
        Memory at 00000000fe6f0000 (64-bit, non-prefetchable)
        Capabilities: [48] Power Management version 2
        Capabilities: [50] Vital Product Data
        Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/3 Enable-
        Capabilities: [d0] Express Endpoint IRQ 0
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [13c] Virtual Channel
LaPantoja:/usr/src# ztcfg -vvv
Notice: Configuration file is /etc/zaptel.conf
line 13: Unable to read Zaptel version information.

Zaptel Version: Unknown
Echo Canceller: Unknown
Configuration
======================

SPAN 1: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 2: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Slaves: 01)
Channel 02: Clear channel (Default) (Slaves: 02)
Channel 03: Clear channel (Default) (Slaves: 03)
Channel 04: Clear channel (Default) (Slaves: 04)
Channel 05: Clear channel (Default) (Slaves: 05)
Channel 06: Clear channel (Default) (Slaves: 06)
Channel 07: Clear channel (Default) (Slaves: 07)
Channel 08: Clear channel (Default) (Slaves: 08)
Channel 09: Clear channel (Default) (Slaves: 09)
Channel 10: Clear channel (Default) (Slaves: 10)
Channel 11: Clear channel (Default) (Slaves: 11)
Channel 12: Clear channel (Default) (Slaves: 12)
Channel 13: Clear channel (Default) (Slaves: 13)
Channel 14: Clear channel (Default) (Slaves: 14)
Channel 15: Clear channel (Default) (Slaves: 15)
Channel 16: D-channel (Default) (Slaves: 16)
Channel 17: Clear channel (Default) (Slaves: 17)
Channel 18: Clear channel (Default) (Slaves: 18)
Channel 19: Clear channel (Default) (Slaves: 19)
Channel 20: Clear channel (Default) (Slaves: 20)
Channel 21: Clear channel (Default) (Slaves: 21)
Channel 22: Clear channel (Default) (Slaves: 22)
Channel 23: Clear channel (Default) (Slaves: 23)
Channel 24: Clear channel (Default) (Slaves: 24)
Channel 25: Clear channel (Default) (Slaves: 25)
Channel 26: Clear channel (Default) (Slaves: 26)
Channel 27: Clear channel (Default) (Slaves: 27)
Channel 28: Clear channel (Default) (Slaves: 28)
Channel 29: Clear channel (Default) (Slaves: 29)
Channel 30: Clear channel (Default) (Slaves: 30)
Channel 31: Clear channel (Default) (Slaves: 31)
Channel 32: Clear channel (Default) (Slaves: 32)
Channel 33: Clear channel (Default) (Slaves: 33)
Channel 34: Clear channel (Default) (Slaves: 34)
Channel 35: Clear channel (Default) (Slaves: 35)
Channel 36: Clear channel (Default) (Slaves: 36)
Channel 37: Clear channel (Default) (Slaves: 37)
Channel 38: Clear channel (Default) (Slaves: 38)
Channel 39: Clear channel (Default) (Slaves: 39)
Channel 40: Clear channel (Default) (Slaves: 40)
Channel 41: Clear channel (Default) (Slaves: 41)
Channel 42: Clear channel (Default) (Slaves: 42)
Channel 43: Clear channel (Default) (Slaves: 43)
Channel 44: Clear channel (Default) (Slaves: 44)
Channel 45: Clear channel (Default) (Slaves: 45)
Channel 46: Clear channel (Default) (Slaves: 46)
Channel 47: D-channel (Default) (Slaves: 47)
Channel 48: Clear channel (Default) (Slaves: 48)
Channel 49: Clear channel (Default) (Slaves: 49)
Channel 50: Clear channel (Default) (Slaves: 50)
Channel 51: Clear channel (Default) (Slaves: 51)
Channel 52: Clear channel (Default) (Slaves: 52)
Channel 53: Clear channel (Default) (Slaves: 53)
Channel 54: Clear channel (Default) (Slaves: 54)
Channel 55: Clear channel (Default) (Slaves: 55)
Channel 56: Clear channel (Default) (Slaves: 56)
Channel 57: Clear channel (Default) (Slaves: 57)
Channel 58: Clear channel (Default) (Slaves: 58)
Channel 59: Clear channel (Default) (Slaves: 59)
Channel 60: Clear channel (Default) (Slaves: 60)
Channel 61: Clear channel (Default) (Slaves: 61)
Channel 62: Clear channel (Default) (Slaves: 62)

62 channels configured.

Changing signalling on channel 1 from Unused to Clear channel
ZT_CHANCONFIG failed on channel 1: Inappropriate ioctl for device (25)
LaPantoja:/usr/src# lsmod 
Module                  Size  Used by
zttranscode             7688  0 
ipv6                  236932  14 
ext3                  121192  1 
jbd                    55304  1 ext3
mbcache                 8260  1 ext3
dm_snapshot            16516  0 
dm_mirror              20896  0 
dm_mod                 52000  2 dm_snapshot,dm_mirror
loop                   16932  0 
wct4xxp               278312  0 
firmware_class          9504  1 wct4xxp
zaptel                178180  4 zttranscode,wct4xxp
crc_ccitt               2144  1 zaptel
i2c_i801                8656  0 
shpchp                 31060  0 
pci_hotplug            29184  1 shpchp
i2c_core               23552  1 i2c_i801
psmouse                36016  0 
iTCO_wdt                9924  0 
evdev                   9312  0 
serio_raw               6692  0 
pcspkr                  3104  0 
rtc                    12856  0 
xfs                   503096  4 
sd_mod                 27136  7 
ata_piix               13348  6 
ata_generic             7556  0 
piix                    8868  0 [permanent]
libata                115600  2 ata_piix,ata_generic
scsi_mod              136620  2 sd_mod,libata
generic                 4836  0 [permanent]
ide_core              113764  2 piix,generic
tg3                   100260  0 
thermal                13416  0 
processor              31016  1 thermal
fan                     4836  0 

Postcript: Nothing to do with “LaPantoja” hostname. Ask Nestu for more info (lunar-linux.org/~nestu/)

The actual problem is that the installation of zaptel from 1.2 to 1.4 moved the location where the drivers are installed. So modprobe is still loading the 1.2 drivers. Do a find for the the modules you are using. You should see two different locations for the module in you current kernels directory. Figure out which is the old versions by doing an ls on the files. Remove the old files and make symlinks to the new ones in its place.

The way to tell that this is your problem is that following lines show up in ztcfg’s output

Zaptel Version:
Echo Canceller:

Notice that there is no Zaptel version. This is because ztcfg is for the new zaptel driver but is loading the old one.

hello, i have the same problem, updating asterisk from 1.2 to 1.4 in Opensuse 10.2.
Have someone solve this problem??

Thanks