Valutazione 4.87/ 5 (100.00%) 5838 voti



Per tutti i tuoi problemi Linux entra qui e risolvili!

Moderatori: gunter, zendune


Postdi sergioregalia » 04/10/03 02:00

vi fornisco i dati questo è il redame

The software for the UNICORN ADSL PCI card consists of two loadable drivers,
the unicorn_atm.o and unicorn_pci.o. The unicorn driver is a standard Linux
ATM driver, that performs segmentation and reassembly (SAR) and flow control.
The unicorn_pci driver contains the ADSL modem software and hardware related
functions. It has been tested with the Linux 2.4.x kernels. Note that to use
PPPoE, PPPoA or RFC2684 protocols, the kernel may need to be patched.


To compile the drivers, unzip and untar the file. In the unicorn directory you
will find the two subdirectories unicorn_atm and unicorn_bus.
You may compile the drivers based on the include files in the kernel source
or standard kernel include files. Set the variable KERNELDIR in the Makefile's
to point to your kernel sources if the first option in chosen.
If you choose the latter, you may need to copy the contents of the kernel
source "include/net" directory into "/usr/include/net/".
Go into these subdirectories and do a "make" and a "make install".
If the compile option "USE_HW_TIMER" is set, the performance is increased,
but the CPU load increased.
Use the same compiler as you use when compiling the linux kernel. The driver has
been tested using gcc-2.96, gcc-2.95.2, gcc-2.91.66 and gcc 3.0.3.


To start the ADSL software, do a "modprobe unicorn_pci". Check in the syslog that
the drivers are started OK. The ADSL line should come up automatically. The status
can also be checked using the "proc" interface (/proc/net/atm/UNICORN\:0".
SHOWTIME in the log or in the status means that ADSL connction is up and ATM cells
may be transmitted and received.
Depending on your network setup, you will need additional software as with any other
ADSL ATM card. For bridged ethernet (RFC2684), the br2684.o module and brctl is needed.
For PPPoE, any pppoe client over the bridged interface (nas0) should work
(Roaring Penguin pppoe client has been tested).
The scripts directory contains some example startup scripts.

Bridged (RFC2684) and PPP over Ethernet:
Depending on your kernel, you may need to patch the kernel and enable the option
"RFC1483/2684 Bridged protcols" under "Networking options". Also ATM support needs
to be enabled.
Also the user space daemon "brctl" is needed. Instructions on how to apply the
patch and the brctl and patch sources can be found at

PPP over ATM:
For PPP over ATM, the module pppoatm.o is needed, together with the pppd plugin and a version of pppd that supports plugins.
Currently version ppp-2.4.0b2 supports PPPoATM plugins. A patched version ready for
PPPoATM can be found at

PPPoATM specific pppd options:
llc-encaps: use LLC encapsulation for PPPoATM
vc-encaps: use VC multiplexing for PPPoATM (default)


Some ADSL paramters can be controlled by setting the moule paramters.


ActTimeout: Timeout in ms on the duration of the activation state.

ActivationMode: This parameter sets in what mode the ADSL modem should be activated.
ANSI mode is 1, G.lite is 2, G.dmt is 4 and MULTI mode is 3.
If you know what mode your DSLAM operates in, use this mode. If not select either
ANSI or MULTI mode.

DownstreamRate: The maximum downstream rate in Kbit/sec.

AutoActivation: Set this to 1 if you your ADSL modem to start auotmatically (default 1).

DebugLevel: To debug the driver, set this to a value different from 0 and enable DEBUG
when compiling.

MswDebugLevel: 0 - High level, all traces enabled, 1 - Medium level, info and warnings
enabled, 2 - Low level, only warnings and errors are traced.

LCD_Trig: Persistency time (in msec) of Loss of Cell Deliniation defects before
disorderly shutdown (15000 default).

LCD_LOF_Trig: Persistency time (in msec) of Loss of Signal and Loss of Frame defects before
disorderly shutdown (5000 default).

TrainingDelay: Delay in msec used in training sequence. Default 80.

useRFCFixedRate: If 1, rate adaptive disabled. To use with ECI DSLAM in ITU mode.

_no_TS652: If set to 1, enable gain table for use without TS652.


mac_address: If this is specified, the bridged ethernet (RFC2684) will use this
mac (ethernet) address instead of a randomly generated address. Specified as a
12 character ASCII string of hexadecimal numbers.

atmready_timeout: The time in seconds to wait for ADSL link up when opening the ATM
socket (default 20 seconds).

DebugLevel: Set this if you need to debug the driver.


mswtest contains a simple program to start/stop and get statistics from the ADSL card.
Depending on your distribution, you may need to install atm support (atm-2.4.0) to
compile this program.


Version 0.0.5:
- first working version.

Version 0.0.6:
- Corrected an error when performing shutdown of the machine.
- The modem sw compiled with CPU option 386.
- Cleanups in the Makefile's.
- Removed un-compiled code in the ATM driver.

Version 0.0.7:
- Internal version.

Version 0.0.8:
- Simplified the Makefile's.

Version 0.0.9:
- Locking the module (MOD_INC_USE_COUNT) in unicorn_atm_open to be sure that module is
not removed while in use.
- New version of modem software.

Version 0.1.0:
- New modem software (1.0.7D) with fixes for ECI DSLAMs.
- The ActivationMode parameter values has changed. Please update your scripts !

Version 0.1.1:
- Added the _assert_fail function in linrapi.c to support certain versions of
- Fixed a bug where timer structures were allocated but never released that may
cause failures after several hours of operation.
- Cleaned up and added debug code to memory allocation functions is linrapi.c.

Version 0.1.2:
- Initialize timer structure in xsm_create to avoid error when unloading driver.
- Conditionally call complete_and_exit depending on kernel version.

Version 0.1.3:
- New modem software (1.0.7E) with fixes for ECI DSLAMs.
- Test program (cmdtest) added.

Version 0.2.0:
- New modem software (1.0.7e-B-LINUX) that fixes the interoperability problems with ECI DSLAMs
and works in G.dmt mode.
- A kernel panic when halting the machine has been fixed.
- The OBC semaphore in the PCI_xxx functions is only released after PCI bus read.
- Added C++ support for gcc 3.0.

Version 0.2.1:
- Using xtime instead of get_fast_time(), since this function is not longer
exported in kernel 2.4.18.

Version 0.2.2:
- Using del_timer instead of del_timer_sync. This version works with SMP enabled.
- More tracing of MSW parameters.
- Removed some compiler warnings in unicorn_atm.
- New modem software (PCI_1.0.7f).

Version 0.2.3:
- Return an error in unicorn_atm_send if ADSL link is down. This avoids a kernel freeze with pppd.
- Add a prefix to KERN_INFO log messages.
- The "pilot tracking error" is a PRINT_WARNING instead of PRINT_ERROR.

Version 0.2.4:
- Set the PCI DMA access grant timeout to maximum to avoid a problem on ASUS motherboards.
- Use the writel/readl macros to access PCI registers.
- Modem software with UseVCXO to 0 as default in order to connect in ANSI mode.
- Fix a problem detecting linux version.
- Renamed the "cmdtest" folder to "unicorntest".

Version 0.2.6:
- The upstream cell rate calculation has been fixed. The actual link rate should now be quite close
to the theoretical max. This is very important for low speed links.
- New modem software (1.0.7i2).

Version 0.2.7:
- Ooops, forgot some debug code in unicorn_atmdrv.c.

Version 0.2.8:
- Undefined symbol fwrite when using a certain version of libm.a.

Version 0.2.9:
- Cleanups due to porting to PowerPC.
- In timer_callback, restart timer before put_msg to avoid race condition (and kernel panic).
- Make the driver ready for ST70136 AFE.
- OBC timer increased to 250ms.

Version 0.3.0:
- Removed a syslog when calling xtm_stopmsgtimer with invalid timer.
- Do not modify nice value, since the task_struct is dependent on the kernel version.

Version 0.3.1:
- Changed the values of the DMA max burst size.
- Modifications to Makefile.

Version 0.3.2:
- The modem software used by default is the 1.07f version, since this has proved to
be the most stable. This can be changed in the Makefile if needed.
- There was a divide by zero panic if the HZ was greater than 1000.
- Modifications to Makefile.

Version 0.3.3:
- Setting the PCI latency timer to 255 (correctly this time..).

Version 0.3.4:
- Remove #include <libiberty.h> from collect_tors.c
- DBG macro changed to KERN_DEBUG log level.

Version 0.3.5:
- New modem software (1.0.8) that works with Alcatel DSLAM v 4.2.13.
- Using mutex'es to protect access to OBC.
- Compile options moved to Makefile's.

Version 0.3.6:
- Implemented retry in the OBC access functions.
- Do not return error if not SHOWTIME in unicorn_atm_open (compile option).
- The compile option USE_HW_TIMER not defined by default.

Version 0.3.8:
- First working version of USB driver. It only works with the "uhci" host controller driver.
- Some small fixes in unicorn_atmdrv.c to correctly display the link speed.
- Included the libm.a with the modem SW library, since this library is not installed on some recent Linux distributions.
- Simplified the Makefile's and moved the binaries into the arc/i386 subfolder.

Version 0.3.9:
- First version that works with usb-uhci driver. In this case FrameNumber=12 must be passed as module parameter.
- Added a script to establish Routed IP over ATM connections. Note that this script has not been tested.

Version 0.4.0:
- Automatically detect the type of USB Host Controller driver and set FrameNumber accordingly.
- New version (1.0.9) of modem software with new pilot tone detection algorithm.
- Use INT instead of OBC ISOC usb pipes in SHOWTIME.

Version 0.4.1:
- The USB bandwidth needed reduced from 90% to about 30% (512Kbits downstream).
- The driver is now ready for cards and adapters with new Analog Front Ends (20174).

Version 0.4.2:
- Licence added.

Version 0.4.3:
- The unicorn_usbdrv.c now compiles with kernel 2.4.20.

Version 0.4.4:
- Wrong fix in unicorn_usbdrv.c with kernel 2.4.20.
- Removed a few warning printks that are not really errors.

Version 0.4.5:
- Another wrong fix in unicorn_usbdrv.c with kernel 2.4.20.
- Ignoring errors in USB Interrupt Read if length is OK.

Version 0.4.7:
- Added support for AAL0 (raw) cells.
- Added a few ioctl's for the status application (coming later).
- The modem software library has been patched to remove strings containing "gcc2_copmpiled".
The driver now loads correctly on RedHat 8.0.
- The floating point library libm.a is no longer in the package. Please install it if with
your distribution (Mandrake 9.0) it is not installed. It is normally in /usr/lib/.
- There are two transmit queues with different priorities. This is in order to add support
for CBR,VBR streams. This is very preliminary and if you have any comment, please contact me.

Version 0.4.8:
- New graphical application "bewan_adsl_status" that shows the adsl state.
- Automatic detection of of adsl parameters using TR-037 or trial and error ("adsl-autoconfig").
- New start/stop script ("unicorn-adsl") that is using adsl-autoconfig.

Version 0.5.0:
- The source for the graphical application "bewan_adsl_status" included.
- New top-level Makefiles. To build the complete package, go to unicorn and type:
make,make install, make -f Makefile.modules, make -f Makefile.modules install.
- New modem software library compiled with GCC3.
- Correctly handing module versioning.

Version 0.5.1:
- C++ stubs added that was needed if the modules are compiled with GCC 2.
- Changes in the Makefile's, it now checks the PCI register and if there is a unicorn PCI card,
it builds the PCI module else the USB module is built.

Version 0.5.2:
- French localization of bewan_adsl_status finished.
- The unlock_kernel is now called before running the kernel thread.
- Some changes in the Makefile's. If you have both PCI and USB adapters, you can force building
the USB adapter by: make -f Makefile.modules pci install_pci

Version 0.5.3:
- Patches against the latest kernels in "patches" directory.
- Small fix in adsl-autoconfig to not write the config file if VPI,VCI not found.
- README for adsl-autoconfig added.

Version 0.5.4:
- Small modification in unicorntest.
- Small modification in unicorn_atmdrv.c to make it compile on new kernels.

Version 0.5.5:
- Script unicorn-ipoatm, unciorn-adsl and adsl autoconfig modified to work with provider free.

Version 0.6.0:
- New driver with Ethernet (instead of ATM) interface added to project. This driver supports
RFC2684 routed (ipoatm), RFC2684 bridged (br2684,pppoe), and PPP over ATM with standard pppoe
dialers. Note that this driver is in developement and the bewan_adsl_status application
and unicorntest does not work with this driver yet.

Version 0.6.1:
- Small modification in linrapi.c to make it compile with gcc 3.3.
- Added /proc entry for the unicorn_eth driver.

Version 0.6.2:
- Do not wake up tosca thread when disabling tosca soft interrupts.

Version 0.6.3:
- Added lock in CopySoftIntrTable since there are problems on SMP machines.
- The status application is now redimensioanable.

Version 0.6.4:
- Status and unicorntest application works with unicorn_eth drivers.
- Verify encapsulation in unicorn_eth driver.

Version 0.7.0:
- The bus drivers are now statically linked with the net drivers to simplify things.
For example, the PCI ATM driver is now called "unicorn_pci_atm.o",and can be loaded by doing
"insmod unicorn_pci_atm.o".
- Reorganized the files so that source files are not shared between PCI and USB drivers, except
when identical
- The Makefile's has been simplified. To compile and install all drivers and applications,
it is enough to do "make install" as root.
- The scripts has been simplified and will use the ethernet driver for PPPoE, Bridged and
IP over ATM.

Version 0.7.1:
- Implemented OAM loopback in the drivers. This is necessary in order to work with Telecom Italia lines.

Version 0.7.2:
- Removed the 'autoconfig', since I don't think it is used and did not work with the
new OAM loopback in the drivers.
- Added a new 'tools' directory. This contains simple tools to get the status, get the status as a
cgi application and send OAM pings.
- Force the threads to run on CPU #0 only. Hopefully this hack will make it work on SMP.
- Some changes to the Makefile's.

Version 0.7.3:
- unicorntest compiled with DEBUG.
- Remove old versions of the files unicorn_atm.o,unicorn_pci.o and unicorn_usb.o in lib/modules/.

For USB to work correctly, I recommend using kernel 2.4.22 or later, since a lot of bugs has
been fixed in the UHCI and OHCI drivers since early 2.4 kernel releases.
If you have a 2.4.21 kernel (Mandrake 9.1 or 2.4.21-xx) you need to patch the
usb-uhci and usb-ohci drivers to avoid a freeze when starting the unicorn_usb_xxx module.
Copy the patches to the linux source directory and do:
patch -p0 < usb-uhci.patch
patch -p0 < usb-ohci.patch
ora io non so come fare per istallare ho provato a copiare le directory ma mi da come risposta omesse??? ho usato il comando cp /unicorn/unicorn_atm ~/usr/include/net risposta omesso come mai?
io non penso di aver fatto la cosa giusta
datemi una mano ho bisogno di sapere come fare per istallare i driver grazie
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10


Postdi berto81 » 04/10/03 10:37

usa cp -r
$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47

Postdi sergioregalia » 04/10/03 10:47

dimmi se e giusto
linux:/home/sergio # cp -r /unicorn/unicorn_atm ~/usr/include/net
a me dice impossibile fare stat
dove sbaglio io devo copiare il file nella directory usr/include/net
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi berto81 » 04/10/03 13:35

~ significa la tua home directory.
quindi la directory in cui devi copiare i files non è di sicuro ~/usr/include/net, ma probabilmente /usr/include/net
inoltre la directory di origine deve esistere: sei sicuro che ci sia?

comunque, leggendo il readme, mi pare che il comando che hai scritto sopra non c'entri nulla. il readme dice di copiare il contenuto della dir include/net (che si trova sotto alla cartella dove hai scompattato il driver) in /usr/include/net (notare lo / iniziale). tirando a indovinare, il comando che devi dare per copiare i files necessari dovrebbe essere:
cp -r /home/sergio/dir_dove_hai_scompattato/include/net/* /usr/include/net

poi, secondo il readme, dovresti fare cd /usr/include/net e poi fare make && make install.

se mi dai l'indirizzo dove hai scaricato il driver provo a compilarlo e poi ti segno tutti i passi da fare (se ci riesco!).

in ogni caso ti consiglio di procurarti un libro o qualche guida che ti spieghi i comandi della shell e di guardarli un po'. compilare un driver sarà sempre un'impresa se non ti ricordi come funzionano... ;)
$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47

Postdi sergioregalia » 04/10/03 14:35

l'indirizzo è
sezione linux 0.7.3
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

ma qui non c'e nessuno?

Postdi sergioregalia » 04/10/03 21:31

Ragazzi perchè non aiutate le persone cavoli mica tutti sono capaci datemi una mano non penso che ci voglia molto???
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi berto81 » 06/10/03 14:11

scusa ma non ho avuto ancora tempo per compilare il tuo modulo. è un po' che non mi collego da casa. anche adesso sto postando da una macchina windows.
comunque devi pensare che questo non è un servizio di assistenza ;) ... se la gente non ti risp. è perchè non può aiutarti && non ha tempo. mica perchè ce l'ha con te...
$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47

Postdi berto81 » 06/10/03 14:12

|| non && :oops:
$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47

Postdi sergioregalia » 06/10/03 14:57

scusami hai ragione ma appena puoi mi fai sapere qualcosa? :roll:
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi berto81 » 06/10/03 20:13

ho appena visitato il link che hai postato.... sinceramente non riesco a capire dove trovare questi driver unicorn. ho trovato un articolo su come installare i "famosi" eciadsl: ... icle&sid=4

se i driver di cui stai parlando sono questi, le istruzioni sono tutte lì, passo per passo!

altrimenti, scrivimi il link preciso al file che hai scaricato.
$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47

scusami era sbagliato

Postdi sergioregalia » 06/10/03 20:26

si è questo
sotto la voce linux bandiera italia 0.7.3 a presto
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi berto81 » 06/10/03 23:13

per scompattare il file apri una shell e fai:

gunzip bapst-0.7.3.tgz

tar -xvf bapst-0.7.3.tar

per compilare:

cd unicorn
(entra nella cartella creata dalla scompattazione)

(fa partire la compilazione. se non ti dà errori puoi proseguire, altrimenti posta i messaggi di errore)

(serve per "diventare" root, ti chiederà la password di root)

make install
(installa i moduli ottenuti dalla compilazione)

modprobe unicorn_pci
(carica il modulo)

per quanto riguarda come settare la connessione, non posso aiutarti perchè purtroppo non ho ancora l'adsl

$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47

Postdi sergioregalia » 06/10/03 23:30

grazie ti faro sapere presto per ora grazie e mille ;)
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi sergioregalia » 07/10/03 20:02

ho fatto ma mi da un sacco di errori sia in make che in make install non so che fare
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi berto81 » 07/10/03 20:31

potresti postare gli errori, per esempio...
$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47

Postdi sergioregalia » 07/10/03 21:12

va bene un attimo
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi sergioregalia » 07/10/03 21:21

make 1 cgg command not found
main error 127
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi berto81 » 07/10/03 21:37

gcc non cgg vero?

se è così non hai installato il compilatore... usa il tool grafico fornito con la tua distro per installare gcc, ed aventualmente fallo per tutte le altre librerie che non trova.

ps: non ha senso fare make install se prima make non è andato a buon fine.
$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47

Postdi sergioregalia » 07/10/03 21:42

si scusa gcc ma cosa devo fare scusa l'ignoranza dove trovo il tool grafico? come faccio scusami se rompo
Utente Junior
Post: 35
Iscritto il: 02/10/03 18:10

Postdi berto81 » 07/10/03 21:52

intendo il tool grafico per l'installazione dei pacchetti. ogni distribuzione di linux ne ha uno diverso. cercalo nel menù di avvio.
$> man woman
Segmentation fault (core dumped)
Utente Senior
Post: 150
Iscritto il: 24/05/02 21:47


Torna a Software Linux

Topic correlati a "aiutatemi":

Chi c’è in linea

Visitano il forum: Nessuno e 3 ospiti