aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--docs/index.html1
-rw-r--r--docs/sim.html472
-rw-r--r--docs/sim.jpgbin0 -> 176303 bytes
-rw-r--r--docs/style.css9
-rw-r--r--docs/tv.html2
-rwxr-xr-xlayout/telekarte.brd1786
-rwxr-xr-xlayout/telekarte.pdfbin0 -> 18567 bytes
-rwxr-xr-xlayout/telekarte.sch4796
-rw-r--r--src/Makefile.am3
-rw-r--r--src/amps/amps.c4
-rw-r--r--src/amps/amps.h2
-rw-r--r--src/amps/amps_tacs_main.c4
-rw-r--r--src/anetz/anetz.c4
-rw-r--r--src/anetz/anetz.h2
-rw-r--r--src/anetz/main.c2
-rw-r--r--src/bnetz/bnetz.c4
-rw-r--r--src/bnetz/bnetz.h2
-rw-r--r--src/bnetz/main.c2
-rw-r--r--src/cnetz/cnetz.c35
-rw-r--r--src/cnetz/cnetz.h6
-rw-r--r--src/cnetz/dsp.c95
-rw-r--r--src/cnetz/dsp.h2
-rw-r--r--src/cnetz/main.c17
-rw-r--r--src/cnetz/sysinfo.c5
-rw-r--r--src/cnetz/sysinfo.h3
-rw-r--r--src/cnetz/telegramm.c40
-rw-r--r--src/cnetz/telegramm.h2
-rw-r--r--src/eurosignal/eurosignal.c4
-rw-r--r--src/eurosignal/eurosignal.h2
-rw-r--r--src/eurosignal/main.c2
-rw-r--r--src/imts/imts.c4
-rw-r--r--src/imts/imts.h2
-rw-r--r--src/imts/main.c2
-rw-r--r--src/jolly/jolly.c4
-rw-r--r--src/jolly/jolly.h2
-rw-r--r--src/jolly/main.c2
-rwxr-xr-x[-rw-r--r--]src/libdebug/debug.c10
-rw-r--r--src/libdebug/debug.h4
-rw-r--r--src/libdisplay/display_iq.c4
-rw-r--r--src/libdisplay/display_measurements.c2
-rw-r--r--src/libdisplay/display_spectrum.c6
-rw-r--r--src/libdisplay/display_status.c2
-rw-r--r--src/libdisplay/display_wave.c4
-rw-r--r--src/libdtmf/dtmf_decode.c38
-rw-r--r--src/libdtmf/dtmf_decode.h2
-rw-r--r--src/libmncc/mncc_console.c5
-rwxr-xr-x[-rw-r--r--]src/libmobile/call.c3
-rw-r--r--src/libmobile/main_mobile.c57
-rw-r--r--src/libmobile/main_mobile.h2
-rw-r--r--src/libmobile/sender.c15
-rw-r--r--src/libmobile/sender.h7
-rw-r--r--src/liboptions/options.c69
-rw-r--r--src/libsound/sound_alsa.c124
-rw-r--r--src/libwave/wave.c6
-rw-r--r--src/nmt/countries.c8
-rw-r--r--src/nmt/frame.c2
-rw-r--r--src/nmt/main.c2
-rw-r--r--src/nmt/nmt.c4
-rw-r--r--src/nmt/nmt.h2
-rw-r--r--src/r2000/main.c2
-rw-r--r--src/r2000/r2000.c4
-rw-r--r--src/r2000/r2000.h2
-rw-r--r--src/sim/Makefile.am18
-rw-r--r--src/sim/eeprom.h33
-rw-r--r--src/sim/image.c97
-rw-r--r--src/sim/main.c497
-rw-r--r--src/sim/sim.c1444
-rw-r--r--src/sim/sim.h148
-rw-r--r--src/sim/sim.ino287
-rw-r--r--src/sim/sniffer.c798
-rw-r--r--src/sim/sniffer.h26
-rw-r--r--src/zeitansage/main.c2
74 files changed, 10822 insertions, 240 deletions
diff --git a/.gitignore b/.gitignore
index d0f0cd0..9c57ee7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,6 +69,7 @@ src/tv/osmotv
src/radio/osmoradio
src/datenklo/datenklo
src/zeitansage/zeitansage
+src/sim/cnetz_sim
extra/cnetz_memory_card_generator
src/test/test_filter
src/test/test_sendevolumenregler
diff --git a/configure.ac b/configure.ac
index a09e5d6..42921eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,6 +100,7 @@ AC_OUTPUT(
src/radio/Makefile
src/datenklo/Makefile
src/zeitansage/Makefile
+ src/sim/Makefile
src/test/Makefile
src/Makefile
extra/Makefile
diff --git a/docs/index.html b/docs/index.html
index 25dbaa0..ac17e70 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -112,6 +112,7 @@ Additional features:
<ul>
<li><a href="datenklo.html">Das Datenklo</a></li>
<li><a href="tv.html">Osmo TV</a></li>
+ <li><a href="sim.html">C-Netz Sim Card</a></li>
</ul>
</center>
diff --git a/docs/sim.html b/docs/sim.html
new file mode 100644
index 0000000..86d0528
--- /dev/null
+++ b/docs/sim.html
@@ -0,0 +1,472 @@
+<html>
+<head>
+<link href="style.css" rel="stylesheet" type="text/css" />
+<title>osmocom-analog</title>
+</head>
+<body>
+<center><table><tr><td>
+
+<h2><center>C-Netz SIM Emulator</center></h2>
+
+<center><img src="sim.jpg"/></center>
+
+<p>
+Why emulating a SIM card?
+Maybe you got an a C-Netz phone from the attic, friend or Ebay?
+But the SIM card is missing. Without SIM card you cannot use your C-Netz phone at all.
+Then you buy a high price on Ebay to get a used SIM card.
+You find out that the SIM card requires a PIN that you don't know.
+Even if you find a SIM card with no PIN enabled, it may not work with newer phones.
+The emulator can help you in this case.
+</p>
+
+<p>
+Also the emulator can be used to emulate service cards or special cards that enable cell monitoring.
+With this emulator you can modify all subscriber data without restrictions.
+</p>
+
+<ul>
+ <li><a href="#emu">Emulating SIM Card</a>
+ <li><a href="#sniff">Sniffing SIM Card</a>
+ <li><a href="#byo">Build Your Own SIM Card</a>
+ <li><a href="#usage">Using the SIM Card</a>
+ <li><a href="#service">Service Cards</a>
+</ul>
+
+
+<p class="toppic">
+<a name="emu"></a>
+Emulating SIM Card
+</p>
+
+<center><img src="sim-rs232.jpg"/></center>
+
+<p>
+The easiest way to emulate a C-Netz SIM card is to use your Linux PC with a serial interface connected to the card reader of the phone.
+Connection can be made directly via wires or via ISO card PCB.
+You may also use an old ISO card an drill away the chip inside. Then solder thin wires close to the pads and connect them to a serial interface.
+</p>
+
+<p>
+In order to connect the card to your Linux PC, you need a serial-to-USB interface.
+Don't use the 9 pin SUB-D type of interface, because they have level shifters and will brick your phone.
+Use TTL level interface as shown in the image above.
+</p>
+
+<p>
+Because the SIM cards uses TTL level, we can connect a CP2102 controller directly to the card reader of a phone.
+Don't worry about 5 Volts level from the card reader. The CP2102 can handle it.
+In order to connect TX and RX together on one pad of the SIM card, we need to add a diode between the I/O pad and the TX output.
+The cathode must point towards the TX output, so that TX can only pull the I/O line low (0).
+Use a diode with a low forward voltage drop, like a Schottky diode. I use a simple 1n4148 Silicon diode and it works too.
+</p>
+
+<p>
+<font color="red">Important: Some serial interfaces have wrong signal labels.
+TX and RX might be reversed, so that TX is actually an input and RX an ouput.
+You will find out when you connect an Milliamp meter between signal and ground.
+The output will have several Milliamps, but the input doesn't.
+</font>
+</p>
+
+<p>
+<font color="red">Important: Be sure to run your phone on battery and not via gounded power supply.
+If the output of the power supply is grounded, the ground of your power line is also connected to the phone's card reader.
+Voltage spikes on the power line's ground between your PC and your phone may kill the card reader or the USB port.
+Use an isolating transformer!
+</font>
+</p>
+
+<p>
+<font color="red">Important: The serial interface must support 8e2. (8 data bits, even parity, two stop bits)
+I suggest to use the CP2102. If you know other serial interfaces that work, let me know.
+</font>
+</p>
+
+<table><tr>
+<td><img src="sim-contacts.jpg"/></td>
+<td><p>
+Connect Ground to GND.
+<br>
+Connect CTS input to RESET.
+<br>
+Connect RX input to I/O.
+<br>
+Connect TX output via diode to I/O.
+<br>
+(Place cathode towards TX output)
+</p></td>
+</tr></table>
+
+<p>
+To run the emulator, use the "sim" keyword at the end of the command line.
+Use the '-s' option to give the correct serial interface:
+</p>
+
+<pre>
+
+# src/sim/cnetz_sim -s /dev/ttyUSB0 sim
+
+...
+FUTLN=23100001, Sicherungscode=3103, Kartekennung=3, Sonderheitenschluessel=0, Wartungsschluessel=65535
+Telephone directory has 80 entries.
+SIM emulator ready, please start the phone!
+sim.c:1352 info : Reset singnal on (low)
+sim.c:1352 info : Reset singnal off (high)
+sim.c:1371 info : Card has disabled PIN (system PIN '0000') Selecting card #1.
+sim.c:1374 info : Sending ATR
+sim.c:1125 info : RX message
+sim.c:1135 info : control I: N(S)=0 N(R)=0
+sim.c: 473 info : SL-APPL app 3
+sim.c:1222 info : TX resonse
+sim.c:1228 info : control I: N(S)=0 N(R)=1
+sim.c:1125 info : RX message
+sim.c:1135 info : control I: N(S)=1 N(R)=1
+sim.c: 558 info : RD-EBDT
+sim.c:1222 info : TX resonse
+sim.c:1228 info : control I: N(S)=1 N(R)=2
+sim.c:1125 info : RX message
+sim.c:1135 info : control I: N(S)=2 N(R)=2
+sim.c: 473 info : SL-APPL app 4
+sim.c:1222 info : TX resonse
+sim.c:1228 info : control I: N(S)=2 N(R)=3
+sim.c:1125 info : RX message
+sim.c:1135 info : control I: N(S)=3 N(R)=3
+sim.c: 473 info : SL-APPL app 3
+sim.c:1222 info : TX resonse
+sim.c:1228 info : control I: N(S)=3 N(R)=4
+sim.c:1125 info : RX message
+sim.c:1135 info : control I: N(S)=4 N(R)=4
+sim.c: 558 info : RD-EBDT
+sim.c:1222 info : TX resonse
+sim.c:1228 info : control I: N(S)=4 N(R)=5
+sim.c:1125 info : RX message
+sim.c:1135 info : control I: N(S)=5 N(R)=5
+sim.c: 599 info : RD-RUFN (loc=0)
+sim.c: 655 info : 80 numbers can be stored in EEPROM
+sim.c:1222 info : TX resonse
+sim.c:1228 info : control I: N(S)=5 N(R)=6
+sim.c:1352 info : Reset singnal on (low)
+
+</pre>
+
+<p>
+Use '-h' command line option to get a list of all options.
+</p>
+
+
+<p class="toppic">
+<a name="sniff"></a>
+Sniffing SIM Card
+</p>
+
+<p>
+To run the sniffer, use the "sniff" keyword at the end of the command line.
+You only need to connect I/O line to the RX line of your serial interface. (And ground of course!)
+Use the '-s' option to give the correct serial interface:
+</p>
+
+
+<pre>
+
+# src/sim/cnetz_sim -s /dev/ttyUSB0 sniff
+
+sniffer.c: 602 info : ----------------------------------------
+sniffer.c: 609 info : Reading ATR normal bit order:
+sniffer.c: 547 info : TD1 T=14: Refers to transmission protocols not standardized by ISO/IEC JTC 1/SC 17.
+sniffer.c: 590 info : ----------------------------------------
+sniffer.c: 547 info : TD2 T=14: Refers to transmission protocols not standardized by ISO/IEC JTC 1/SC 17.
+sniffer.c: 590 info : ----------------------------------------
+sniffer.c: 418 info : TA3 fsmin = 3 MHz
+sniffer.c: 433 info : TA3 fsmax = 5 MHz (Default)
+sniffer.c: 470 info : TB3 Maximum block size = 42
+sniffer.c: 516 info : TC3 Character Waiting Time = 3
+sniffer.c: 547 info : TD3 T=14: Refers to transmission protocols not standardized by ISO/IEC JTC 1/SC 17.
+sniffer.c: 590 info : ----------------------------------------
+sniffer.c: 440 info : TA4 Block Waiting Time = 4
+sniffer.c: 590 info : ----------------------------------------
+sniffer.c: 595 info : History byte #1: 0x92
+sniffer.c: 595 info : History byte #2: 0x80
+sniffer.c: 595 info : History byte #3: 0x00
+sniffer.c: 595 info : History byte #4: 0x41
+sniffer.c: 595 info : History byte #5: 0x32
+sniffer.c: 595 info : History byte #6: 0x36
+sniffer.c: 595 info : History byte #7: 0x01
+sniffer.c: 595 info : History byte #8: 0x11
+sniffer.c: 690 info : Checksum 0xe4 ok.
+sniffer.c: 697 info : ATR done!
+sniffer.c: 715 info : ----------------------------------------
+sniffer.c: 734 info : Layer 2:
+sniffer.c: 735 info : source 3 -&gt; to 1
+sniffer.c: 737 info : control I: N(S)=0 N(R)=0
+sniffer.c: 744 info : length 15
+sniffer.c: 203 info : Interface control layer ICB1:
+sniffer.c: 207 info : ON-LINE-BIT: 0 = Off-line data
+sniffer.c: 211 info : CONFIRM-BIT: 0 = No meaning
+sniffer.c: 213 info : MASTER/SLAVE-BIT: 1 = Sender is master
+sniffer.c: 219 info : WT-EXTENSION-BIT: 0 = No request for WT-Extension
+sniffer.c: 223 info : ABORT/TERMINATE-BIT: 0 = No meaning
+sniffer.c: 227 info : ERROR-BIT: 0 = No meaning
+sniffer.c: 231 info : CHAINING-BIT: 0 = No more ICL data follows
+sniffer.c: 235 info : ICB-EXTENSION-BIT: 0 = no ICB follows
+sniffer.c: 48 info : Layer 7:
+sniffer.c: 50 info : I = Command
+sniffer.c: 51 info : CLA = 0x02
+sniffer.c: 54 info : -&gt; CNTR (Control Class)
+sniffer.c: 75 info : INS = 0xf1
+sniffer.c: 80 info : -&gt; SL-APPL (Select Application)
+sniffer.c: 180 info : DLNG = 11
+sniffer.c: 187 info : DATA(0) = 0x38 '8' 56
+sniffer.c: 187 info : DATA(1) = 0x39 '9' 57
+sniffer.c: 187 info : DATA(2) = 0x34 '4' 52
+sniffer.c: 187 info : DATA(3) = 0x39 '9' 57
+sniffer.c: 187 info : DATA(4) = 0x30 '0' 48
+sniffer.c: 187 info : DATA(5) = 0x31 '1' 49
+sniffer.c: 187 info : DATA(6) = 0x30 '0' 48
+sniffer.c: 187 info : DATA(7) = 0x30 '0' 48
+sniffer.c: 187 info : DATA(8) = 0x33 '3' 51
+sniffer.c: 187 info : DATA(9) = 0x30 '0' 48
+sniffer.c: 187 info : DATA(10) = 0x31 '1' 49
+sniffer.c: 715 info : ----------------------------------------
+sniffer.c: 734 info : Layer 2:
+sniffer.c: 735 info : source 1 -&gt; to 3
+sniffer.c: 737 info : control I: N(S)=0 N(R)=1
+sniffer.c: 744 info : length 4
+sniffer.c: 203 info : Interface control layer ICB1:
+sniffer.c: 207 info : ON-LINE-BIT: 0 = Off-line data
+sniffer.c: 211 info : CONFIRM-BIT: 0 = No meaning
+sniffer.c: 215 info : MASTER/SLAVE-BIT: 0 = Sender is slave
+sniffer.c: 219 info : WT-EXTENSION-BIT: 0 = No request for WT-Extension
+sniffer.c: 223 info : ABORT/TERMINATE-BIT: 0 = No meaning
+sniffer.c: 227 info : ERROR-BIT: 0 = No meaning
+sniffer.c: 231 info : CHAINING-BIT: 0 = No more ICL data follows
+sniffer.c: 235 info : ICB-EXTENSION-BIT: 0 = no ICB follows
+sniffer.c: 48 info : Layer 7:
+sniffer.c: 142 info : I = Response
+sniffer.c: 143 info : CCRC = 0x05
+sniffer.c: 145 info : -&gt; PIN-NOT-OK
+sniffer.c: 149 info : -&gt; APRC valid
+sniffer.c: 158 info : APRC = 0x02
+sniffer.c: 160 info : -&gt; Bit 2 = 1:PIN-Check required
+sniffer.c: 166 info : -&gt; Bit 3 = 0:Application unlocked
+sniffer.c: 170 info : -&gt; Bit 5 = 0:GEBZ/RUFN unlocked
+sniffer.c: 174 info : -&gt; Bit 6 = 0:GEBZ not full
+sniffer.c: 180 info : DLNG = 0
+sniffer.c: 302 info : Resetting sniffer
+
+</pre>
+
+<p>
+When the phone is switched on, the SIM card is powered up and outputs the ATR sequence (Answer To Reset).
+</p>
+
+<p>
+The first message is a command message that is transmitted from the phone towards the SIM card.
+The layer 2 header indicates the direction and the length of 15 bytes.
+The ICR layer has no meaning with the C-Netz.
+Except for the MASTER/SLAVE-BIT, no other bit is used.
+The layer 7 (application) header indicates the command and the message type and length, followed by 11 bytes of data.
+This command tells the SIM card to select C-Netz application.
+</p>
+
+<p>
+The second message is a response message that is transmitted from the SIM card towards the phone.
+The layer 2 header indicates the direction and the length of 4 bytes.
+The layer 7 header indicates the response and status bits and length, followed by 0 bytes of data.
+The response tells the SIM card that a PIN is required to complete the command.
+The user is prompted to enter the pin.
+</p>
+
+<p>
+To read more about the protocol, and the meaning of messages, refer to <a href="http://download.eversberg.eu/mobilfunk/C-Netz-Dokus/FTZ%20171%20TR%2060%20-%20Anhang%201%20Berechtigungskarte%20als%20Prozessorkarte.pdf">FTZ 171 TR 60 - Anhang 1 Berechtigungskarte als Prozessorkarte.pdf</a>
+</p>
+
+
+<p class="toppic">
+<a name="byo"></a>
+Build Your Own SIM Card
+</p>
+
+<center><img src="sim_layout.png"/></center>
+
+<p>
+You find the PCB drawings inside the "layout" directory of the git repository.
+Be sure to print it without scaling!
+Check if the printed size matches an ISO card.
+Also there is the source files for the 'Eagle' layout program, if you like to change it.
+</p>
+
+<p>
+You may use an "Arduino UNO" or "ATTINY85" to emulate a SIM card without a PC.
+In case of the Arduino, you still need wires to connect it to the card reader of the phone.
+If you use an ATTINY85, you can put the micro controller directly on a PCB card, as shown on top of this page.
+</p>
+
+<p>
+To compile and run with Arduino, you need to open "src/sim/sim.ino" with Arduino software and select the "Arduino UNO" board.
+The RESET input is at pin 6 and the I/O line at pin 7.
+Connect these two lines together with ground line to the card reader or ISO card PCB.
+You don't need a diode this time, since pin 7 is automatically switched between input and output.
+The serial protocol is emulated in software.
+The status LED (pin 13) will flash whenever a message is received from the card reader.
+</p>
+
+<p>
+To compile and run with ATTINY85, you need to open "src/sim/sim.ino" with Arduino software and select the "ATiny25/45/85" board and the "ATiny85" chip.
+Refer to the internet on how to compile and flash the ATTINY85 without boot-loader.
+It is beyond the scope of this documentation.
+This time you need 5 wires to connect (VCC and Clock also).
+</p>
+
+<p>
+<font color="red">Important: After flashing you need to wait 10 seconds before removing power.
+During that time the EEPROM is initialized.
+If you would read out the EEPROM, you will notice the letter 'C' at address 0.
+Then you would know that the init process was finished with success.
+</font>
+</p>
+
+<p>
+If you use the DIP version of the ATTINY85, you cannot put it on the card itself.
+The PCB in the picture on top of this page shows the DIP socket next to the actual card area.
+Be sure to put the chip on the back side of the SIM card.
+This works only if the phone does not completely enclose the card.
+</p>
+
+<p>
+If you use the SOIC version of the ATTINY85, you need to make it flat, so it fits into your phone.
+You may use the full size SIM or just the mini SIM.
+I prefer the mini SIM and use an adapter card for larger phones.
+</p>
+
+<center><img src="sim-attiny85.jpg"/></center>
+
+<p>
+The original ATTINY85 (1) is shown upside down.
+Bend the legs straight and shorten them, so they still fit into a programmer's socket. (2)
+Use P400 sand paper to sand off the bottom of the chip's case, until you reach the copper plate. (3)
+Make a hole into the PBC and solder the chip upside down into that hole.
+Pin 1 is marked on the PCB.
+</p>
+
+<p>
+<font color="red">Important: You need to change clock source to pin 1.
+</font>
+</p>
+
+<p>
+Change lower fuse of 0xc0.
+Note that you will not be able to do any further programming unless you apply clock signal to pin 1.
+Use a crystal oscillator connected to pin 1 when you like to update the firmware in the future.
+You may also use other type of clock signal.
+Try something between 1 and 8 MHz.
+I recommend to use the USBasp or a clone of that. It is cheap and easy and works with USB.
+To set the fuses using "avrdude" in conjunction with "usbasp" flash tool, use:<br>
+<br>
+avrdude -c usbasp-clone -p t85 -U lfuse:w:0xc0:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m<br>
+<br>
+If you run it again, you might notice that there is no response without a clock applied.
+Apply a clock to pin 1 and see if you get a response again.
+</p>
+
+<p class="toppic">
+<a name="usage"></a>
+Using the SIM Card
+</p>
+
+<p>
+After powering up the phone with SIM adapter/emulator attached, the phone should show the default subscriber number (FUTLN) on the display.
+(Not all phones do. Read the manual to get the key code on how to show the subscriber number.)
+There is no PIN enabled by default, so the SIM card is ready after inserting or poweing up the phone.
+Now you can make calls, add telephone numbers or change PIN.
+</p>
+
+<p>
+The SIM card can emulate 8 different cards.
+They share the same telephone directory, but have different subscriber data.
+Subscriber data can be changed to anything you like.
+This way it is possible to even emulate service cards ("Wartungskarten"), to put phones into service mode or special cell monitor mode.
+</p>
+
+<p>
+If the PIN is disabled (default), the first card with first subscriber data is emulates.
+To select different card with dfferent subscriber data, change the PIN to 0001 .. 0008.
+Refer to the phone's manual on how to change the PIN.
+E.g. if you store the PIN 0000 or 0001, the first card with the first subscriber data is emulated.
+E.g. if you store the PIN 0005, the fifth card with the fifth subscriber data is emulated.
+In all cases, there is no PIN required when you turn on the phone.
+</p>
+
+<p>
+<table class="sim">
+<tr><th>PIN</th><th>FUTLN =<br>Subscriber</th><th>Sicherungs-<br>code</th><th>Karten-<br>kennung</th><th>Sonderheiten-<br>schl&uuml;ssel</th><th>Wartungs-<br>schl&uuml;ssel</th></tr>
+<tr><td>0000 or 0001</td><td>2222001</td><td>3103</td><td>3</td><td>0</td><td>65535</td></tr>
+<tr><td>0002</td><td>2222002</td><td>3103</td><td>3</td><td>0</td><td>65535</td></tr>
+<tr><td>0003</td><td>2222003</td><td>3103</td><td>3</td><td>0</td><td>65535</td></tr>
+<tr><td>0004</td><td>2222004</td><td>3103</td><td>3</td><td>0</td><td>65535</td></tr>
+<tr><td>0005</td><td>2222005</td><td>3103</td><td>3</td><td>0</td><td>65535</td></tr>
+<tr><td>0006</td><td>2222006</td><td>3103</td><td>3</td><td>0</td><td>65535</td></tr>
+<tr><td>0007</td><td>2222007</td><td>3103</td><td>3</td><td>0</td><td>65535</td></tr>
+<tr><td>0008</td><td>2222008</td><td>3103</td><td>3</td><td>0</td><td>65535</td></tr>
+</table>
+</p>
+
+<p>
+You may want to use a PIN to select the card whenever you turn on the phone.
+Use the phone to enable a PIN that does not start with "000".
+When you restart your phone, you may enter that PIN, to select the first card.
+Alternatively you may enter the PIN 0000 or 0001, to select the first card, no matter what the PIN was.
+Or you may enter the PIN 0002 .. 0008, to select second to eighth card.
+</p>
+
+<p>
+You may also alter each of the 8 different subscriber data store on the SIM.
+In order to do that, you need to set a PIN, so the phone will ask for a PIN whenever it is turned on.
+Choose any PIN you like, but not a PIN stat starts with 000.
+Turn on the phone and you will be asked for a PIN.
+Enter the PIN 9991 to alter the first subscriber data.
+Enter the PIN 9992 .. 9998 to alter second to eighth subscriber data.
+The subscriber data is shown in the telephone directory and can be altered by changing the numbers in that directory.
+</p>
+
+<p>
+The default subscriber data and where to change them in the telephone directory:
+<br><br>
+<table class="sim">
+<tr><th>Entry</th><th>Name</th><th>Number</th></tr>
+<tr><td>01</td><td>FUTLN</td><td>2222001 *</td></tr>
+<tr><td>02</td><td>Sicherungscode</td><td>3103</td></tr>
+<tr><td>03</td><td>Kartenkennung</td><td>3</td></tr>
+<tr><td>04</td><td>Sonderheitsschl.</td><td>0</td></tr>
+<tr><td>05</td><td>Wartungsschl.</td><td>65535</td></tr>
+</table>
+<br>
+(*) When PIN 9991 was entered.
+</p>
+
+
+<p class="toppic">
+<a name="service"></a>
+Service Cards
+</p>
+
+<p>
+To program one of the following service cards, change the subscriber data to the indicated values.
+</p>
+
+<p>
+<table class="sim">
+<tr><th>Type</th><th>FUTLN =<br>Subscriber</th><th>Sicherungs-<br>code</th><th>Karten-<br>kennung</th><th>Sonderheiten-<br>schl&uuml;ssel</th><th>Wartungs-<br>schl&uuml;ssel</th></tr>
+<tr><td>Siemens C5<br>service mode</td><td>-</td><td>-</td><td>-</td><td>900</td><td>1000</td></tr>
+<tr><td>Philips Miniporty<br>service mode</td><td>-</td><td>-</td><td>-</td><td>900</td><td>1000</td></tr>
+<tr><td>Philips Miniporty<br>cell monitor</td><td>-</td><td>-</td><td>-</td><td>900</td><td>1728 or<br>2729</td></tr>
+<tr><td>Philips Porty<br>service mode</td><td>0</td><td>0</td><td>0</td><td>2304</td><td>-</td></tr>
+<tr><td>Philips Porty<br>cell monitor</td><td>-</td><td>-</td><td>-</td><td>898</td><td>-</td></tr>
+</table>
+</p>
+
+
+<hr><center>[<a href="index.html">Back to main page</a>]</center><hr>
+</td></tr></table></center>
+</body>
+</html>
diff --git a/docs/sim.jpg b/docs/sim.jpg
new file mode 100644
index 0000000..1f2a037
--- /dev/null
+++ b/docs/sim.jpg
Binary files differ
diff --git a/docs/style.css b/docs/style.css
index 06b6850..8232fb6 100644
--- a/docs/style.css
+++ b/docs/style.css
@@ -91,6 +91,15 @@ table.imts {
border-collapse: collapse;
}
+table.sim {
+ width: 816;
+ text-align: left;
+ table-layout: fixed;
+ border-spacing: 0px;
+ border: none;
+ border-collapse: collapse;
+}
+
li {
font-size: 20;
color: #000000;
diff --git a/docs/tv.html b/docs/tv.html
index 81f7122..38f3747 100644
--- a/docs/tv.html
+++ b/docs/tv.html
@@ -27,7 +27,7 @@ The following test signals are supported:
</p>
<p>
-<font color="red">Importaint: SDR is required! It must be capable of about 15 Mega samples per second.</font>
+<font color="red">Important: SDR is required! It must be capable of about 15 Mega samples per second.</font>
<br><br>
If you use LimeSDR, you MUST use USB 3.0 to have enough bandwidth!
</p>
diff --git a/layout/telekarte.brd b/layout/telekarte.brd
new file mode 100755
index 0000000..1592e74
--- /dev/null
+++ b/layout/telekarte.brd
@@ -0,0 +1,1786 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE eagle SYSTEM "eagle.dtd">
+<eagle version="6.3">
+<drawing>
+<settings>
+<setting alwaysvectorfont="no"/>
+<setting verticaltext="up"/>
+</settings>
+<grid distance="0.0125" unitdist="inch" unit="inch" style="dots" multiple="1" display="yes" altdistance="0.0125" altunitdist="inch" altunit="inch"/>
+<layers>
+<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
+<layer number="2" name="Route2" color="1" fill="3" visible="no" active="no"/>
+<layer number="3" name="Route3" color="4" fill="3" visible="no" active="no"/>
+<layer number="4" name="Route4" color="1" fill="4" visible="no" active="no"/>
+<layer number="5" name="Route5" color="4" fill="4" visible="no" active="no"/>
+<layer number="6" name="Route6" color="1" fill="8" visible="no" active="no"/>
+<layer number="7" name="Route7" color="4" fill="8" visible="no" active="no"/>
+<layer number="8" name="Route8" color="1" fill="2" visible="no" active="no"/>
+<layer number="9" name="Route9" color="4" fill="2" visible="no" active="no"/>
+<layer number="10" name="Route10" color="1" fill="7" visible="no" active="no"/>
+<layer number="11" name="Route11" color="4" fill="7" visible="no" active="no"/>
+<layer number="12" name="Route12" color="1" fill="5" visible="no" active="no"/>
+<layer number="13" name="Route13" color="4" fill="5" visible="no" active="no"/>
+<layer number="14" name="Route14" color="1" fill="6" visible="no" active="no"/>
+<layer number="15" name="Route15" color="4" fill="6" visible="no" active="no"/>
+<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>
+<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
+<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
+<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
+<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
+<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
+<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/>
+<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="27" name="tValues" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="28" name="bValues" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="29" name="tStop" color="7" fill="3" visible="no" active="yes"/>
+<layer number="30" name="bStop" color="7" fill="6" visible="no" active="yes"/>
+<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
+<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
+<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
+<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
+<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
+<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
+<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
+<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
+<layer number="39" name="tKeepout" color="4" fill="11" visible="no" active="yes"/>
+<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="yes"/>
+<layer number="41" name="tRestrict" color="4" fill="10" visible="no" active="yes"/>
+<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="yes"/>
+<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="yes"/>
+<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
+<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="46" name="Milling" color="3" fill="1" visible="yes" active="yes"/>
+<layer number="47" name="Measures" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="51" name="tDocu" color="7" fill="1" visible="no" active="yes"/>
+<layer number="52" name="bDocu" color="7" fill="1" visible="no" active="yes"/>
+<layer number="91" name="Nets" color="2" fill="1" visible="no" active="no"/>
+<layer number="92" name="Busses" color="1" fill="1" visible="no" active="no"/>
+<layer number="93" name="Pins" color="2" fill="1" visible="no" active="no"/>
+<layer number="94" name="Symbols" color="4" fill="1" visible="no" active="no"/>
+<layer number="95" name="Names" color="7" fill="1" visible="no" active="no"/>
+<layer number="96" name="Values" color="7" fill="1" visible="no" active="no"/>
+<layer number="97" name="Info" color="7" fill="1" visible="no" active="no"/>
+<layer number="98" name="Guide" color="6" fill="1" visible="no" active="no"/>
+<layer number="200" name="200bmp" color="1" fill="10" visible="no" active="no"/>
+</layers>
+<board>
+<plain>
+<wire x1="0" y1="0" x2="85.6" y2="0" width="0" layer="20"/>
+<wire x1="85.6" y1="0" x2="85.6" y2="54" width="0" layer="20"/>
+<wire x1="85.6" y1="54" x2="0" y2="54" width="0" layer="20"/>
+<wire x1="0" y1="54" x2="0" y2="0" width="0" layer="20"/>
+<text x="26.035" y="42.2275" size="6.4516" layer="1" font="vector">Jolly's</text>
+<text x="19.05" y="5.715" size="6.4516" layer="1" font="vector">TeleKarte</text>
+<text x="29.845" y="25.7175" size="1.778" layer="1" font="vector">1</text>
+<text x="88.265" y="23.8125" size="1.778" layer="1" font="vector" rot="SR270">1</text>
+<dimension x1="0" y1="54" x2="85.6" y2="54" x3="42.8" y3="58.1025" layer="1"/>
+<dimension x1="0" y1="0" x2="0" y2="54" x3="-4.1275" y3="27" layer="1"/>
+<text x="0.9525" y="33.02" size="1.778" layer="1" font="vector">VCC</text>
+<text x="32.0675" y="33.02" size="1.778" layer="1" font="vector">GND</text>
+<text x="0.9525" y="30.48" size="1.778" layer="1" font="vector">RES</text>
+<text x="0.9525" y="27.94" size="1.778" layer="1" font="vector">CLK</text>
+<text x="32.385" y="24.765" size="1.778" layer="1" font="vector">I/O</text>
+</plain>
+<libraries>
+<library name="con-chipcard-iso7816">
+<description>&lt;b&gt;ISO 7816 Chipcard (Package)&lt;/b&gt;&lt;p&gt;
+&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>
+<packages>
+<package name="ISO-7816">
+<description>&lt;b&gt;ISO7816-1 Standard&lt;/b&gt; Chip Card&lt;p&gt;
+Source: http://www.didya.com/iso-7816.asp</description>
+<wire x1="7.25" y1="-16.5" x2="30.25" y2="-16.5" width="0.0002" layer="21"/>
+<wire x1="7.25" y1="-31.5" x2="27.95" y2="-31.5" width="0.0002" layer="21"/>
+<wire x1="6.25" y1="-17.5" x2="6.25" y2="-30.5" width="0.0002" layer="21"/>
+<wire x1="31.25" y1="-28.1" x2="31.25" y2="-17.5" width="0.0002" layer="21"/>
+<wire x1="0" y1="-46.5" x2="0" y2="-2.25" width="0.0002" layer="21"/>
+<wire x1="2.25" y1="0" x2="36.25" y2="0" width="0.0002" layer="21"/>
+<wire x1="0" y1="-2.25" x2="2.25" y2="0" width="0.0002" layer="21" curve="-90"/>
+<wire x1="28.55" y1="-31.2" x2="31.05" y2="-28.7" width="0.0002" layer="21"/>
+<wire x1="6.25" y1="-30.5" x2="7.25" y2="-31.5" width="0.0002" layer="21" curve="90"/>
+<wire x1="30.25" y1="-16.5" x2="31.25" y2="-17.5" width="0.0002" layer="21" curve="-90"/>
+<wire x1="31.05" y1="-28.7" x2="31.25" y2="-28.1" width="0.0002" layer="21" curve="36.869898"/>
+<wire x1="27.95" y1="-31.5" x2="28.55" y2="-31.2" width="0.0002" layer="21" curve="38.88007"/>
+<wire x1="6.25" y1="-17.5" x2="7.25" y2="-16.5" width="0.0002" layer="21" curve="-90"/>
+<wire x1="12.3841" y1="-21.7197" x2="13.5779" y2="-22.9135" width="0.4064" layer="51"/>
+<wire x1="13.5779" y1="-22.9135" x2="13.4128" y2="-23.231" width="0.4064" layer="51"/>
+<wire x1="13.4128" y1="-23.231" x2="13.3366" y2="-23.5485" width="0.4064" layer="51"/>
+<wire x1="13.3366" y1="-23.5485" x2="12.3587" y2="-23.5485" width="0.4064" layer="51"/>
+<wire x1="12.3714" y1="-23.1675" x2="13.1715" y2="-23.1675" width="0.4064" layer="51"/>
+<wire x1="13.1715" y1="-23.1675" x2="13.1715" y2="-23.0532" width="0.4064" layer="51"/>
+<wire x1="13.1715" y1="-23.0532" x2="12.3587" y2="-22.2404" width="0.4064" layer="51"/>
+<wire x1="12.6381" y1="-22.9897" x2="12.4349" y2="-22.7865" width="0.4064" layer="51"/>
+<wire x1="14.7209" y1="-21.2625" x2="14.7209" y2="-22.1515" width="0.4064" layer="51"/>
+<wire x1="14.7209" y1="-22.1515" x2="14.3907" y2="-22.2531" width="0.4064" layer="51"/>
+<wire x1="14.3907" y1="-22.2531" x2="14.0859" y2="-22.4182" width="0.4064" layer="51"/>
+<wire x1="14.0859" y1="-22.4182" x2="12.727" y2="-21.0593" width="0.4064" layer="51"/>
+<wire x1="14.3399" y1="-21.199" x2="14.3399" y2="-21.9483" width="0.4064" layer="51"/>
+<wire x1="14.3399" y1="-21.9483" x2="14.2383" y2="-22.0499" width="0.4064" layer="51"/>
+<wire x1="14.2383" y1="-22.0499" x2="13.3366" y2="-21.1482" width="0.4064" layer="51"/>
+<wire x1="14.2383" y1="-21.5165" x2="13.8446" y2="-21.1228" width="0.4064" layer="51"/>
+<wire x1="15.4321" y1="-21.1609" x2="15.4321" y2="-22.85" width="0.4064" layer="51"/>
+<wire x1="15.4321" y1="-22.85" x2="15.6226" y2="-22.85" width="0.4064" layer="51"/>
+<wire x1="15.6226" y1="-22.85" x2="17.4133" y2="-21.0593" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-21.1609" x2="15.8131" y2="-22.1261" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-22.1261" x2="15.5972" y2="-22.342" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-22.1261" x2="16.8545" y2="-21.0847" width="0.4064" layer="51"/>
+<wire x1="15.9274" y1="-21.4784" x2="16.2957" y2="-21.1101" width="0.4064" layer="51"/>
+<wire x1="17.68" y1="-23.5485" x2="16.8291" y2="-23.5485" width="0.4064" layer="51"/>
+<wire x1="16.8291" y1="-23.5485" x2="16.7148" y2="-23.1929" width="0.4064" layer="51"/>
+<wire x1="16.7148" y1="-23.1929" x2="16.5624" y2="-22.9262" width="0.4064" layer="51"/>
+<wire x1="16.5624" y1="-22.9262" x2="17.7689" y2="-21.7197" width="0.4064" layer="51"/>
+<wire x1="17.7181" y1="-23.1675" x2="17.045" y2="-23.1675" width="0.4064" layer="51"/>
+<wire x1="17.045" y1="-23.1675" x2="16.9434" y2="-23.0659" width="0.4064" layer="51"/>
+<wire x1="16.9434" y1="-23.0659" x2="17.7816" y2="-22.2277" width="0.4064" layer="51"/>
+<wire x1="17.4387" y1="-23.0278" x2="17.6927" y2="-22.7738" width="0.4064" layer="51"/>
+<wire x1="17.68" y1="-24.2597" x2="16.8291" y2="-24.2597" width="0.4064" layer="51"/>
+<wire x1="16.8291" y1="-24.2597" x2="16.7402" y2="-24.5645" width="0.4064" layer="51"/>
+<wire x1="16.7402" y1="-24.5645" x2="16.5624" y2="-24.882" width="0.4064" layer="51"/>
+<wire x1="16.5624" y1="-24.882" x2="17.7689" y2="-26.0885" width="0.4064" layer="51"/>
+<wire x1="17.7181" y1="-24.6407" x2="17.0196" y2="-24.6407" width="0.4064" layer="51"/>
+<wire x1="17.0196" y1="-24.6407" x2="16.9307" y2="-24.7296" width="0.4064" layer="51"/>
+<wire x1="16.9307" y1="-24.7296" x2="17.7562" y2="-25.5551" width="0.4064" layer="51"/>
+<wire x1="17.7816" y1="-25.0471" x2="17.4895" y2="-24.755" width="0.4064" layer="51"/>
+<wire x1="15.4321" y1="-26.5965" x2="15.4321" y2="-25.6567" width="0.4064" layer="51"/>
+<wire x1="15.4321" y1="-25.6567" x2="15.7496" y2="-25.5551" width="0.4064" layer="51"/>
+<wire x1="15.7496" y1="-25.5551" x2="16.0544" y2="-25.39" width="0.4064" layer="51"/>
+<wire x1="16.0544" y1="-25.39" x2="17.4133" y2="-26.7489" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-26.6219" x2="15.8131" y2="-25.8472" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-25.8472" x2="15.902" y2="-25.7583" width="0.4064" layer="51"/>
+<wire x1="15.902" y1="-25.7583" x2="16.791" y2="-26.6473" width="0.4064" layer="51"/>
+<wire x1="16.3211" y1="-26.7108" x2="15.9147" y2="-26.3044" width="0.4064" layer="51"/>
+<wire x1="14.7209" y1="-26.6092" x2="14.7209" y2="-25.6567" width="0.4064" layer="51"/>
+<wire x1="14.7209" y1="-25.6567" x2="14.3907" y2="-25.5551" width="0.4064" layer="51"/>
+<wire x1="14.3907" y1="-25.5551" x2="14.0986" y2="-25.39" width="0.4064" layer="51"/>
+<wire x1="14.0986" y1="-25.39" x2="12.7524" y2="-26.7362" width="0.4064" layer="51"/>
+<wire x1="14.3526" y1="-26.6346" x2="14.3526" y2="-25.8345" width="0.4064" layer="51"/>
+<wire x1="14.3526" y1="-25.8345" x2="14.2637" y2="-25.7456" width="0.4064" layer="51"/>
+<wire x1="14.2637" y1="-25.7456" x2="13.2985" y2="-26.7108" width="0.4064" layer="51"/>
+<wire x1="13.8573" y1="-26.6854" x2="14.251" y2="-26.2917" width="0.4064" layer="51"/>
+<wire x1="12.3841" y1="-26.0885" x2="13.5779" y2="-24.8947" width="0.4064" layer="51"/>
+<wire x1="13.5779" y1="-24.8947" x2="13.4255" y2="-24.5772" width="0.4064" layer="51"/>
+<wire x1="13.4255" y1="-24.5772" x2="13.3366" y2="-24.2597" width="0.4064" layer="51"/>
+<wire x1="13.3366" y1="-24.2597" x2="12.4222" y2="-24.2597" width="0.4064" layer="51"/>
+<wire x1="12.3968" y1="-24.628" x2="13.1207" y2="-24.628" width="0.4064" layer="51"/>
+<wire x1="13.1207" y1="-24.628" x2="13.2223" y2="-24.7296" width="0.4064" layer="51"/>
+<wire x1="13.2223" y1="-24.7296" x2="12.3968" y2="-25.5551" width="0.4064" layer="51"/>
+<wire x1="12.3587" y1="-25.0852" x2="12.6889" y2="-24.755" width="0.4064" layer="51"/>
+<wire x1="12.6889" y1="-24.755" x2="12.6889" y2="-24.7296" width="0.4064" layer="51"/>
+<circle x="15.0765" y="-23.9041" radius="1.27" width="0" layer="51"/>
+<smd name="C1" x="11.249" y="-20.099" dx="2" dy="1.7" layer="1"/>
+<smd name="C2" x="11.249" y="-22.638" dx="2" dy="1.7" layer="1"/>
+<smd name="C3" x="11.249" y="-25.183" dx="2" dy="1.7" layer="1"/>
+<smd name="C4" x="11.249" y="-27.722" dx="2" dy="1.7" layer="1"/>
+<smd name="C8" x="18.872" y="-27.722" dx="2" dy="1.7" layer="1"/>
+<smd name="C7" x="18.872" y="-25.18" dx="2" dy="1.7" layer="1"/>
+<smd name="C6" x="18.872" y="-22.64" dx="2" dy="1.7" layer="1"/>
+<smd name="C5" x="18.872" y="-20.1" dx="2" dy="1.7" layer="1"/>
+<text x="5.934" y="-20.6" size="1.016" layer="51">VCC</text>
+<text x="5.934" y="-23.1" size="1.016" layer="51">RST</text>
+<text x="5.934" y="-25.7" size="1.016" layer="51">CLK</text>
+<text x="5.934" y="-28.2" size="1.016" layer="51">NC</text>
+<text x="21.539" y="-25.7" size="1.016" layer="51">I/O</text>
+<text x="21.539" y="-20.6" size="1.016" layer="51">GND</text>
+<text x="10.06" y="-15.23" size="1.27" layer="25">&gt;NAME</text>
+<text x="10.06" y="-34.28" size="1.27" layer="27">&gt;VALUE</text>
+<text x="21.539" y="-28.2" size="1.016" layer="51">NC </text>
+<text x="21.539" y="-23.1" size="1.016" layer="51">NC </text>
+<rectangle x1="9.1202" y1="-23.7517" x2="12.473" y2="-21.5165" layer="51"/>
+<rectangle x1="17.68" y1="-23.7517" x2="21.0328" y2="-21.5165" layer="51"/>
+<rectangle x1="9.1202" y1="-26.2917" x2="12.473" y2="-24.0565" layer="51"/>
+<rectangle x1="17.68" y1="-26.2917" x2="21.0328" y2="-24.0565" layer="51"/>
+<rectangle x1="9.1202" y1="-21.199" x2="14.9241" y2="-18.659" layer="51"/>
+<rectangle x1="9.1202" y1="-29.1365" x2="14.9241" y2="-26.5965" layer="51"/>
+<rectangle x1="15.2289" y1="-29.1365" x2="21.0328" y2="-26.5965" layer="51"/>
+<rectangle x1="15.2289" y1="-21.2117" x2="21.0328" y2="-18.6717" layer="51"/>
+</package>
+</packages>
+</library>
+<library name="atmel">
+<description>&lt;b&gt;AVR Devices&lt;/b&gt;&lt;p&gt;
+Configurable logic, microcontrollers, nonvolatile memories&lt;p&gt;
+Based on the following sources:&lt;p&gt;
+&lt;ul&gt;
+&lt;li&gt;www.atmel.com
+&lt;li&gt;CD-ROM : Configurable Logic Microcontroller Nonvolatile Memory
+&lt;li&gt;CadSoft download site, www.cadsoft.de or www.cadsoftusa.com , file at90smcu_v400.zip
+&lt;/ul&gt;
+&lt;author&gt;Revised by librarian@cadsoft.de&lt;/author&gt;</description>
+<packages>
+<package name="SO08">
+<description>&lt;b&gt;SMALL OUTLINE INTEGRATED CIRCUIT&lt;/b&gt;&lt;p&gt;
+body 3.9 mm/JEDEC MS-012AA</description>
+<wire x1="-2.9" y1="3.9" x2="2.9" y2="3.9" width="0.1998" layer="39"/>
+<wire x1="2.9" y1="3.9" x2="2.9" y2="-3.9" width="0.1998" layer="39"/>
+<wire x1="2.9" y1="-3.9" x2="-2.9" y2="-3.9" width="0.1998" layer="39"/>
+<wire x1="-2.9" y1="-3.9" x2="-2.9" y2="3.9" width="0.1998" layer="39"/>
+<wire x1="2.4" y1="1.9" x2="2.4" y2="-1.4" width="0.1778" layer="21"/>
+<wire x1="2.4" y1="-1.4" x2="2.4" y2="-1.9" width="0.1778" layer="21"/>
+<wire x1="2.4" y1="-1.9" x2="-2.4" y2="-1.9" width="0.1778" layer="51"/>
+<wire x1="-2.4" y1="-1.9" x2="-2.4" y2="-1.4" width="0.1778" layer="21"/>
+<wire x1="-2.4" y1="-1.4" x2="-2.4" y2="1.9" width="0.1778" layer="21"/>
+<wire x1="-2.4" y1="1.9" x2="2.4" y2="1.9" width="0.1778" layer="51"/>
+<wire x1="2.4" y1="-1.4" x2="-2.4" y2="-1.4" width="0.0508" layer="51"/>
+<circle x="-1.905" y="-0.9525" radius="0.2245" width="0" layer="21"/>
+<smd name="2" x="-0.635" y="-2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="7" x="-0.635" y="2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="1" x="-1.905" y="-2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="3" x="0.635" y="-2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="4" x="1.905" y="-2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="8" x="-1.905" y="2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="6" x="0.635" y="2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="5" x="1.905" y="2.6" dx="0.6" dy="2.2" layer="1"/>
+<text x="-3.175" y="-1.905" size="1.27" layer="25" ratio="10" rot="R90">&gt;NAME</text>
+<text x="4.445" y="-1.905" size="1.27" layer="27" ratio="10" rot="R90">&gt;VALUE</text>
+<rectangle x1="-2.1501" y1="-3.1001" x2="-1.6599" y2="-2" layer="51"/>
+<rectangle x1="-0.8801" y1="-3.1001" x2="-0.3899" y2="-2" layer="51"/>
+<rectangle x1="0.3899" y1="-3.1001" x2="0.8801" y2="-2" layer="51"/>
+<rectangle x1="1.6599" y1="-3.1001" x2="2.1501" y2="-2" layer="51"/>
+<rectangle x1="1.6599" y1="2" x2="2.1501" y2="3.1001" layer="51"/>
+<rectangle x1="0.3899" y1="2" x2="0.8801" y2="3.1001" layer="51"/>
+<rectangle x1="-0.8801" y1="2" x2="-0.3899" y2="3.1001" layer="51"/>
+<rectangle x1="-2.1501" y1="2" x2="-1.6599" y2="3.1001" layer="51"/>
+</package>
+<package name="DIL08">
+<description>&lt;b&gt;Dual In Line Package&lt;/b&gt;</description>
+<wire x1="5.08" y1="2.921" x2="-5.08" y2="2.921" width="0.1778" layer="21"/>
+<wire x1="-5.08" y1="-2.921" x2="5.08" y2="-2.921" width="0.1778" layer="21"/>
+<wire x1="5.08" y1="2.921" x2="5.08" y2="-2.921" width="0.1778" layer="21"/>
+<wire x1="-5.08" y1="2.921" x2="-5.08" y2="0.6985" width="0.1778" layer="21"/>
+<wire x1="-5.08" y1="-2.921" x2="-5.08" y2="-0.6985" width="0.1778" layer="21"/>
+<wire x1="-5.08" y1="0.6985" x2="-5.08" y2="-0.6985" width="0.1778" layer="21" curve="-180"/>
+<pad name="1" x="-3.81" y="-3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="2" x="-1.27" y="-3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="7" x="-1.27" y="3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="8" x="-3.81" y="3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="3" x="1.27" y="-3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="4" x="3.81" y="-3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="6" x="1.27" y="3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="5" x="3.81" y="3.81" drill="0.8128" shape="long" rot="R90"/>
+<text x="-5.715" y="-2.54" size="1.27" layer="25" ratio="10" rot="R90">&gt;NAME</text>
+<text x="-3.4925" y="-0.635" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+</packages>
+</library>
+<library name="testpad">
+<description>&lt;b&gt;Test Pins/Pads&lt;/b&gt;&lt;p&gt;
+Cream on SMD OFF.&lt;br&gt;
+new: Attribute TP_SIGNAL_NAME&lt;br&gt;
+&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>
+<packages>
+<package name="TP10SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1" dy="1" layer="1" cream="no"/>
+<text x="-0.5001" y="0.5499" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.508" y="-0.635" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+</packages>
+</library>
+<library name="resistor">
+<description>&lt;b&gt;Resistors, Capacitors, Inductors&lt;/b&gt;&lt;p&gt;
+Based on the previous libraries:
+&lt;ul&gt;
+&lt;li&gt;r.lbr
+&lt;li&gt;cap.lbr
+&lt;li&gt;cap-fe.lbr
+&lt;li&gt;captant.lbr
+&lt;li&gt;polcap.lbr
+&lt;li&gt;ipc-smd.lbr
+&lt;/ul&gt;
+All SMD packages are defined according to the IPC specifications and CECC&lt;p&gt;
+&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;&lt;p&gt;
+&lt;p&gt;
+for Electrolyt Capacitors see also :&lt;p&gt;
+www.bccomponents.com &lt;p&gt;
+www.panasonic.com&lt;p&gt;
+www.kemet.com&lt;p&gt;
+&lt;p&gt;
+for trimmer refence see : &lt;u&gt;www.electrospec-inc.com/cross_references/trimpotcrossref.asp&lt;/u&gt;&lt;p&gt;
+
+&lt;map name="nav_main"&gt;
+&lt;area shape="rect" coords="0,1,140,23" href="../military_specs.asp" title=""&gt;
+&lt;area shape="rect" coords="0,24,140,51" href="../about.asp" title=""&gt;
+&lt;area shape="rect" coords="1,52,140,77" href="../rfq.asp" title=""&gt;
+&lt;area shape="rect" coords="0,78,139,103" href="../products.asp" title=""&gt;
+&lt;area shape="rect" coords="1,102,138,128" href="../excess_inventory.asp" title=""&gt;
+&lt;area shape="rect" coords="1,129,138,150" href="../edge.asp" title=""&gt;
+&lt;area shape="rect" coords="1,151,139,178" href="../industry_links.asp" title=""&gt;
+&lt;area shape="rect" coords="0,179,139,201" href="../comments.asp" title=""&gt;
+&lt;area shape="rect" coords="1,203,138,231" href="../directory.asp" title=""&gt;
+&lt;area shape="default" nohref&gt;
+&lt;/map&gt;
+
+&lt;html&gt;
+
+&lt;title&gt;&lt;/title&gt;
+
+ &lt;LINK REL="StyleSheet" TYPE="text/css" HREF="style-sheet.css"&gt;
+
+&lt;body bgcolor="#ffffff" text="#000000" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"&gt;
+&lt;table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0 height="55%"&gt;
+&lt;tr valign="top"&gt;
+
+&lt;/td&gt;
+&lt;! &lt;td width="10"&gt;&amp;nbsp;&lt;/td&gt;
+&lt;td width="90%"&gt;
+
+&lt;b&gt;&lt;font color="#0000FF" size="4"&gt;TRIM-POT CROSS REFERENCE&lt;/font&gt;&lt;/b&gt;
+&lt;P&gt;
+&lt;TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2&gt;
+ &lt;TR&gt;
+ &lt;TD COLSPAN=8&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL&gt;&lt;B&gt;RECTANGULAR MULTI-TURN&lt;/B&gt;&lt;/FONT&gt;
+ &lt;/TD&gt;
+ &lt;/TR&gt;
+ &lt;TR&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;BOURNS&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;BI&amp;nbsp;TECH&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;DALE-VISHAY&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;PHILIPS/MEPCO&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;MURATA&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;PANASONIC&lt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#cccccc" ALIGN=CENTER&gt;&lt;FONT FACE=ARIAL SIZE=3&gt;
+ -&lt;BR&gt;
+ EVM-6YS&lt;BR&gt;
+ EVM-1E&lt;BR&gt;
+ EVM-1G&lt;BR&gt;
+ EVM-1D&lt;BR&gt;
+ -&lt;BR&gt;
+ -&lt;BR&gt;&lt;/FONT&gt;
+ &lt;/TD&gt;
+ &lt;TD BGCOLOR="#cccccc" ALIGN=CENTER&gt;&lt;FONT FACE=ARIAL SIZE=3&gt;
+ G4B&lt;BR&gt;
+ G4A&lt;BR&gt;
+ TR04-3S1&lt;BR&gt;
+ TRG04-2S1&lt;BR&gt;
+ -&lt;BR&gt;
+ -&lt;BR&gt;
+ -&lt;BR&gt;&lt;/FONT&gt;
+ &lt;/TD&gt;
+ &lt;TD BGCOLOR="#cccccc" ALIGN=CENTER&gt;&lt;FONT FACE=ARIAL SIZE=3&gt;
+ -&lt;BR&gt;
+ -&lt;BR&gt;
+ DVR-43A&lt;BR&gt;
+ CVR-42C&lt;BR&gt;
+ CVR-42A/C&lt;BR&gt;
+ -&lt;BR&gt;
+ -&lt;BR&gt;&lt;/FONT&gt;
+ &lt;/TD&gt;
+ &lt;/TR&gt;
+&lt;/TABLE&gt;
+&lt;P&gt;
+&lt;FONT SIZE=4 FACE=ARIAL&gt;&lt;B&gt;ALT =&amp;nbsp;ALTERNATE&lt;/B&gt;&lt;/FONT&gt;
+&lt;P&gt;
+
+&amp;nbsp;
+&lt;P&gt;
+&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/table&gt;
+&lt;/BODY&gt;&lt;/HTML&gt;</description>
+<packages>
+<package name="C0805">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-1.973" y1="0.983" x2="1.973" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="1.973" y1="-0.983" x2="-1.973" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-1.973" y1="-0.983" x2="-1.973" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="-0.381" y1="0.66" x2="0.381" y2="0.66" width="0.1016" layer="51"/>
+<wire x1="-0.356" y1="-0.66" x2="0.381" y2="-0.66" width="0.1016" layer="51"/>
+<wire x1="1.973" y1="0.983" x2="1.973" y2="-0.983" width="0.0508" layer="39"/>
+<smd name="1" x="-0.85" y="0" dx="1.3" dy="1.5" layer="1"/>
+<smd name="2" x="0.85" y="0" dx="1.3" dy="1.5" layer="1"/>
+<text x="-0.889" y="1.016" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.889" y="-2.286" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.0922" y1="-0.7239" x2="-0.3421" y2="0.7262" layer="51"/>
+<rectangle x1="0.3556" y1="-0.7239" x2="1.1057" y2="0.7262" layer="51"/>
+<rectangle x1="-0.1001" y1="-0.4001" x2="0.1001" y2="0.4001" layer="35"/>
+</package>
+</packages>
+</library>
+</libraries>
+<attributes>
+</attributes>
+<variantdefs>
+</variantdefs>
+<classes>
+<class number="0" name="default" width="0" drill="0">
+</class>
+</classes>
+<designrules name="default">
+<description language="de">&lt;b&gt;EAGLE Design Rules&lt;/b&gt;
+&lt;p&gt;
+Die Standard-Design-Rules sind so gewählt, dass sie für
+die meisten Anwendungen passen. Sollte ihre Platine
+besondere Anforderungen haben, treffen Sie die erforderlichen
+Einstellungen hier und speichern die Design Rules unter
+einem neuen Namen ab.</description>
+<description language="en">&lt;b&gt;EAGLE Design Rules&lt;/b&gt;
+&lt;p&gt;
+The default Design Rules have been set to cover
+a wide range of applications. Your particular design
+may have different requirements, so please make the
+necessary adjustments and save your customized
+design rules under a new name.</description>
+<param name="layerSetup" value="(1*16)"/>
+<param name="mtCopper" value="0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm"/>
+<param name="mtIsolate" value="1.5mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm"/>
+<param name="mdWireWire" value="8mil"/>
+<param name="mdWirePad" value="8mil"/>
+<param name="mdWireVia" value="8mil"/>
+<param name="mdPadPad" value="8mil"/>
+<param name="mdPadVia" value="8mil"/>
+<param name="mdViaVia" value="8mil"/>
+<param name="mdSmdPad" value="8mil"/>
+<param name="mdSmdVia" value="8mil"/>
+<param name="mdSmdSmd" value="8mil"/>
+<param name="mdViaViaSameLayer" value="8mil"/>
+<param name="mnLayersViaInSmd" value="2"/>
+<param name="mdCopperDimension" value="40mil"/>
+<param name="mdDrill" value="8mil"/>
+<param name="mdSmdStop" value="0mil"/>
+<param name="msWidth" value="10mil"/>
+<param name="msDrill" value="24mil"/>
+<param name="msMicroVia" value="9.99mm"/>
+<param name="msBlindViaRatio" value="0.5"/>
+<param name="rvPadTop" value="0.25"/>
+<param name="rvPadInner" value="0.25"/>
+<param name="rvPadBottom" value="0.25"/>
+<param name="rvViaOuter" value="0.25"/>
+<param name="rvViaInner" value="0.25"/>
+<param name="rvMicroViaOuter" value="0.25"/>
+<param name="rvMicroViaInner" value="0.25"/>
+<param name="rlMinPadTop" value="10mil"/>
+<param name="rlMaxPadTop" value="20mil"/>
+<param name="rlMinPadInner" value="10mil"/>
+<param name="rlMaxPadInner" value="20mil"/>
+<param name="rlMinPadBottom" value="10mil"/>
+<param name="rlMaxPadBottom" value="20mil"/>
+<param name="rlMinViaOuter" value="8mil"/>
+<param name="rlMaxViaOuter" value="20mil"/>
+<param name="rlMinViaInner" value="8mil"/>
+<param name="rlMaxViaInner" value="20mil"/>
+<param name="rlMinMicroViaOuter" value="4mil"/>
+<param name="rlMaxMicroViaOuter" value="20mil"/>
+<param name="rlMinMicroViaInner" value="4mil"/>
+<param name="rlMaxMicroViaInner" value="20mil"/>
+<param name="psTop" value="-1"/>
+<param name="psBottom" value="-1"/>
+<param name="psFirst" value="-1"/>
+<param name="psElongationLong" value="100"/>
+<param name="psElongationOffset" value="100"/>
+<param name="mvStopFrame" value="1"/>
+<param name="mvCreamFrame" value="0"/>
+<param name="mlMinStopFrame" value="4mil"/>
+<param name="mlMaxStopFrame" value="4mil"/>
+<param name="mlMinCreamFrame" value="0mil"/>
+<param name="mlMaxCreamFrame" value="0mil"/>
+<param name="mlViaStopLimit" value="0mil"/>
+<param name="srRoundness" value="0"/>
+<param name="srMinRoundness" value="0mil"/>
+<param name="srMaxRoundness" value="0mil"/>
+<param name="slThermalIsolate" value="10mil"/>
+<param name="slThermalsForVias" value="0"/>
+<param name="dpMaxLengthDifference" value="10mm"/>
+<param name="dpGapFactor" value="2.5"/>
+<param name="checkGrid" value="0"/>
+<param name="checkAngle" value="0"/>
+<param name="checkFont" value="1"/>
+<param name="checkRestrict" value="1"/>
+<param name="useDiameter" value="13"/>
+<param name="maxErrors" value="50"/>
+</designrules>
+<autorouter>
+<pass name="Default">
+<param name="RoutingGrid" value="50mil"/>
+<param name="tpViaShape" value="round"/>
+<param name="PrefDir.1" value="|"/>
+<param name="PrefDir.2" value="0"/>
+<param name="PrefDir.3" value="0"/>
+<param name="PrefDir.4" value="0"/>
+<param name="PrefDir.5" value="0"/>
+<param name="PrefDir.6" value="0"/>
+<param name="PrefDir.7" value="0"/>
+<param name="PrefDir.8" value="0"/>
+<param name="PrefDir.9" value="0"/>
+<param name="PrefDir.10" value="0"/>
+<param name="PrefDir.11" value="0"/>
+<param name="PrefDir.12" value="0"/>
+<param name="PrefDir.13" value="0"/>
+<param name="PrefDir.14" value="0"/>
+<param name="PrefDir.15" value="0"/>
+<param name="PrefDir.16" value="-"/>
+<param name="cfVia" value="8"/>
+<param name="cfNonPref" value="5"/>
+<param name="cfChangeDir" value="2"/>
+<param name="cfOrthStep" value="2"/>
+<param name="cfDiagStep" value="3"/>
+<param name="cfExtdStep" value="0"/>
+<param name="cfBonusStep" value="1"/>
+<param name="cfMalusStep" value="1"/>
+<param name="cfPadImpact" value="4"/>
+<param name="cfSmdImpact" value="4"/>
+<param name="cfBusImpact" value="0"/>
+<param name="cfHugging" value="3"/>
+<param name="cfAvoid" value="4"/>
+<param name="cfPolygon" value="10"/>
+<param name="cfBase.1" value="0"/>
+<param name="cfBase.2" value="1"/>
+<param name="cfBase.3" value="1"/>
+<param name="cfBase.4" value="1"/>
+<param name="cfBase.5" value="1"/>
+<param name="cfBase.6" value="1"/>
+<param name="cfBase.7" value="1"/>
+<param name="cfBase.8" value="1"/>
+<param name="cfBase.9" value="1"/>
+<param name="cfBase.10" value="1"/>
+<param name="cfBase.11" value="1"/>
+<param name="cfBase.12" value="1"/>
+<param name="cfBase.13" value="1"/>
+<param name="cfBase.14" value="1"/>
+<param name="cfBase.15" value="1"/>
+<param name="cfBase.16" value="0"/>
+<param name="mnVias" value="20"/>
+<param name="mnSegments" value="9999"/>
+<param name="mnExtdSteps" value="9999"/>
+<param name="mnRipupLevel" value="10"/>
+<param name="mnRipupSteps" value="100"/>
+<param name="mnRipupTotal" value="100"/>
+</pass>
+<pass name="Follow-me" refer="Default" active="yes">
+</pass>
+<pass name="Busses" refer="Default" active="yes">
+<param name="cfNonPref" value="4"/>
+<param name="cfBusImpact" value="4"/>
+<param name="cfHugging" value="0"/>
+<param name="mnVias" value="0"/>
+</pass>
+<pass name="Route" refer="Default" active="yes">
+</pass>
+<pass name="Optimize1" refer="Default" active="yes">
+<param name="cfVia" value="99"/>
+<param name="cfExtdStep" value="10"/>
+<param name="cfHugging" value="1"/>
+<param name="mnExtdSteps" value="1"/>
+<param name="mnRipupLevel" value="0"/>
+</pass>
+<pass name="Optimize2" refer="Optimize1" active="yes">
+<param name="cfNonPref" value="0"/>
+<param name="cfChangeDir" value="6"/>
+<param name="cfExtdStep" value="0"/>
+<param name="cfBonusStep" value="2"/>
+<param name="cfMalusStep" value="2"/>
+<param name="cfPadImpact" value="2"/>
+<param name="cfSmdImpact" value="2"/>
+<param name="cfHugging" value="0"/>
+</pass>
+<pass name="Optimize3" refer="Optimize2" active="yes">
+<param name="cfChangeDir" value="8"/>
+<param name="cfPadImpact" value="0"/>
+<param name="cfSmdImpact" value="0"/>
+</pass>
+<pass name="Optimize4" refer="Optimize3" active="yes">
+<param name="cfChangeDir" value="25"/>
+</pass>
+</autorouter>
+<elements>
+<element name="X1" library="con-chipcard-iso7816" package="ISO-7816" value="CHIPCARD-ISO-7816ISO" x="0" y="54">
+<attribute name="OC_NEWARK" value="unknown" x="0" y="54" size="1.778" layer="27" display="off"/>
+<attribute name="MPN" value="" x="0" y="54" size="1.778" layer="27" display="off"/>
+<attribute name="MF" value="" x="0" y="54" size="1.778" layer="27" display="off"/>
+<attribute name="OC_FARNELL" value="unknown" x="0" y="54" size="1.778" layer="27" display="off"/>
+</element>
+<element name="IC1" library="atmel" package="SO08" value="TINY10S" x="27.305" y="29.87" rot="MR0"/>
+<element name="TP1" library="testpad" package="TP10SQ" value="TPTP10SQ" x="24.765" y="35.2675">
+<attribute name="TP_SIGNAL_NAME" value="" x="24.765" y="35.2675" size="1.778" layer="27" display="off"/>
+</element>
+<element name="TP2" library="testpad" package="TP10SQ" value="TPTP10SQ" x="26.3525" y="35.2675">
+<attribute name="TP_SIGNAL_NAME" value="" x="26.3525" y="35.2675" size="1.778" layer="27" display="off"/>
+</element>
+<element name="TP3" library="testpad" package="TP10SQ" value="TPTP10SQ" x="27.94" y="35.2675">
+<attribute name="TP_SIGNAL_NAME" value="" x="27.94" y="35.2675" size="1.778" layer="27" display="off"/>
+</element>
+<element name="C1" library="resistor" package="C0805" value="" x="22.5425" y="33.68" rot="R90"/>
+<element name="TP4" library="testpad" package="TP10SQ" value="TPTP10SQ" x="29.21" y="25.1075">
+<attribute name="TP_SIGNAL_NAME" value="" x="29.21" y="25.1075" size="1.778" layer="27" display="off"/>
+</element>
+<element name="TP5" library="testpad" package="TP10SQ" value="TPTP10SQ" x="29.5275" y="35.2675">
+<attribute name="TP_SIGNAL_NAME" value="" x="29.5275" y="35.2675" size="1.778" layer="27" display="off"/>
+</element>
+<element name="TP6" library="testpad" package="TP10SQ" value="TPTP10SQ" x="23.8125" y="26.695">
+<attribute name="TP_SIGNAL_NAME" value="" x="23.8125" y="26.695" size="1.778" layer="27" display="off"/>
+</element>
+<element name="IC2" library="atmel" package="DIL08" value="TINY10P" x="92.795" y="28.525" rot="MR90"/>
+<element name="C2" library="resistor" package="C0805" value="" x="92.075" y="28.575" rot="R270"/>
+<element name="TP7" library="testpad" package="TP10SQ" value="TPTP10SQ" x="27.6225" y="25.0825">
+<attribute name="TP_SIGNAL_NAME" value="" x="27.6225" y="25.0825" size="1.778" layer="27" display="off"/>
+</element>
+</elements>
+<signals>
+<signal name="RST">
+<contactref element="IC1" pad="1"/>
+<contactref element="X1" pad="C2"/>
+<wire x1="11.249" y1="31.362" x2="7.3025" y2="31.362" width="0.4064" layer="1"/>
+<wire x1="7.3025" y1="31.362" x2="7.3025" y2="23.52" width="0.4064" layer="1"/>
+<wire x1="7.3025" y1="23.52" x2="27.965" y2="23.52" width="0.4064" layer="1"/>
+<wire x1="27.965" y1="23.52" x2="29.21" y2="24.765" width="0.4064" layer="1"/>
+<wire x1="29.21" y1="24.765" x2="29.21" y2="25.1075" width="0.4064" layer="1"/>
+<contactref element="TP4" pad="TP"/>
+<wire x1="29.21" y1="25.1075" x2="29.21" y2="27.94" width="0.4064" layer="1"/>
+<contactref element="IC2" pad="1"/>
+<wire x1="88.985" y1="24.715" x2="86.36" y2="24.715" width="0.4064" layer="1"/>
+<wire x1="86.36" y1="24.715" x2="86.36" y2="27.94" width="0.4064" layer="1"/>
+<wire x1="86.36" y1="27.94" x2="29.21" y2="27.94" width="0.4064" layer="1"/>
+<wire x1="29.21" y1="27.94" x2="29.21" y2="27.27" width="0" layer="19" extent="1-16"/>
+<wire x1="29.21" y1="27.27" x2="29.21" y2="27.27" width="0" layer="19" extent="1-16"/>
+</signal>
+<signal name="CLK">
+<contactref element="X1" pad="C3"/>
+<wire x1="11.249" y1="28.817" x2="8.5725" y2="28.817" width="0.4064" layer="1"/>
+<wire x1="8.5725" y1="28.817" x2="8.5725" y2="24.4725" width="0.4064" layer="1"/>
+<wire x1="8.5725" y1="24.4725" x2="26.9875" y2="24.4725" width="0.4064" layer="1"/>
+<contactref element="IC1" pad="2"/>
+<wire x1="26.9875" y1="24.4725" x2="27.45125" y2="24.93625" width="0.4064" layer="1"/>
+<wire x1="27.45125" y1="24.93625" x2="27.94" y2="25.425" width="0.4064" layer="1"/>
+<wire x1="27.94" y1="25.425" x2="27.94" y2="27.27" width="0.4064" layer="1"/>
+<contactref element="IC2" pad="2"/>
+<wire x1="88.985" y1="27.255" x2="87.3125" y2="27.255" width="0.4064" layer="1"/>
+<wire x1="87.3125" y1="27.255" x2="87.3125" y2="28.8925" width="0.4064" layer="1"/>
+<wire x1="87.3125" y1="28.8925" x2="27.94" y2="28.8925" width="0.4064" layer="1"/>
+<contactref element="TP7" pad="TP"/>
+<wire x1="27.6225" y1="25.0825" x2="27.45125" y2="25.0825" width="0.4064" layer="1"/>
+<wire x1="27.45125" y1="25.0825" x2="27.45125" y2="24.93625" width="0.4064" layer="1"/>
+<wire x1="27.94" y1="28.8925" x2="27.94" y2="27.27" width="0.4064" layer="1"/>
+</signal>
+<signal name="VCC">
+<contactref element="X1" pad="C1"/>
+<contactref element="IC1" pad="8"/>
+<wire x1="11.249" y1="33.901" x2="7.3025" y2="33.901" width="0.4064" layer="1"/>
+<wire x1="7.3025" y1="33.901" x2="7.3025" y2="33.9725" width="0.4064" layer="1"/>
+<wire x1="7.3025" y1="36.5125" x2="7.3025" y2="36.5375" width="0.4064" layer="1"/>
+<wire x1="7.3025" y1="36.5375" x2="22.5425" y2="36.5375" width="0.4064" layer="1"/>
+<wire x1="22.5425" y1="36.5375" x2="29.21" y2="36.5375" width="0.4064" layer="1"/>
+<wire x1="29.21" y1="36.5375" x2="29.21" y2="36.5125" width="0.4064" layer="1"/>
+<contactref element="C1" pad="2"/>
+<wire x1="29.21" y1="35.2675" x2="29.21" y2="31.75" width="0.4064" layer="1"/>
+<wire x1="22.5425" y1="34.53" x2="22.5425" y2="36.5375" width="0.4064" layer="1"/>
+<contactref element="TP5" pad="TP"/>
+<wire x1="29.5275" y1="35.2675" x2="29.21" y2="35.2675" width="0.4064" layer="1"/>
+<contactref element="IC2" pad="8"/>
+<wire x1="96.605" y1="24.715" x2="94.2975" y2="24.715" width="0.4064" layer="1"/>
+<wire x1="94.2975" y1="24.715" x2="94.2975" y2="27.725" width="0.4064" layer="1"/>
+<wire x1="94.2975" y1="27.725" x2="94.2975" y2="34.29" width="0.4064" layer="1"/>
+<wire x1="94.2975" y1="34.29" x2="86.36" y2="34.29" width="0.4064" layer="1"/>
+<wire x1="86.36" y1="34.29" x2="86.36" y2="31.75" width="0.4064" layer="1"/>
+<wire x1="86.36" y1="31.75" x2="29.21" y2="31.75" width="0.4064" layer="1"/>
+<contactref element="C2" pad="2"/>
+<wire x1="92.075" y1="27.725" x2="94.2975" y2="27.725" width="0.4064" layer="1"/>
+<wire x1="29.21" y1="35.2675" x2="29.21" y2="36.5125" width="0.4064" layer="1"/>
+<wire x1="29.21" y1="36.5125" x2="7.3025" y2="36.5125" width="0.4064" layer="1"/>
+<wire x1="7.3025" y1="36.5125" x2="7.3025" y2="33.9725" width="0.4064" layer="1"/>
+<wire x1="7.3025" y1="33.9725" x2="11.3055" y2="33.9725" width="0.4064" layer="1"/>
+<wire x1="29.21" y1="32.47" x2="29.21" y2="32.385" width="0.4064" layer="16"/>
+<wire x1="29.21" y1="31.75" x2="29.21" y2="32.385" width="0" layer="19" extent="1-16"/>
+</signal>
+<signal name="GND">
+<contactref element="IC1" pad="4"/>
+<contactref element="X1" pad="C5"/>
+<contactref element="C1" pad="1"/>
+<contactref element="TP6" pad="TP"/>
+<wire x1="23.8125" y1="26.695" x2="22.5425" y2="26.695" width="0.4064" layer="1"/>
+<wire x1="22.5425" y1="26.695" x2="22.5425" y2="32.83" width="0.4064" layer="1"/>
+<wire x1="18.872" y1="33.9" x2="20.955" y2="33.9" width="0.4064" layer="1"/>
+<wire x1="20.955" y1="33.9" x2="20.955" y2="32.83" width="0.4064" layer="1"/>
+<wire x1="22.5425" y1="32.83" x2="20.955" y2="32.83" width="0.4064" layer="1"/>
+<contactref element="IC2" pad="4"/>
+<contactref element="C2" pad="1"/>
+<wire x1="88.985" y1="32.335" x2="92.075" y2="32.335" width="0.4064" layer="1"/>
+<wire x1="92.075" y1="32.335" x2="92.075" y2="29.425" width="0.4064" layer="1"/>
+<wire x1="88.985" y1="32.335" x2="87.3125" y2="32.335" width="0.4064" layer="1"/>
+<wire x1="87.3125" y1="32.335" x2="87.3125" y2="30.7975" width="0.4064" layer="1"/>
+<wire x1="87.3125" y1="30.7975" x2="25.4" y2="30.7975" width="0.4064" layer="1"/>
+<wire x1="25.4" y1="30.7975" x2="25.4" y2="26.67" width="0.4064" layer="1"/>
+<wire x1="25.4" y1="27.27" x2="25.4" y2="26.67" width="0" layer="19" extent="1-16"/>
+<wire x1="25.4" y1="27.6225" x2="25.4" y2="27.27" width="0.4064" layer="16"/>
+<wire x1="23.8125" y1="26.695" x2="25.375" y2="26.695" width="0.4064" layer="1"/>
+<wire x1="25.375" y1="26.695" x2="25.4" y2="26.67" width="0.4064" layer="1" curve="-90"/>
+<wire x1="25.4" y1="27.27" x2="25.4" y2="27.27" width="0" layer="19" extent="1-16"/>
+</signal>
+<signal name="DAT">
+<contactref element="X1" pad="C7"/>
+<contactref element="IC1" pad="3"/>
+<wire x1="26.035" y1="25.425" x2="26.67" y2="26.06" width="0.4064" layer="1"/>
+<contactref element="IC2" pad="3"/>
+<wire x1="88.985" y1="29.795" x2="26.67" y2="29.795" width="0.4064" layer="1"/>
+<wire x1="26.67" y1="29.795" x2="26.67" y2="26.06" width="0.4064" layer="1"/>
+<wire x1="88.9" y1="29.845" x2="88.9" y2="29.76" width="0.4064" layer="1"/>
+<wire x1="88.9" y1="29.76" x2="88.985" y2="29.795" width="0.4064" layer="1"/>
+<wire x1="26.035" y1="25.425" x2="20.955" y2="25.425" width="0.4064" layer="1"/>
+<wire x1="20.955" y1="25.425" x2="20.955" y2="28.8925" width="0.4064" layer="1"/>
+<wire x1="20.955" y1="28.8925" x2="18.872" y2="28.8925" width="0.4064" layer="1"/>
+<wire x1="18.872" y1="28.8925" x2="18.872" y2="28.82" width="0.4064" layer="1"/>
+<wire x1="26.67" y1="27.27" x2="26.67" y2="27.305" width="0.4064" layer="16"/>
+<wire x1="26.67" y1="26.67" x2="26.67" y2="27.27" width="0.4064" layer="16"/>
+<wire x1="26.67" y1="26.06" x2="26.67" y2="26.67" width="0" layer="19" extent="1-16"/>
+</signal>
+<signal name="PB0">
+<contactref element="IC1" pad="5"/>
+<contactref element="TP1" pad="TP"/>
+<wire x1="24.765" y1="35.2675" x2="24.765" y2="34.315" width="0.4064" layer="1"/>
+<wire x1="24.765" y1="34.315" x2="25.4" y2="33.68" width="0.4064" layer="1"/>
+<wire x1="25.4" y1="33.68" x2="25.4" y2="32.47" width="0.4064" layer="1"/>
+<wire x1="25.4" y1="32.47" x2="25.4" y2="32.47" width="0" layer="19" extent="1-16"/>
+</signal>
+<signal name="PB1">
+<contactref element="IC1" pad="6"/>
+<contactref element="TP2" pad="TP"/>
+<wire x1="26.3525" y1="35.2675" x2="26.3525" y2="34.315" width="0.4064" layer="1"/>
+<wire x1="26.3525" y1="34.315" x2="26.67" y2="33.9975" width="0.4064" layer="1"/>
+<wire x1="26.67" y1="33.9975" x2="26.67" y2="32.47" width="0.4064" layer="1"/>
+<wire x1="26.67" y1="32.47" x2="26.67" y2="32.47" width="0" layer="19" extent="1-16"/>
+</signal>
+<signal name="PB2">
+<contactref element="IC1" pad="7"/>
+<contactref element="TP3" pad="TP"/>
+<wire x1="27.94" y1="35.2675" x2="27.94" y2="32.47" width="0.4064" layer="1"/>
+<wire x1="27.94" y1="32.47" x2="27.94" y2="32.47" width="0" layer="19" extent="1-16"/>
+</signal>
+<signal name="N$9">
+<via x="0" y="54" extent="1-16" drill="0.6" diameter="0.254" shape="square"/>
+</signal>
+<signal name="N$10">
+<via x="0" y="0" extent="1-16" drill="0.6" diameter="0.254" shape="square"/>
+</signal>
+<signal name="N$11">
+<via x="85.6" y="54" extent="1-16" drill="0.6" diameter="0.254" shape="square"/>
+</signal>
+<signal name="N$12">
+<via x="85.6" y="0" extent="1-16" drill="0.6" diameter="0.254" shape="square"/>
+</signal>
+<signal name="N$13">
+<wire x1="0" y1="51.8" x2="2.2" y2="54" width="0.1" layer="16" curve="-90"/>
+<wire x1="2.2" y1="0" x2="0" y2="2.2" width="0.1" layer="16" curve="-90"/>
+<wire x1="85.6" y1="2.2" x2="83.4" y2="0" width="0.1" layer="16" curve="-90"/>
+<wire x1="83.4" y1="54" x2="85.6" y2="51.8" width="0.1" layer="16" curve="-90"/>
+<wire x1="83.4" y1="54" x2="2.2" y2="54" width="0.1" layer="16"/>
+<wire x1="0" y1="51.8" x2="0" y2="2.2" width="0.1" layer="16"/>
+<wire x1="2.2" y1="0" x2="83.4" y2="0" width="0.1" layer="16"/>
+<wire x1="85.6" y1="2.2" x2="85.6" y2="23.9305" width="0.1" layer="16"/>
+<wire x1="85.6" y1="51.8" x2="85.6" y2="35.1505" width="0.1" layer="16"/>
+</signal>
+<signal name="N$16">
+<wire x1="7.20725" y1="37.49675" x2="6.25475" y2="36.54425" width="0.1" layer="16" curve="90"/>
+<wire x1="6.25475" y1="36.54425" x2="6.25475" y2="23.495" width="0.1" layer="16"/>
+<wire x1="6.25475" y1="23.495" x2="7.239" y2="22.51075" width="0.1" layer="16" curve="90"/>
+<wire x1="7.239" y1="22.51075" x2="27.94" y2="22.51075" width="0.1" layer="16"/>
+<wire x1="27.94" y1="22.51075" x2="28.1305" y2="22.5425" width="0.1" layer="16"/>
+<wire x1="28.1305" y1="22.5425" x2="28.35275" y2="22.63775" width="0.1" layer="16"/>
+<wire x1="28.35275" y1="22.63775" x2="28.54325" y2="22.7965" width="0.1" layer="16"/>
+<wire x1="28.54325" y1="22.7965" x2="31.0515" y2="25.30475" width="0.1" layer="16"/>
+<wire x1="31.0515" y1="25.30475" x2="31.14675" y2="25.4635" width="0.1" layer="16"/>
+<wire x1="31.14675" y1="25.4635" x2="31.21025" y2="25.654" width="0.1" layer="16"/>
+<wire x1="31.21025" y1="25.654" x2="31.242" y2="25.8445" width="0.1" layer="16"/>
+<wire x1="31.242" y1="36.5125" x2="30.25775" y2="37.49675" width="0.1" layer="16" curve="90"/>
+<wire x1="30.25775" y1="37.49675" x2="7.20725" y2="37.49675" width="0.1" layer="16"/>
+</signal>
+<signal name="N$17">
+<wire x1="31.242" y1="36.48075" x2="31.242" y2="32.5755" width="0.1" layer="16"/>
+</signal>
+<signal name="N$18">
+<wire x1="31.242" y1="25.8445" x2="31.242" y2="27.1145" width="0.1" layer="16"/>
+</signal>
+<signal name="N$1">
+<wire x1="1.5875" y1="6.6675" x2="4.1275" y2="11.43" width="0.4064" layer="1"/>
+<wire x1="4.1275" y1="11.43" x2="4.1275" y2="9.8425" width="0.4064" layer="1"/>
+<wire x1="4.1275" y1="9.8425" x2="12.3825" y2="9.8425" width="0.4064" layer="1"/>
+<wire x1="1.5875" y1="6.6675" x2="4.1275" y2="1.905" width="0.4064" layer="1"/>
+<wire x1="4.1275" y1="1.905" x2="4.1275" y2="3.4925" width="0.4064" layer="1"/>
+<wire x1="4.1275" y1="3.4925" x2="12.3825" y2="3.4925" width="0.4064" layer="1"/>
+</signal>
+<signal name="N$2">
+<wire x1="25.4" y1="31.75" x2="25.4" y2="32.385" width="0.4064" layer="1"/>
+</signal>
+<signal name="N$3">
+<wire x1="26.67" y1="31.75" x2="26.67" y2="32.385" width="0.4064" layer="1"/>
+</signal>
+<signal name="N$4">
+<wire x1="27.94" y1="31.75" x2="27.94" y2="32.385" width="0.4064" layer="1"/>
+</signal>
+</signals>
+</board>
+</drawing>
+</eagle>
diff --git a/layout/telekarte.pdf b/layout/telekarte.pdf
new file mode 100755
index 0000000..e95ad0c
--- /dev/null
+++ b/layout/telekarte.pdf
Binary files differ
diff --git a/layout/telekarte.sch b/layout/telekarte.sch
new file mode 100755
index 0000000..92d2b1c
--- /dev/null
+++ b/layout/telekarte.sch
@@ -0,0 +1,4796 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE eagle SYSTEM "eagle.dtd">
+<eagle version="6.3">
+<drawing>
+<settings>
+<setting alwaysvectorfont="no"/>
+<setting verticaltext="up"/>
+</settings>
+<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" altunitdist="inch" altunit="inch"/>
+<layers>
+<layer number="1" name="Top" color="4" fill="1" visible="no" active="no"/>
+<layer number="2" name="Route2" color="1" fill="3" visible="no" active="no"/>
+<layer number="3" name="Route3" color="4" fill="3" visible="no" active="no"/>
+<layer number="4" name="Route4" color="1" fill="4" visible="no" active="no"/>
+<layer number="5" name="Route5" color="4" fill="4" visible="no" active="no"/>
+<layer number="6" name="Route6" color="1" fill="8" visible="no" active="no"/>
+<layer number="7" name="Route7" color="4" fill="8" visible="no" active="no"/>
+<layer number="8" name="Route8" color="1" fill="2" visible="no" active="no"/>
+<layer number="9" name="Route9" color="4" fill="2" visible="no" active="no"/>
+<layer number="10" name="Route10" color="1" fill="7" visible="no" active="no"/>
+<layer number="11" name="Route11" color="4" fill="7" visible="no" active="no"/>
+<layer number="12" name="Route12" color="1" fill="5" visible="no" active="no"/>
+<layer number="13" name="Route13" color="4" fill="5" visible="no" active="no"/>
+<layer number="14" name="Route14" color="1" fill="6" visible="no" active="no"/>
+<layer number="15" name="Route15" color="4" fill="6" visible="no" active="no"/>
+<layer number="16" name="Bottom" color="1" fill="1" visible="no" active="no"/>
+<layer number="17" name="Pads" color="2" fill="1" visible="no" active="no"/>
+<layer number="18" name="Vias" color="2" fill="1" visible="no" active="no"/>
+<layer number="19" name="Unrouted" color="6" fill="1" visible="no" active="no"/>
+<layer number="20" name="Dimension" color="15" fill="1" visible="no" active="no"/>
+<layer number="21" name="tPlace" color="7" fill="1" visible="no" active="no"/>
+<layer number="22" name="bPlace" color="7" fill="1" visible="no" active="no"/>
+<layer number="23" name="tOrigins" color="15" fill="1" visible="no" active="no"/>
+<layer number="24" name="bOrigins" color="15" fill="1" visible="no" active="no"/>
+<layer number="25" name="tNames" color="7" fill="1" visible="no" active="no"/>
+<layer number="26" name="bNames" color="7" fill="1" visible="no" active="no"/>
+<layer number="27" name="tValues" color="7" fill="1" visible="no" active="no"/>
+<layer number="28" name="bValues" color="7" fill="1" visible="no" active="no"/>
+<layer number="29" name="tStop" color="7" fill="3" visible="no" active="no"/>
+<layer number="30" name="bStop" color="7" fill="6" visible="no" active="no"/>
+<layer number="31" name="tCream" color="7" fill="4" visible="no" active="no"/>
+<layer number="32" name="bCream" color="7" fill="5" visible="no" active="no"/>
+<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="no"/>
+<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="no"/>
+<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="no"/>
+<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="no"/>
+<layer number="37" name="tTest" color="7" fill="1" visible="no" active="no"/>
+<layer number="38" name="bTest" color="7" fill="1" visible="no" active="no"/>
+<layer number="39" name="tKeepout" color="4" fill="11" visible="no" active="no"/>
+<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="no"/>
+<layer number="41" name="tRestrict" color="4" fill="10" visible="no" active="no"/>
+<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="no"/>
+<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="no"/>
+<layer number="44" name="Drills" color="7" fill="1" visible="no" active="no"/>
+<layer number="45" name="Holes" color="7" fill="1" visible="no" active="no"/>
+<layer number="46" name="Milling" color="3" fill="1" visible="no" active="no"/>
+<layer number="47" name="Measures" color="7" fill="1" visible="no" active="no"/>
+<layer number="48" name="Document" color="7" fill="1" visible="no" active="no"/>
+<layer number="49" name="Reference" color="7" fill="1" visible="no" active="no"/>
+<layer number="51" name="tDocu" color="7" fill="1" visible="no" active="no"/>
+<layer number="52" name="bDocu" color="7" fill="1" visible="no" active="no"/>
+<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
+<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
+<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
+<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
+<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
+<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
+<layer number="200" name="200bmp" color="1" fill="10" visible="no" active="no"/>
+</layers>
+<schematic xreflabel="%F%N/%S.%C%R" xrefpart="/%S.%C%R">
+<libraries>
+<library name="con-chipcard-iso7816">
+<description>&lt;b&gt;ISO 7816 Chipcard (Package)&lt;/b&gt;&lt;p&gt;
+&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>
+<packages>
+<package name="ISO7816">
+<description>&lt;b&gt;ISO 7816 Chipcard&lt;/b&gt;</description>
+<wire x1="1" y1="0" x2="24" y2="0" width="0.0002" layer="21"/>
+<wire x1="1" y1="-15" x2="21.7" y2="-15" width="0.0002" layer="21"/>
+<wire x1="0" y1="-1" x2="0" y2="-14" width="0.0002" layer="21"/>
+<wire x1="25" y1="-11.6" x2="25" y2="-1" width="0.0002" layer="21"/>
+<wire x1="-6.25" y1="-30" x2="-6.25" y2="14.48" width="0.0002" layer="21"/>
+<wire x1="-4.25" y1="16.48" x2="30" y2="16.48" width="0.0002" layer="21"/>
+<wire x1="-6.25" y1="14.48" x2="-4.25" y2="16.48" width="0.0002" layer="21" curve="-90"/>
+<wire x1="22.3" y1="-14.7" x2="24.8" y2="-12.2" width="0.0002" layer="21"/>
+<wire x1="0" y1="-14" x2="1" y2="-15" width="0.0002" layer="21" curve="90"/>
+<wire x1="24" y1="0" x2="25" y2="-1" width="0.0002" layer="21" curve="-90"/>
+<wire x1="24.8" y1="-12.2" x2="25" y2="-11.6" width="0.0002" layer="21" curve="36.869898"/>
+<wire x1="21.7" y1="-15" x2="22.3" y2="-14.7" width="0.0002" layer="21" curve="38.88007"/>
+<wire x1="0" y1="-1" x2="1" y2="0" width="0.0002" layer="21" curve="-90"/>
+<wire x1="6.1341" y1="-5.2197" x2="7.3279" y2="-6.4135" width="0.4064" layer="51"/>
+<wire x1="7.3279" y1="-6.4135" x2="7.1628" y2="-6.731" width="0.4064" layer="51"/>
+<wire x1="7.1628" y1="-6.731" x2="7.0866" y2="-7.0485" width="0.4064" layer="51"/>
+<wire x1="7.0866" y1="-7.0485" x2="6.1087" y2="-7.0485" width="0.4064" layer="51"/>
+<wire x1="6.1214" y1="-6.6675" x2="6.9215" y2="-6.6675" width="0.4064" layer="51"/>
+<wire x1="6.9215" y1="-6.6675" x2="6.9215" y2="-6.5532" width="0.4064" layer="51"/>
+<wire x1="6.9215" y1="-6.5532" x2="6.1087" y2="-5.7404" width="0.4064" layer="51"/>
+<wire x1="6.3881" y1="-6.4897" x2="6.1849" y2="-6.2865" width="0.4064" layer="51"/>
+<wire x1="8.4709" y1="-4.7625" x2="8.4709" y2="-5.6515" width="0.4064" layer="51"/>
+<wire x1="8.4709" y1="-5.6515" x2="8.1407" y2="-5.7531" width="0.4064" layer="51"/>
+<wire x1="8.1407" y1="-5.7531" x2="7.8359" y2="-5.9182" width="0.4064" layer="51"/>
+<wire x1="7.8359" y1="-5.9182" x2="6.477" y2="-4.5593" width="0.4064" layer="51"/>
+<wire x1="8.0899" y1="-4.699" x2="8.0899" y2="-5.4483" width="0.4064" layer="51"/>
+<wire x1="8.0899" y1="-5.4483" x2="7.9883" y2="-5.5499" width="0.4064" layer="51"/>
+<wire x1="7.9883" y1="-5.5499" x2="7.0866" y2="-4.6482" width="0.4064" layer="51"/>
+<wire x1="7.9883" y1="-5.0165" x2="7.5946" y2="-4.6228" width="0.4064" layer="51"/>
+<wire x1="9.1821" y1="-4.6609" x2="9.1821" y2="-6.35" width="0.4064" layer="51"/>
+<wire x1="9.1821" y1="-6.35" x2="9.3726" y2="-6.35" width="0.4064" layer="51"/>
+<wire x1="9.3726" y1="-6.35" x2="11.1633" y2="-4.5593" width="0.4064" layer="51"/>
+<wire x1="9.5631" y1="-4.6609" x2="9.5631" y2="-5.6261" width="0.4064" layer="51"/>
+<wire x1="9.5631" y1="-5.6261" x2="9.3472" y2="-5.842" width="0.4064" layer="51"/>
+<wire x1="9.5631" y1="-5.6261" x2="10.6045" y2="-4.5847" width="0.4064" layer="51"/>
+<wire x1="9.6774" y1="-4.9784" x2="10.0457" y2="-4.6101" width="0.4064" layer="51"/>
+<wire x1="11.43" y1="-7.0485" x2="10.5791" y2="-7.0485" width="0.4064" layer="51"/>
+<wire x1="10.5791" y1="-7.0485" x2="10.4648" y2="-6.6929" width="0.4064" layer="51"/>
+<wire x1="10.4648" y1="-6.6929" x2="10.3124" y2="-6.4262" width="0.4064" layer="51"/>
+<wire x1="10.3124" y1="-6.4262" x2="11.5189" y2="-5.2197" width="0.4064" layer="51"/>
+<wire x1="11.4681" y1="-6.6675" x2="10.795" y2="-6.6675" width="0.4064" layer="51"/>
+<wire x1="10.795" y1="-6.6675" x2="10.6934" y2="-6.5659" width="0.4064" layer="51"/>
+<wire x1="10.6934" y1="-6.5659" x2="11.5316" y2="-5.7277" width="0.4064" layer="51"/>
+<wire x1="11.1887" y1="-6.5278" x2="11.4427" y2="-6.2738" width="0.4064" layer="51"/>
+<wire x1="11.43" y1="-7.7597" x2="10.5791" y2="-7.7597" width="0.4064" layer="51"/>
+<wire x1="10.5791" y1="-7.7597" x2="10.4902" y2="-8.0645" width="0.4064" layer="51"/>
+<wire x1="10.4902" y1="-8.0645" x2="10.3124" y2="-8.382" width="0.4064" layer="51"/>
+<wire x1="10.3124" y1="-8.382" x2="11.5189" y2="-9.5885" width="0.4064" layer="51"/>
+<wire x1="11.4681" y1="-8.1407" x2="10.7696" y2="-8.1407" width="0.4064" layer="51"/>
+<wire x1="10.7696" y1="-8.1407" x2="10.6807" y2="-8.2296" width="0.4064" layer="51"/>
+<wire x1="10.6807" y1="-8.2296" x2="11.5062" y2="-9.0551" width="0.4064" layer="51"/>
+<wire x1="11.5316" y1="-8.5471" x2="11.2395" y2="-8.255" width="0.4064" layer="51"/>
+<wire x1="9.1821" y1="-10.0965" x2="9.1821" y2="-9.1567" width="0.4064" layer="51"/>
+<wire x1="9.1821" y1="-9.1567" x2="9.4996" y2="-9.0551" width="0.4064" layer="51"/>
+<wire x1="9.4996" y1="-9.0551" x2="9.8044" y2="-8.89" width="0.4064" layer="51"/>
+<wire x1="9.8044" y1="-8.89" x2="11.1633" y2="-10.2489" width="0.4064" layer="51"/>
+<wire x1="9.5631" y1="-10.1219" x2="9.5631" y2="-9.3472" width="0.4064" layer="51"/>
+<wire x1="9.5631" y1="-9.3472" x2="9.652" y2="-9.2583" width="0.4064" layer="51"/>
+<wire x1="9.652" y1="-9.2583" x2="10.541" y2="-10.1473" width="0.4064" layer="51"/>
+<wire x1="10.0711" y1="-10.2108" x2="9.6647" y2="-9.8044" width="0.4064" layer="51"/>
+<wire x1="8.4709" y1="-10.1092" x2="8.4709" y2="-9.1567" width="0.4064" layer="51"/>
+<wire x1="8.4709" y1="-9.1567" x2="8.1407" y2="-9.0551" width="0.4064" layer="51"/>
+<wire x1="8.1407" y1="-9.0551" x2="7.8486" y2="-8.89" width="0.4064" layer="51"/>
+<wire x1="7.8486" y1="-8.89" x2="6.5024" y2="-10.2362" width="0.4064" layer="51"/>
+<wire x1="8.1026" y1="-10.1346" x2="8.1026" y2="-9.3345" width="0.4064" layer="51"/>
+<wire x1="8.1026" y1="-9.3345" x2="8.0137" y2="-9.2456" width="0.4064" layer="51"/>
+<wire x1="8.0137" y1="-9.2456" x2="7.0485" y2="-10.2108" width="0.4064" layer="51"/>
+<wire x1="7.6073" y1="-10.1854" x2="8.001" y2="-9.7917" width="0.4064" layer="51"/>
+<wire x1="6.1341" y1="-9.5885" x2="7.3279" y2="-8.3947" width="0.4064" layer="51"/>
+<wire x1="7.3279" y1="-8.3947" x2="7.1755" y2="-8.0772" width="0.4064" layer="51"/>
+<wire x1="7.1755" y1="-8.0772" x2="7.0866" y2="-7.7597" width="0.4064" layer="51"/>
+<wire x1="7.0866" y1="-7.7597" x2="6.1722" y2="-7.7597" width="0.4064" layer="51"/>
+<wire x1="6.1468" y1="-8.128" x2="6.8707" y2="-8.128" width="0.4064" layer="51"/>
+<wire x1="6.8707" y1="-8.128" x2="6.9723" y2="-8.2296" width="0.4064" layer="51"/>
+<wire x1="6.9723" y1="-8.2296" x2="6.1468" y2="-9.0551" width="0.4064" layer="51"/>
+<wire x1="6.1087" y1="-8.5852" x2="6.4389" y2="-8.255" width="0.4064" layer="51"/>
+<wire x1="6.4389" y1="-8.255" x2="6.4389" y2="-8.2296" width="0.4064" layer="51"/>
+<circle x="8.8265" y="-7.4041" radius="1.27" width="0" layer="51"/>
+<smd name="C1" x="4.999" y="-3.599" dx="2" dy="1.7" layer="1"/>
+<smd name="C2" x="4.999" y="-6.138" dx="2" dy="1.7" layer="1"/>
+<smd name="C3" x="4.999" y="-8.683" dx="2" dy="1.7" layer="1"/>
+<smd name="C4" x="4.999" y="-11.222" dx="2" dy="1.7" layer="1"/>
+<smd name="C8" x="12.622" y="-11.222" dx="2" dy="1.7" layer="1"/>
+<smd name="C7" x="12.622" y="-8.68" dx="2" dy="1.7" layer="1"/>
+<smd name="C6" x="12.622" y="-6.14" dx="2" dy="1.7" layer="1"/>
+<smd name="C5" x="12.622" y="-3.6" dx="2" dy="1.7" layer="1"/>
+<text x="-0.316" y="-4.1" size="1.016" layer="51">VCC</text>
+<text x="-0.316" y="-6.6" size="1.016" layer="51">RST</text>
+<text x="-0.316" y="-9.2" size="1.016" layer="51">CLK</text>
+<text x="-0.316" y="-11.7" size="1.016" layer="51">NC</text>
+<text x="15.289" y="-9.2" size="1.016" layer="51">I/O</text>
+<text x="15.289" y="-4.1" size="1.016" layer="51">GND</text>
+<text x="3.81" y="1.27" size="1.27" layer="25">&gt;NAME</text>
+<text x="3.81" y="-17.78" size="1.27" layer="27">&gt;VALUE</text>
+<text x="15.289" y="-11.7" size="1.016" layer="51">NC </text>
+<text x="15.289" y="-6.6" size="1.016" layer="51">NC </text>
+<rectangle x1="2.8702" y1="-7.2517" x2="6.223" y2="-5.0165" layer="51"/>
+<rectangle x1="11.43" y1="-7.2517" x2="14.7828" y2="-5.0165" layer="51"/>
+<rectangle x1="2.8702" y1="-9.7917" x2="6.223" y2="-7.5565" layer="51"/>
+<rectangle x1="11.43" y1="-9.7917" x2="14.7828" y2="-7.5565" layer="51"/>
+<rectangle x1="2.8702" y1="-4.699" x2="8.6741" y2="-2.159" layer="51"/>
+<rectangle x1="2.8702" y1="-12.6365" x2="8.6741" y2="-10.0965" layer="51"/>
+<rectangle x1="8.9789" y1="-12.6365" x2="14.7828" y2="-10.0965" layer="51"/>
+<rectangle x1="8.9789" y1="-4.7117" x2="14.7828" y2="-2.1717" layer="51"/>
+</package>
+<package name="ISO-7816">
+<description>&lt;b&gt;ISO7816-1 Standard&lt;/b&gt; Chip Card&lt;p&gt;
+Source: http://www.didya.com/iso-7816.asp</description>
+<wire x1="7.25" y1="-16.5" x2="30.25" y2="-16.5" width="0.0002" layer="21"/>
+<wire x1="7.25" y1="-31.5" x2="27.95" y2="-31.5" width="0.0002" layer="21"/>
+<wire x1="6.25" y1="-17.5" x2="6.25" y2="-30.5" width="0.0002" layer="21"/>
+<wire x1="31.25" y1="-28.1" x2="31.25" y2="-17.5" width="0.0002" layer="21"/>
+<wire x1="0" y1="-46.5" x2="0" y2="-2.25" width="0.0002" layer="21"/>
+<wire x1="2.25" y1="0" x2="36.25" y2="0" width="0.0002" layer="21"/>
+<wire x1="0" y1="-2.25" x2="2.25" y2="0" width="0.0002" layer="21" curve="-90"/>
+<wire x1="28.55" y1="-31.2" x2="31.05" y2="-28.7" width="0.0002" layer="21"/>
+<wire x1="6.25" y1="-30.5" x2="7.25" y2="-31.5" width="0.0002" layer="21" curve="90"/>
+<wire x1="30.25" y1="-16.5" x2="31.25" y2="-17.5" width="0.0002" layer="21" curve="-90"/>
+<wire x1="31.05" y1="-28.7" x2="31.25" y2="-28.1" width="0.0002" layer="21" curve="36.869898"/>
+<wire x1="27.95" y1="-31.5" x2="28.55" y2="-31.2" width="0.0002" layer="21" curve="38.88007"/>
+<wire x1="6.25" y1="-17.5" x2="7.25" y2="-16.5" width="0.0002" layer="21" curve="-90"/>
+<wire x1="12.3841" y1="-21.7197" x2="13.5779" y2="-22.9135" width="0.4064" layer="51"/>
+<wire x1="13.5779" y1="-22.9135" x2="13.4128" y2="-23.231" width="0.4064" layer="51"/>
+<wire x1="13.4128" y1="-23.231" x2="13.3366" y2="-23.5485" width="0.4064" layer="51"/>
+<wire x1="13.3366" y1="-23.5485" x2="12.3587" y2="-23.5485" width="0.4064" layer="51"/>
+<wire x1="12.3714" y1="-23.1675" x2="13.1715" y2="-23.1675" width="0.4064" layer="51"/>
+<wire x1="13.1715" y1="-23.1675" x2="13.1715" y2="-23.0532" width="0.4064" layer="51"/>
+<wire x1="13.1715" y1="-23.0532" x2="12.3587" y2="-22.2404" width="0.4064" layer="51"/>
+<wire x1="12.6381" y1="-22.9897" x2="12.4349" y2="-22.7865" width="0.4064" layer="51"/>
+<wire x1="14.7209" y1="-21.2625" x2="14.7209" y2="-22.1515" width="0.4064" layer="51"/>
+<wire x1="14.7209" y1="-22.1515" x2="14.3907" y2="-22.2531" width="0.4064" layer="51"/>
+<wire x1="14.3907" y1="-22.2531" x2="14.0859" y2="-22.4182" width="0.4064" layer="51"/>
+<wire x1="14.0859" y1="-22.4182" x2="12.727" y2="-21.0593" width="0.4064" layer="51"/>
+<wire x1="14.3399" y1="-21.199" x2="14.3399" y2="-21.9483" width="0.4064" layer="51"/>
+<wire x1="14.3399" y1="-21.9483" x2="14.2383" y2="-22.0499" width="0.4064" layer="51"/>
+<wire x1="14.2383" y1="-22.0499" x2="13.3366" y2="-21.1482" width="0.4064" layer="51"/>
+<wire x1="14.2383" y1="-21.5165" x2="13.8446" y2="-21.1228" width="0.4064" layer="51"/>
+<wire x1="15.4321" y1="-21.1609" x2="15.4321" y2="-22.85" width="0.4064" layer="51"/>
+<wire x1="15.4321" y1="-22.85" x2="15.6226" y2="-22.85" width="0.4064" layer="51"/>
+<wire x1="15.6226" y1="-22.85" x2="17.4133" y2="-21.0593" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-21.1609" x2="15.8131" y2="-22.1261" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-22.1261" x2="15.5972" y2="-22.342" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-22.1261" x2="16.8545" y2="-21.0847" width="0.4064" layer="51"/>
+<wire x1="15.9274" y1="-21.4784" x2="16.2957" y2="-21.1101" width="0.4064" layer="51"/>
+<wire x1="17.68" y1="-23.5485" x2="16.8291" y2="-23.5485" width="0.4064" layer="51"/>
+<wire x1="16.8291" y1="-23.5485" x2="16.7148" y2="-23.1929" width="0.4064" layer="51"/>
+<wire x1="16.7148" y1="-23.1929" x2="16.5624" y2="-22.9262" width="0.4064" layer="51"/>
+<wire x1="16.5624" y1="-22.9262" x2="17.7689" y2="-21.7197" width="0.4064" layer="51"/>
+<wire x1="17.7181" y1="-23.1675" x2="17.045" y2="-23.1675" width="0.4064" layer="51"/>
+<wire x1="17.045" y1="-23.1675" x2="16.9434" y2="-23.0659" width="0.4064" layer="51"/>
+<wire x1="16.9434" y1="-23.0659" x2="17.7816" y2="-22.2277" width="0.4064" layer="51"/>
+<wire x1="17.4387" y1="-23.0278" x2="17.6927" y2="-22.7738" width="0.4064" layer="51"/>
+<wire x1="17.68" y1="-24.2597" x2="16.8291" y2="-24.2597" width="0.4064" layer="51"/>
+<wire x1="16.8291" y1="-24.2597" x2="16.7402" y2="-24.5645" width="0.4064" layer="51"/>
+<wire x1="16.7402" y1="-24.5645" x2="16.5624" y2="-24.882" width="0.4064" layer="51"/>
+<wire x1="16.5624" y1="-24.882" x2="17.7689" y2="-26.0885" width="0.4064" layer="51"/>
+<wire x1="17.7181" y1="-24.6407" x2="17.0196" y2="-24.6407" width="0.4064" layer="51"/>
+<wire x1="17.0196" y1="-24.6407" x2="16.9307" y2="-24.7296" width="0.4064" layer="51"/>
+<wire x1="16.9307" y1="-24.7296" x2="17.7562" y2="-25.5551" width="0.4064" layer="51"/>
+<wire x1="17.7816" y1="-25.0471" x2="17.4895" y2="-24.755" width="0.4064" layer="51"/>
+<wire x1="15.4321" y1="-26.5965" x2="15.4321" y2="-25.6567" width="0.4064" layer="51"/>
+<wire x1="15.4321" y1="-25.6567" x2="15.7496" y2="-25.5551" width="0.4064" layer="51"/>
+<wire x1="15.7496" y1="-25.5551" x2="16.0544" y2="-25.39" width="0.4064" layer="51"/>
+<wire x1="16.0544" y1="-25.39" x2="17.4133" y2="-26.7489" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-26.6219" x2="15.8131" y2="-25.8472" width="0.4064" layer="51"/>
+<wire x1="15.8131" y1="-25.8472" x2="15.902" y2="-25.7583" width="0.4064" layer="51"/>
+<wire x1="15.902" y1="-25.7583" x2="16.791" y2="-26.6473" width="0.4064" layer="51"/>
+<wire x1="16.3211" y1="-26.7108" x2="15.9147" y2="-26.3044" width="0.4064" layer="51"/>
+<wire x1="14.7209" y1="-26.6092" x2="14.7209" y2="-25.6567" width="0.4064" layer="51"/>
+<wire x1="14.7209" y1="-25.6567" x2="14.3907" y2="-25.5551" width="0.4064" layer="51"/>
+<wire x1="14.3907" y1="-25.5551" x2="14.0986" y2="-25.39" width="0.4064" layer="51"/>
+<wire x1="14.0986" y1="-25.39" x2="12.7524" y2="-26.7362" width="0.4064" layer="51"/>
+<wire x1="14.3526" y1="-26.6346" x2="14.3526" y2="-25.8345" width="0.4064" layer="51"/>
+<wire x1="14.3526" y1="-25.8345" x2="14.2637" y2="-25.7456" width="0.4064" layer="51"/>
+<wire x1="14.2637" y1="-25.7456" x2="13.2985" y2="-26.7108" width="0.4064" layer="51"/>
+<wire x1="13.8573" y1="-26.6854" x2="14.251" y2="-26.2917" width="0.4064" layer="51"/>
+<wire x1="12.3841" y1="-26.0885" x2="13.5779" y2="-24.8947" width="0.4064" layer="51"/>
+<wire x1="13.5779" y1="-24.8947" x2="13.4255" y2="-24.5772" width="0.4064" layer="51"/>
+<wire x1="13.4255" y1="-24.5772" x2="13.3366" y2="-24.2597" width="0.4064" layer="51"/>
+<wire x1="13.3366" y1="-24.2597" x2="12.4222" y2="-24.2597" width="0.4064" layer="51"/>
+<wire x1="12.3968" y1="-24.628" x2="13.1207" y2="-24.628" width="0.4064" layer="51"/>
+<wire x1="13.1207" y1="-24.628" x2="13.2223" y2="-24.7296" width="0.4064" layer="51"/>
+<wire x1="13.2223" y1="-24.7296" x2="12.3968" y2="-25.5551" width="0.4064" layer="51"/>
+<wire x1="12.3587" y1="-25.0852" x2="12.6889" y2="-24.755" width="0.4064" layer="51"/>
+<wire x1="12.6889" y1="-24.755" x2="12.6889" y2="-24.7296" width="0.4064" layer="51"/>
+<circle x="15.0765" y="-23.9041" radius="1.27" width="0" layer="51"/>
+<smd name="C1" x="11.249" y="-20.099" dx="2" dy="1.7" layer="1"/>
+<smd name="C2" x="11.249" y="-22.638" dx="2" dy="1.7" layer="1"/>
+<smd name="C3" x="11.249" y="-25.183" dx="2" dy="1.7" layer="1"/>
+<smd name="C4" x="11.249" y="-27.722" dx="2" dy="1.7" layer="1"/>
+<smd name="C8" x="18.872" y="-27.722" dx="2" dy="1.7" layer="1"/>
+<smd name="C7" x="18.872" y="-25.18" dx="2" dy="1.7" layer="1"/>
+<smd name="C6" x="18.872" y="-22.64" dx="2" dy="1.7" layer="1"/>
+<smd name="C5" x="18.872" y="-20.1" dx="2" dy="1.7" layer="1"/>
+<text x="5.934" y="-20.6" size="1.016" layer="51">VCC</text>
+<text x="5.934" y="-23.1" size="1.016" layer="51">RST</text>
+<text x="5.934" y="-25.7" size="1.016" layer="51">CLK</text>
+<text x="5.934" y="-28.2" size="1.016" layer="51">NC</text>
+<text x="21.539" y="-25.7" size="1.016" layer="51">I/O</text>
+<text x="21.539" y="-20.6" size="1.016" layer="51">GND</text>
+<text x="10.06" y="-15.23" size="1.27" layer="25">&gt;NAME</text>
+<text x="10.06" y="-34.28" size="1.27" layer="27">&gt;VALUE</text>
+<text x="21.539" y="-28.2" size="1.016" layer="51">NC </text>
+<text x="21.539" y="-23.1" size="1.016" layer="51">NC </text>
+<rectangle x1="9.1202" y1="-23.7517" x2="12.473" y2="-21.5165" layer="51"/>
+<rectangle x1="17.68" y1="-23.7517" x2="21.0328" y2="-21.5165" layer="51"/>
+<rectangle x1="9.1202" y1="-26.2917" x2="12.473" y2="-24.0565" layer="51"/>
+<rectangle x1="17.68" y1="-26.2917" x2="21.0328" y2="-24.0565" layer="51"/>
+<rectangle x1="9.1202" y1="-21.199" x2="14.9241" y2="-18.659" layer="51"/>
+<rectangle x1="9.1202" y1="-29.1365" x2="14.9241" y2="-26.5965" layer="51"/>
+<rectangle x1="15.2289" y1="-29.1365" x2="21.0328" y2="-26.5965" layer="51"/>
+<rectangle x1="15.2289" y1="-21.2117" x2="21.0328" y2="-18.6717" layer="51"/>
+</package>
+<package name="AFNOR-CHIPCARD">
+<description>&lt;b&gt;AFNOR Chip Card&lt;/b&gt;&lt;p&gt;
+Source: http://www.didya.com/iso-7816.asp</description>
+<wire x1="0" y1="-46.5" x2="0" y2="-2.25" width="0.0002" layer="21"/>
+<wire x1="2.25" y1="0" x2="36.25" y2="0" width="0.0002" layer="21"/>
+<wire x1="0" y1="-2.25" x2="2.25" y2="0" width="0.0002" layer="21" curve="-90"/>
+<smd name="C1" x="18.8717" y="-17.5413" dx="2" dy="1.7" layer="1"/>
+<smd name="C2" x="18.8706" y="-14.9996" dx="2" dy="1.7" layer="1"/>
+<smd name="C3" x="18.868" y="-12.4572" dx="2" dy="1.7" layer="1"/>
+<smd name="C4" x="18.8714" y="-9.9198" dx="2" dy="1.7" layer="1"/>
+<smd name="C8" x="11.2516" y="-9.9198" dx="2" dy="1.7" layer="1"/>
+<smd name="C7" x="11.2504" y="-12.4593" dx="2" dy="1.7" layer="1"/>
+<smd name="C6" x="11.252" y="-14.9998" dx="2" dy="1.7" layer="1"/>
+<smd name="C5" x="11.2506" y="-17.5423" dx="2" dy="1.7" layer="1"/>
+<text x="7.62" y="-7.62" size="1.27" layer="25">&gt;NAME</text>
+<text x="7.52" y="-21.2" size="1.27" layer="27">&gt;VALUE</text>
+</package>
+</packages>
+<symbols>
+<symbol name="ISO7816">
+<wire x1="-2.7559" y1="0.8763" x2="-1.5621" y2="-0.3175" width="0.4064" layer="94"/>
+<wire x1="-1.5621" y1="-0.3175" x2="-1.7272" y2="-0.635" width="0.4064" layer="94"/>
+<wire x1="-1.7272" y1="-0.635" x2="-1.8034" y2="-0.9525" width="0.4064" layer="94"/>
+<wire x1="-1.8034" y1="-0.9525" x2="-2.7813" y2="-0.9525" width="0.4064" layer="94"/>
+<wire x1="-2.7686" y1="-0.5715" x2="-1.9685" y2="-0.5715" width="0.4064" layer="94"/>
+<wire x1="-1.9685" y1="-0.5715" x2="-1.9685" y2="-0.4572" width="0.4064" layer="94"/>
+<wire x1="-1.9685" y1="-0.4572" x2="-2.7813" y2="0.3556" width="0.4064" layer="94"/>
+<wire x1="-2.5019" y1="-0.3937" x2="-2.7051" y2="-0.1905" width="0.4064" layer="94"/>
+<wire x1="-0.4191" y1="1.3335" x2="-0.4191" y2="0.4445" width="0.4064" layer="94"/>
+<wire x1="-0.4191" y1="0.4445" x2="-0.7493" y2="0.3429" width="0.4064" layer="94"/>
+<wire x1="-0.7493" y1="0.3429" x2="-1.0541" y2="0.1778" width="0.4064" layer="94"/>
+<wire x1="-1.0541" y1="0.1778" x2="-2.413" y2="1.5367" width="0.4064" layer="94"/>
+<wire x1="-0.8001" y1="1.397" x2="-0.8001" y2="0.6477" width="0.4064" layer="94"/>
+<wire x1="-0.8001" y1="0.6477" x2="-0.9017" y2="0.5461" width="0.4064" layer="94"/>
+<wire x1="-0.9017" y1="0.5461" x2="-1.8034" y2="1.4478" width="0.4064" layer="94"/>
+<wire x1="-0.9017" y1="1.0795" x2="-1.2954" y2="1.4732" width="0.4064" layer="94"/>
+<wire x1="0.2921" y1="1.4351" x2="0.2921" y2="-0.254" width="0.4064" layer="94"/>
+<wire x1="0.2921" y1="-0.254" x2="0.4826" y2="-0.254" width="0.4064" layer="94"/>
+<wire x1="0.4826" y1="-0.254" x2="2.2733" y2="1.5367" width="0.4064" layer="94"/>
+<wire x1="0.6731" y1="1.4351" x2="0.6731" y2="0.4699" width="0.4064" layer="94"/>
+<wire x1="0.6731" y1="0.4699" x2="0.4572" y2="0.254" width="0.4064" layer="94"/>
+<wire x1="0.6731" y1="0.4699" x2="1.7145" y2="1.5113" width="0.4064" layer="94"/>
+<wire x1="0.7874" y1="1.1176" x2="1.1557" y2="1.4859" width="0.4064" layer="94"/>
+<wire x1="2.54" y1="-0.9525" x2="1.6891" y2="-0.9525" width="0.4064" layer="94"/>
+<wire x1="1.6891" y1="-0.9525" x2="1.5748" y2="-0.5969" width="0.4064" layer="94"/>
+<wire x1="1.5748" y1="-0.5969" x2="1.4224" y2="-0.3302" width="0.4064" layer="94"/>
+<wire x1="1.4224" y1="-0.3302" x2="2.6289" y2="0.8763" width="0.4064" layer="94"/>
+<wire x1="2.5781" y1="-0.5715" x2="1.905" y2="-0.5715" width="0.4064" layer="94"/>
+<wire x1="1.905" y1="-0.5715" x2="1.8034" y2="-0.4699" width="0.4064" layer="94"/>
+<wire x1="1.8034" y1="-0.4699" x2="2.6416" y2="0.3683" width="0.4064" layer="94"/>
+<wire x1="2.2987" y1="-0.4318" x2="2.5527" y2="-0.1778" width="0.4064" layer="94"/>
+<wire x1="2.54" y1="-1.6637" x2="1.6891" y2="-1.6637" width="0.4064" layer="94"/>
+<wire x1="1.6891" y1="-1.6637" x2="1.6002" y2="-1.9685" width="0.4064" layer="94"/>
+<wire x1="1.6002" y1="-1.9685" x2="1.4224" y2="-2.286" width="0.4064" layer="94"/>
+<wire x1="1.4224" y1="-2.286" x2="2.6289" y2="-3.4925" width="0.4064" layer="94"/>
+<wire x1="2.5781" y1="-2.0447" x2="1.8796" y2="-2.0447" width="0.4064" layer="94"/>
+<wire x1="1.8796" y1="-2.0447" x2="1.7907" y2="-2.1336" width="0.4064" layer="94"/>
+<wire x1="1.7907" y1="-2.1336" x2="2.6162" y2="-2.9591" width="0.4064" layer="94"/>
+<wire x1="2.6416" y1="-2.4511" x2="2.3495" y2="-2.159" width="0.4064" layer="94"/>
+<wire x1="0.2921" y1="-4.0005" x2="0.2921" y2="-3.0607" width="0.4064" layer="94"/>
+<wire x1="0.2921" y1="-3.0607" x2="0.6096" y2="-2.9591" width="0.4064" layer="94"/>
+<wire x1="0.6096" y1="-2.9591" x2="0.9144" y2="-2.794" width="0.4064" layer="94"/>
+<wire x1="0.9144" y1="-2.794" x2="2.2733" y2="-4.1529" width="0.4064" layer="94"/>
+<wire x1="0.6731" y1="-4.0259" x2="0.6731" y2="-3.2512" width="0.4064" layer="94"/>
+<wire x1="0.6731" y1="-3.2512" x2="0.762" y2="-3.1623" width="0.4064" layer="94"/>
+<wire x1="0.762" y1="-3.1623" x2="1.651" y2="-4.0513" width="0.4064" layer="94"/>
+<wire x1="1.1811" y1="-4.1148" x2="0.7747" y2="-3.7084" width="0.4064" layer="94"/>
+<wire x1="-0.4191" y1="-4.0132" x2="-0.4191" y2="-3.0607" width="0.4064" layer="94"/>
+<wire x1="-0.4191" y1="-3.0607" x2="-0.7493" y2="-2.9591" width="0.4064" layer="94"/>
+<wire x1="-0.7493" y1="-2.9591" x2="-1.0414" y2="-2.794" width="0.4064" layer="94"/>
+<wire x1="-1.0414" y1="-2.794" x2="-2.3876" y2="-4.1402" width="0.4064" layer="94"/>
+<wire x1="-0.7874" y1="-4.0386" x2="-0.7874" y2="-3.2385" width="0.4064" layer="94"/>
+<wire x1="-0.7874" y1="-3.2385" x2="-0.8763" y2="-3.1496" width="0.4064" layer="94"/>
+<wire x1="-0.8763" y1="-3.1496" x2="-1.8415" y2="-4.1148" width="0.4064" layer="94"/>
+<wire x1="-1.2827" y1="-4.0894" x2="-0.889" y2="-3.6957" width="0.4064" layer="94"/>
+<wire x1="-2.7559" y1="-3.4925" x2="-1.5621" y2="-2.2987" width="0.4064" layer="94"/>
+<wire x1="-1.5621" y1="-2.2987" x2="-1.7145" y2="-1.9812" width="0.4064" layer="94"/>
+<wire x1="-1.7145" y1="-1.9812" x2="-1.8034" y2="-1.6637" width="0.4064" layer="94"/>
+<wire x1="-1.8034" y1="-1.6637" x2="-2.7178" y2="-1.6637" width="0.4064" layer="94"/>
+<wire x1="-2.7432" y1="-2.032" x2="-2.0193" y2="-2.032" width="0.4064" layer="94"/>
+<wire x1="-2.0193" y1="-2.032" x2="-1.9177" y2="-2.1336" width="0.4064" layer="94"/>
+<wire x1="-1.9177" y1="-2.1336" x2="-2.7432" y2="-2.9591" width="0.4064" layer="94"/>
+<wire x1="-2.7813" y1="-2.4892" x2="-2.4511" y2="-2.159" width="0.4064" layer="94"/>
+<wire x1="-2.4511" y1="-2.159" x2="-2.4511" y2="-2.1336" width="0.4064" layer="94"/>
+<wire x1="-10.16" y1="2.54" x2="-5.08" y2="2.54" width="0.1524" layer="94"/>
+<wire x1="-10.16" y1="0" x2="-5.08" y2="0" width="0.1524" layer="94"/>
+<wire x1="-10.16" y1="-2.54" x2="-5.08" y2="-2.54" width="0.1524" layer="94"/>
+<wire x1="-10.16" y1="-5.08" x2="-5.08" y2="-5.08" width="0.1524" layer="94"/>
+<wire x1="10.16" y1="2.54" x2="5.08" y2="2.54" width="0.1524" layer="94"/>
+<wire x1="10.16" y1="0" x2="5.08" y2="0" width="0.1524" layer="94"/>
+<wire x1="10.16" y1="-2.54" x2="5.08" y2="-2.54" width="0.1524" layer="94"/>
+<wire x1="10.16" y1="-5.08" x2="5.08" y2="-5.08" width="0.1524" layer="94"/>
+<circle x="-0.0635" y="-1.3081" radius="1.27" width="0" layer="94"/>
+<text x="-8.952" y="1.234" size="1.016" layer="95">VCC</text>
+<text x="-8.952" y="-1.266" size="1.016" layer="95">RST</text>
+<text x="-8.952" y="-3.866" size="1.016" layer="95">CLK</text>
+<text x="-8.952" y="-6.366" size="1.016" layer="95">NC</text>
+<text x="6.399" y="-3.866" size="1.016" layer="95">I/O</text>
+<text x="6.399" y="1.234" size="1.016" layer="95">GND</text>
+<text x="-5.842" y="4.572" size="1.778" layer="95">&gt;NAME</text>
+<text x="-5.842" y="-8.89" size="1.778" layer="96">&gt;VALUE</text>
+<text x="6.399" y="-6.366" size="1.016" layer="95">NC </text>
+<text x="6.399" y="-1.266" size="1.016" layer="95">NC </text>
+<rectangle x1="-6.0198" y1="-1.1557" x2="-2.667" y2="1.0795" layer="94"/>
+<rectangle x1="2.54" y1="-1.1557" x2="5.8928" y2="1.0795" layer="94"/>
+<rectangle x1="-6.0198" y1="-3.6957" x2="-2.667" y2="-1.4605" layer="94"/>
+<rectangle x1="2.54" y1="-3.6957" x2="5.8928" y2="-1.4605" layer="94"/>
+<rectangle x1="-6.0198" y1="1.397" x2="-0.2159" y2="3.937" layer="94"/>
+<rectangle x1="-6.0198" y1="-6.5405" x2="-0.2159" y2="-4.0005" layer="94"/>
+<rectangle x1="0.0889" y1="-6.5405" x2="5.8928" y2="-4.0005" layer="94"/>
+<rectangle x1="0.0889" y1="1.3843" x2="5.8928" y2="3.9243" layer="94"/>
+<pin name="VCC" x="-12.7" y="2.54" visible="pad" length="short" direction="pas"/>
+<pin name="RST" x="-12.7" y="0" visible="pad" length="short" direction="pas"/>
+<pin name="CLK" x="-12.7" y="-2.54" visible="pad" length="short" direction="pas"/>
+<pin name="NC@4" x="-12.7" y="-5.08" visible="pad" length="short" direction="pas"/>
+<pin name="NC@8" x="12.7" y="-5.08" visible="pad" length="short" direction="pas" rot="R180"/>
+<pin name="I/O" x="12.7" y="-2.54" visible="pad" length="short" direction="pas" rot="R180"/>
+<pin name="NC@6" x="12.7" y="0" visible="pad" length="short" direction="pas" rot="R180"/>
+<pin name="GND" x="12.7" y="2.54" visible="pad" length="short" direction="pas" rot="R180"/>
+</symbol>
+</symbols>
+<devicesets>
+<deviceset name="CHIPCARD-ISO-7816" prefix="X">
+<description>&lt;b&gt;Chip card connector ISO 7816&lt;/b&gt;</description>
+<gates>
+<gate name="G$1" symbol="ISO7816" x="0" y="0"/>
+</gates>
+<devices>
+<device name="" package="ISO7816">
+<connects>
+<connect gate="G$1" pin="CLK" pad="C3"/>
+<connect gate="G$1" pin="GND" pad="C5"/>
+<connect gate="G$1" pin="I/O" pad="C7"/>
+<connect gate="G$1" pin="NC@4" pad="C4"/>
+<connect gate="G$1" pin="NC@6" pad="C6"/>
+<connect gate="G$1" pin="NC@8" pad="C8"/>
+<connect gate="G$1" pin="RST" pad="C2"/>
+<connect gate="G$1" pin="VCC" pad="C1"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="MF" value="" constant="no"/>
+<attribute name="MPN" value="" constant="no"/>
+<attribute name="OC_FARNELL" value="unknown" constant="no"/>
+<attribute name="OC_NEWARK" value="unknown" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="ISO" package="ISO-7816">
+<connects>
+<connect gate="G$1" pin="CLK" pad="C3"/>
+<connect gate="G$1" pin="GND" pad="C5"/>
+<connect gate="G$1" pin="I/O" pad="C7"/>
+<connect gate="G$1" pin="NC@4" pad="C4"/>
+<connect gate="G$1" pin="NC@6" pad="C6"/>
+<connect gate="G$1" pin="NC@8" pad="C8"/>
+<connect gate="G$1" pin="RST" pad="C2"/>
+<connect gate="G$1" pin="VCC" pad="C1"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="MF" value="" constant="no"/>
+<attribute name="MPN" value="" constant="no"/>
+<attribute name="OC_FARNELL" value="unknown" constant="no"/>
+<attribute name="OC_NEWARK" value="unknown" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="ANFOR" package="AFNOR-CHIPCARD">
+<connects>
+<connect gate="G$1" pin="CLK" pad="C3"/>
+<connect gate="G$1" pin="GND" pad="C5"/>
+<connect gate="G$1" pin="I/O" pad="C7"/>
+<connect gate="G$1" pin="NC@4" pad="C4"/>
+<connect gate="G$1" pin="NC@6" pad="C6"/>
+<connect gate="G$1" pin="NC@8" pad="C8"/>
+<connect gate="G$1" pin="RST" pad="C2"/>
+<connect gate="G$1" pin="VCC" pad="C1"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="MF" value="" constant="no"/>
+<attribute name="MPN" value="" constant="no"/>
+<attribute name="OC_FARNELL" value="unknown" constant="no"/>
+<attribute name="OC_NEWARK" value="unknown" constant="no"/>
+</technology>
+</technologies>
+</device>
+</devices>
+</deviceset>
+</devicesets>
+</library>
+<library name="atmel">
+<description>&lt;b&gt;AVR Devices&lt;/b&gt;&lt;p&gt;
+Configurable logic, microcontrollers, nonvolatile memories&lt;p&gt;
+Based on the following sources:&lt;p&gt;
+&lt;ul&gt;
+&lt;li&gt;www.atmel.com
+&lt;li&gt;CD-ROM : Configurable Logic Microcontroller Nonvolatile Memory
+&lt;li&gt;CadSoft download site, www.cadsoft.de or www.cadsoftusa.com , file at90smcu_v400.zip
+&lt;/ul&gt;
+&lt;author&gt;Revised by librarian@cadsoft.de&lt;/author&gt;</description>
+<packages>
+<package name="DIL08">
+<description>&lt;b&gt;Dual In Line Package&lt;/b&gt;</description>
+<wire x1="5.08" y1="2.921" x2="-5.08" y2="2.921" width="0.1778" layer="21"/>
+<wire x1="-5.08" y1="-2.921" x2="5.08" y2="-2.921" width="0.1778" layer="21"/>
+<wire x1="5.08" y1="2.921" x2="5.08" y2="-2.921" width="0.1778" layer="21"/>
+<wire x1="-5.08" y1="2.921" x2="-5.08" y2="0.6985" width="0.1778" layer="21"/>
+<wire x1="-5.08" y1="-2.921" x2="-5.08" y2="-0.6985" width="0.1778" layer="21"/>
+<wire x1="-5.08" y1="0.6985" x2="-5.08" y2="-0.6985" width="0.1778" layer="21" curve="-180"/>
+<pad name="1" x="-3.81" y="-3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="2" x="-1.27" y="-3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="7" x="-1.27" y="3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="8" x="-3.81" y="3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="3" x="1.27" y="-3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="4" x="3.81" y="-3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="6" x="1.27" y="3.81" drill="0.8128" shape="long" rot="R90"/>
+<pad name="5" x="3.81" y="3.81" drill="0.8128" shape="long" rot="R90"/>
+<text x="-5.715" y="-2.54" size="1.27" layer="25" ratio="10" rot="R90">&gt;NAME</text>
+<text x="-3.4925" y="-0.635" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="SO08">
+<description>&lt;b&gt;SMALL OUTLINE INTEGRATED CIRCUIT&lt;/b&gt;&lt;p&gt;
+body 3.9 mm/JEDEC MS-012AA</description>
+<wire x1="-2.9" y1="3.9" x2="2.9" y2="3.9" width="0.1998" layer="39"/>
+<wire x1="2.9" y1="3.9" x2="2.9" y2="-3.9" width="0.1998" layer="39"/>
+<wire x1="2.9" y1="-3.9" x2="-2.9" y2="-3.9" width="0.1998" layer="39"/>
+<wire x1="-2.9" y1="-3.9" x2="-2.9" y2="3.9" width="0.1998" layer="39"/>
+<wire x1="2.4" y1="1.9" x2="2.4" y2="-1.4" width="0.1778" layer="21"/>
+<wire x1="2.4" y1="-1.4" x2="2.4" y2="-1.9" width="0.1778" layer="21"/>
+<wire x1="2.4" y1="-1.9" x2="-2.4" y2="-1.9" width="0.1778" layer="51"/>
+<wire x1="-2.4" y1="-1.9" x2="-2.4" y2="-1.4" width="0.1778" layer="21"/>
+<wire x1="-2.4" y1="-1.4" x2="-2.4" y2="1.9" width="0.1778" layer="21"/>
+<wire x1="-2.4" y1="1.9" x2="2.4" y2="1.9" width="0.1778" layer="51"/>
+<wire x1="2.4" y1="-1.4" x2="-2.4" y2="-1.4" width="0.0508" layer="51"/>
+<circle x="-1.905" y="-0.9525" radius="0.2245" width="0" layer="21"/>
+<smd name="2" x="-0.635" y="-2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="7" x="-0.635" y="2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="1" x="-1.905" y="-2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="3" x="0.635" y="-2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="4" x="1.905" y="-2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="8" x="-1.905" y="2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="6" x="0.635" y="2.6" dx="0.6" dy="2.2" layer="1"/>
+<smd name="5" x="1.905" y="2.6" dx="0.6" dy="2.2" layer="1"/>
+<text x="-3.175" y="-1.905" size="1.27" layer="25" ratio="10" rot="R90">&gt;NAME</text>
+<text x="4.445" y="-1.905" size="1.27" layer="27" ratio="10" rot="R90">&gt;VALUE</text>
+<rectangle x1="-2.1501" y1="-3.1001" x2="-1.6599" y2="-2" layer="51"/>
+<rectangle x1="-0.8801" y1="-3.1001" x2="-0.3899" y2="-2" layer="51"/>
+<rectangle x1="0.3899" y1="-3.1001" x2="0.8801" y2="-2" layer="51"/>
+<rectangle x1="1.6599" y1="-3.1001" x2="2.1501" y2="-2" layer="51"/>
+<rectangle x1="1.6599" y1="2" x2="2.1501" y2="3.1001" layer="51"/>
+<rectangle x1="0.3899" y1="2" x2="0.8801" y2="3.1001" layer="51"/>
+<rectangle x1="-0.8801" y1="2" x2="-0.3899" y2="3.1001" layer="51"/>
+<rectangle x1="-2.1501" y1="2" x2="-1.6599" y2="3.1001" layer="51"/>
+</package>
+</packages>
+<symbols>
+<symbol name="6-I/O-1">
+<wire x1="12.7" y1="-7.62" x2="-12.7" y2="-7.62" width="0.254" layer="94"/>
+<wire x1="-12.7" y1="-7.62" x2="-12.7" y2="10.16" width="0.254" layer="94"/>
+<wire x1="-12.7" y1="10.16" x2="12.7" y2="10.16" width="0.254" layer="94"/>
+<wire x1="12.7" y1="10.16" x2="12.7" y2="-7.62" width="0.254" layer="94"/>
+<text x="-12.7" y="10.922" size="1.778" layer="95">&gt;NAME</text>
+<text x="-12.7" y="-10.16" size="1.778" layer="96">&gt;VALUE</text>
+<pin name="(XTAL2)PB4" x="17.78" y="5.08" length="middle" rot="R180"/>
+<pin name="(XTAL1)PB3" x="17.78" y="2.54" length="middle" rot="R180"/>
+<pin name="(RESET)PB5" x="17.78" y="7.62" length="middle" rot="R180"/>
+<pin name="(T0)PB2" x="17.78" y="0" length="middle" rot="R180"/>
+<pin name="(AIN1)PB1" x="17.78" y="-2.54" length="middle" rot="R180"/>
+<pin name="(AIN0)PB0" x="17.78" y="-5.08" length="middle" rot="R180"/>
+<pin name="VCC" x="-17.78" y="-2.54" length="middle" direction="pwr"/>
+<pin name="GND" x="-17.78" y="-5.08" length="middle" direction="pwr"/>
+</symbol>
+</symbols>
+<devicesets>
+<deviceset name="TINY10" prefix="IC">
+<description>&lt;b&gt;MICROCONTROLLER&lt;/b&gt;&lt;p&gt;
+1 Kbytes ROM</description>
+<gates>
+<gate name="G$1" symbol="6-I/O-1" x="0" y="0"/>
+</gates>
+<devices>
+<device name="P" package="DIL08">
+<connects>
+<connect gate="G$1" pin="(AIN0)PB0" pad="5"/>
+<connect gate="G$1" pin="(AIN1)PB1" pad="6"/>
+<connect gate="G$1" pin="(RESET)PB5" pad="1"/>
+<connect gate="G$1" pin="(T0)PB2" pad="7"/>
+<connect gate="G$1" pin="(XTAL1)PB3" pad="2"/>
+<connect gate="G$1" pin="(XTAL2)PB4" pad="3"/>
+<connect gate="G$1" pin="GND" pad="4"/>
+<connect gate="G$1" pin="VCC" pad="8"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="S" package="SO08">
+<connects>
+<connect gate="G$1" pin="(AIN0)PB0" pad="5"/>
+<connect gate="G$1" pin="(AIN1)PB1" pad="6"/>
+<connect gate="G$1" pin="(RESET)PB5" pad="1"/>
+<connect gate="G$1" pin="(T0)PB2" pad="7"/>
+<connect gate="G$1" pin="(XTAL1)PB3" pad="2"/>
+<connect gate="G$1" pin="(XTAL2)PB4" pad="3"/>
+<connect gate="G$1" pin="GND" pad="4"/>
+<connect gate="G$1" pin="VCC" pad="8"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+</devices>
+</deviceset>
+</devicesets>
+</library>
+<library name="testpad">
+<description>&lt;b&gt;Test Pins/Pads&lt;/b&gt;&lt;p&gt;
+Cream on SMD OFF.&lt;br&gt;
+new: Attribute TP_SIGNAL_NAME&lt;br&gt;
+&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>
+<packages>
+<package name="B1,27">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<wire x1="-0.635" y1="0" x2="0.635" y2="0" width="0.0024" layer="37"/>
+<wire x1="0" y1="0.635" x2="0" y2="-0.635" width="0.0024" layer="37"/>
+<smd name="TP" x="0" y="0" dx="1.27" dy="1.27" layer="1" roundness="100" cream="no"/>
+<text x="-0.635" y="1.016" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-0.635" y="-0.762" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="-0.635" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="B2,54">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<wire x1="-0.635" y1="0" x2="0.635" y2="0" width="0.0024" layer="37"/>
+<wire x1="0" y1="-0.635" x2="0" y2="0.635" width="0.0024" layer="37"/>
+<circle x="0" y="0" radius="0.635" width="0.254" layer="37"/>
+<smd name="TP" x="0" y="0" dx="2.54" dy="2.54" layer="1" roundness="100" cream="no"/>
+<text x="-1.27" y="1.651" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-1.27" y="-1.397" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="-1.27" y="-3.175" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="P1-13">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<circle x="0" y="0" radius="0.762" width="0.1524" layer="51"/>
+<pad name="TP" x="0" y="0" drill="1.3208" diameter="2.159" shape="octagon"/>
+<text x="-1.016" y="1.27" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="0" y="0" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="-1.27" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+<rectangle x1="-0.3302" y1="-0.3302" x2="0.3302" y2="0.3302" layer="51"/>
+</package>
+<package name="P1-13Y">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<circle x="0" y="0" radius="0.762" width="0.1524" layer="51"/>
+<pad name="TP" x="0" y="0" drill="1.3208" diameter="1.905" shape="long" rot="R90"/>
+<text x="-0.889" y="2.159" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="0" y="0" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="-1.27" y="-3.81" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+<rectangle x1="-0.3302" y1="-0.3302" x2="0.3302" y2="0.3302" layer="51"/>
+</package>
+<package name="P1-17">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<circle x="0" y="0" radius="0.8128" width="0.1524" layer="51"/>
+<pad name="TP" x="0" y="0" drill="1.7018" diameter="2.54" shape="octagon"/>
+<text x="-1.143" y="1.397" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="0" y="0" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="-1.27" y="-3.175" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+<rectangle x1="-0.3302" y1="-0.3302" x2="0.3302" y2="0.3302" layer="51"/>
+</package>
+<package name="P1-17Y">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<circle x="0" y="0" radius="0.8128" width="0.1524" layer="51"/>
+<pad name="TP" x="0" y="0" drill="1.7018" diameter="2.1208" shape="long" rot="R90"/>
+<text x="-1.143" y="2.286" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="0" y="0" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="-1.27" y="-3.81" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+<rectangle x1="-0.3302" y1="-0.3302" x2="0.3302" y2="0.3302" layer="51"/>
+</package>
+<package name="P1-20">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<circle x="0" y="0" radius="1.016" width="0.1524" layer="51"/>
+<pad name="TP" x="0" y="0" drill="2.0066" diameter="3.1496" shape="octagon"/>
+<text x="-1.524" y="1.778" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="0" y="0" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="-1.27" y="-3.175" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+<rectangle x1="-0.3302" y1="-0.3302" x2="0.3302" y2="0.3302" layer="51"/>
+</package>
+<package name="P1-20Y">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<circle x="0" y="0" radius="1.016" width="0.1524" layer="51"/>
+<pad name="TP" x="0" y="0" drill="2.0066" diameter="2.54" shape="long" rot="R90"/>
+<text x="-1.27" y="2.794" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="0" y="0" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="-1.27" y="-4.445" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+<rectangle x1="-0.3302" y1="-0.3302" x2="0.3302" y2="0.3302" layer="51"/>
+</package>
+<package name="TP06R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="0.6" dy="0.6" layer="1" roundness="100" cream="no"/>
+<text x="-0.3" y="0.4001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.254" y="-0.381" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP06SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="0.5996" dy="0.5996" layer="1" cream="no"/>
+<text x="-0.3" y="0.4001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.254" y="-0.381" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP07R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="0.7" dy="0.7" layer="1" roundness="100" cream="no"/>
+<text x="-0.3" y="0.4001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.254" y="-0.508" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP07SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="0.7" dy="0.7" layer="1" cream="no"/>
+<text x="-0.3" y="0.4001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.381" y="-0.381" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP08R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="0.8" dy="0.8" layer="1" roundness="100" cream="no"/>
+<text x="-0.3" y="0.4001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.381" y="-0.381" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP08SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="0.8" dy="0.8" layer="1" cream="no"/>
+<text x="-0.3" y="0.4001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.381" y="-0.508" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP09R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="0.9" dy="0.9" layer="1" roundness="100" cream="no"/>
+<text x="-0.4501" y="0.5001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.381" y="-0.508" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP09SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="0.8998" dy="0.8998" layer="1" cream="no"/>
+<text x="-0.4501" y="0.5001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.381" y="-0.508" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP10R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1" dy="1" layer="1" roundness="100" cream="no"/>
+<text x="-0.5001" y="0.5499" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.381" y="-0.508" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP10SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1" dy="1" layer="1" cream="no"/>
+<text x="-0.5001" y="0.5499" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.508" y="-0.635" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP11R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.1" dy="1.1" layer="1" roundness="100" cream="no"/>
+<text x="-0.5499" y="0.5999" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.508" y="-0.508" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-1.905" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP11SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.1" dy="1.1" layer="1" cream="no"/>
+<text x="-0.5499" y="0.5999" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.508" y="-0.635" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP12SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.1998" dy="1.1998" layer="1" cream="no"/>
+<text x="-0.5999" y="0.65" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.508" y="-0.635" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP12R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.2" dy="1.2" layer="1" roundness="100" cream="no"/>
+<text x="-0.5999" y="0.65" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.508" y="-0.635" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP13R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.3" dy="1.3" layer="1" roundness="100" cream="no"/>
+<text x="-0.65" y="0.7" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.508" y="-0.635" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP14R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.4" dy="1.4" layer="1" roundness="100" cream="no"/>
+<text x="-0.7" y="0.7501" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.508" y="-0.762" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP15R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.5" dy="1.5" layer="1" roundness="100" cream="no"/>
+<text x="-0.7501" y="0.8001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-0.762" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP16R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.6" dy="1.6" layer="1" roundness="100" cream="no"/>
+<text x="-0.8001" y="0.8499" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-0.762" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP17R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.7" dy="1.7" layer="1" roundness="100" cream="no"/>
+<text x="-0.8499" y="0.8999" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-0.889" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP18R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.8" dy="1.8" layer="1" roundness="100" cream="no"/>
+<text x="-0.8999" y="0.95" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.762" y="-0.889" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP19R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.9" dy="1.9" layer="1" roundness="100" cream="no"/>
+<text x="-0.95" y="1" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.762" y="-0.889" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP20R">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="2" dy="2" layer="1" roundness="100" cream="no"/>
+<text x="-1" y="1.05" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.762" y="-1.016" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP13SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.3" dy="1.3" layer="1" cream="no"/>
+<text x="-0.65" y="0.7" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-0.762" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP14SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.4" dy="1.4" layer="1" cream="no"/>
+<text x="-0.7" y="0.7501" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-0.762" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP15SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.5" dy="1.5" layer="1" cream="no"/>
+<text x="-0.7501" y="0.8001" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.762" y="-0.889" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP16SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.5996" dy="1.5996" layer="1" cream="no"/>
+<text x="-0.8001" y="0.8499" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.762" y="-0.889" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP17SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.7" dy="1.7" layer="1" cream="no"/>
+<text x="-0.8499" y="0.8999" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.762" y="-0.889" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP18SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.8" dy="1.8" layer="1" cream="no"/>
+<text x="-0.8999" y="0.95" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.889" y="-1.016" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP19SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="1.8998" dy="1.8998" layer="1" cream="no"/>
+<text x="-0.95" y="1" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.889" y="-1.016" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+<package name="TP20SQ">
+<description>&lt;b&gt;TEST PAD&lt;/b&gt;</description>
+<smd name="TP" x="0" y="0" dx="2" dy="2" layer="1" cream="no"/>
+<text x="-1" y="1.05" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.016" y="-1.143" size="0.0254" layer="27">&gt;VALUE</text>
+<text x="0" y="-2.54" size="1" layer="37">&gt;TP_SIGNAL_NAME</text>
+</package>
+</packages>
+<symbols>
+<symbol name="TP">
+<wire x1="-0.762" y1="-0.762" x2="0" y2="0" width="0.254" layer="94"/>
+<wire x1="0" y1="0" x2="0.762" y2="-0.762" width="0.254" layer="94"/>
+<wire x1="0.762" y1="-0.762" x2="0" y2="-1.524" width="0.254" layer="94"/>
+<wire x1="0" y1="-1.524" x2="-0.762" y2="-0.762" width="0.254" layer="94"/>
+<text x="-1.27" y="1.27" size="1.778" layer="95">&gt;NAME</text>
+<text x="1.27" y="-1.27" size="1.778" layer="97">&gt;TP_SIGNAL_NAME</text>
+<pin name="TP" x="0" y="-2.54" visible="off" length="short" direction="in" rot="R90"/>
+</symbol>
+</symbols>
+<devicesets>
+<deviceset name="TP" prefix="TP">
+<description>&lt;b&gt;Test pad&lt;/b&gt;</description>
+<gates>
+<gate name="G$1" symbol="TP" x="0" y="0"/>
+</gates>
+<devices>
+<device name="B1,27" package="B1,27">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="B2,54" package="B2,54">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="PAD1-13" package="P1-13">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="PAD1-13Y" package="P1-13Y">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="PAD1-17" package="P1-17">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="PAD1-17Y" package="P1-17Y">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="PAD1-20" package="P1-20">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="PAD1-20Y" package="P1-20Y">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP06R" package="TP06R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP06SQ" package="TP06SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP07R" package="TP07R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP07SQ" package="TP07SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP08R" package="TP08R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP08SQ" package="TP08SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP09R" package="TP09R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP09SQ" package="TP09SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP10R" package="TP10R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP10SQ" package="TP10SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP11R" package="TP11R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP11SQ" package="TP11SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP12SQ" package="TP12SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP12R" package="TP12R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP13R" package="TP13R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP14R" package="TP14R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP15R" package="TP15R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP16R" package="TP16R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP17R" package="TP17R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP18R" package="TP18R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP19R" package="TP19R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP20R" package="TP20R">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP13SQ" package="TP13SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP14SQ" package="TP14SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP15SQ" package="TP15SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP16SQ" package="TP16SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP17SQ" package="TP17SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP18SQ" package="TP18SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP19SQ" package="TP19SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+<device name="TP20SQ" package="TP20SQ">
+<connects>
+<connect gate="G$1" pin="TP" pad="TP"/>
+</connects>
+<technologies>
+<technology name="">
+<attribute name="TP_SIGNAL_NAME" value="" constant="no"/>
+</technology>
+</technologies>
+</device>
+</devices>
+</deviceset>
+</devicesets>
+</library>
+<library name="resistor">
+<description>&lt;b&gt;Resistors, Capacitors, Inductors&lt;/b&gt;&lt;p&gt;
+Based on the previous libraries:
+&lt;ul&gt;
+&lt;li&gt;r.lbr
+&lt;li&gt;cap.lbr
+&lt;li&gt;cap-fe.lbr
+&lt;li&gt;captant.lbr
+&lt;li&gt;polcap.lbr
+&lt;li&gt;ipc-smd.lbr
+&lt;/ul&gt;
+All SMD packages are defined according to the IPC specifications and CECC&lt;p&gt;
+&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;&lt;p&gt;
+&lt;p&gt;
+for Electrolyt Capacitors see also :&lt;p&gt;
+www.bccomponents.com &lt;p&gt;
+www.panasonic.com&lt;p&gt;
+www.kemet.com&lt;p&gt;
+&lt;p&gt;
+for trimmer refence see : &lt;u&gt;www.electrospec-inc.com/cross_references/trimpotcrossref.asp&lt;/u&gt;&lt;p&gt;
+
+&lt;map name="nav_main"&gt;
+&lt;area shape="rect" coords="0,1,140,23" href="../military_specs.asp" title=""&gt;
+&lt;area shape="rect" coords="0,24,140,51" href="../about.asp" title=""&gt;
+&lt;area shape="rect" coords="1,52,140,77" href="../rfq.asp" title=""&gt;
+&lt;area shape="rect" coords="0,78,139,103" href="../products.asp" title=""&gt;
+&lt;area shape="rect" coords="1,102,138,128" href="../excess_inventory.asp" title=""&gt;
+&lt;area shape="rect" coords="1,129,138,150" href="../edge.asp" title=""&gt;
+&lt;area shape="rect" coords="1,151,139,178" href="../industry_links.asp" title=""&gt;
+&lt;area shape="rect" coords="0,179,139,201" href="../comments.asp" title=""&gt;
+&lt;area shape="rect" coords="1,203,138,231" href="../directory.asp" title=""&gt;
+&lt;area shape="default" nohref&gt;
+&lt;/map&gt;
+
+&lt;html&gt;
+
+&lt;title&gt;&lt;/title&gt;
+
+ &lt;LINK REL="StyleSheet" TYPE="text/css" HREF="style-sheet.css"&gt;
+
+&lt;body bgcolor="#ffffff" text="#000000" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"&gt;
+&lt;table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0 height="55%"&gt;
+&lt;tr valign="top"&gt;
+
+&lt;/td&gt;
+&lt;! &lt;td width="10"&gt;&amp;nbsp;&lt;/td&gt;
+&lt;td width="90%"&gt;
+
+&lt;b&gt;&lt;font color="#0000FF" size="4"&gt;TRIM-POT CROSS REFERENCE&lt;/font&gt;&lt;/b&gt;
+&lt;P&gt;
+&lt;TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2&gt;
+ &lt;TR&gt;
+ &lt;TD COLSPAN=8&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL&gt;&lt;B&gt;RECTANGULAR MULTI-TURN&lt;/B&gt;&lt;/FONT&gt;
+ &lt;/TD&gt;
+ &lt;/TR&gt;
+ &lt;TR&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;BOURNS&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;BI&amp;nbsp;TECH&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;DALE-VISHAY&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;PHILIPS/MEPCO&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;MURATA&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;PANASONIC&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;SPECTROL&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;
+ &lt;TD ALIGN=CENTER&gt;
+ &lt;B&gt;
+ &lt;FONT SIZE=3 FACE=ARIAL color="#FF0000"&gt;MILSPEC&lt;/FONT&gt;
+ &lt;/B&gt;
+ &lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
+ &lt;/TR&gt;
+ &lt;TR&gt;
+ &lt;TD BGCOLOR="#cccccc" ALIGN=CENTER&gt;&lt;FONT FACE=ARIAL SIZE=3 &gt;
+ 3005P&lt;BR&gt;
+ 3006P&lt;BR&gt;
+ 3006W&lt;BR&gt;
+ 3006Y&lt;BR&gt;
+ 3009P&lt;BR&gt;
+ 3009W&lt;BR&gt;
+ 3009Y&lt;BR&gt;
+ 3057J&lt;BR&gt;
+ 3057L&lt;BR&gt;
+ 3057P&lt;BR&gt;
+ 3057Y&lt;BR&gt;
+ 3059J&lt;BR&gt;
+ 3059L&lt;BR&gt;
+ 3059P&lt;BR&gt;
+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t;
+&lt;FONT SIZE=4 FACE=ARIAL&gt;&lt;B&gt;ALT =&amp;nbsp;ALTERNATE&lt;/B&gt;&lt;/FONT&gt;
+&lt;P&gt;
+
+&amp;nbsp;
+&lt;P&gt;
+&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/table&gt;
+&lt;/BODY&gt;&lt;/HTML&gt;</description>
+<packages>
+<package name="C0402">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-0.245" y1="0.224" x2="0.245" y2="0.224" width="0.1524" layer="51"/>
+<wire x1="0.245" y1="-0.224" x2="-0.245" y2="-0.224" width="0.1524" layer="51"/>
+<wire x1="-1.473" y1="0.483" x2="1.473" y2="0.483" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="0.483" x2="1.473" y2="-0.483" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="-0.483" x2="-1.473" y2="-0.483" width="0.0508" layer="39"/>
+<wire x1="-1.473" y1="-0.483" x2="-1.473" y2="0.483" width="0.0508" layer="39"/>
+<smd name="1" x="-0.65" y="0" dx="0.7" dy="0.9" layer="1"/>
+<smd name="2" x="0.65" y="0" dx="0.7" dy="0.9" layer="1"/>
+<text x="-0.635" y="0.762" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-1.905" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-0.554" y1="-0.3048" x2="-0.254" y2="0.2951" layer="51"/>
+<rectangle x1="0.2588" y1="-0.3048" x2="0.5588" y2="0.2951" layer="51"/>
+<rectangle x1="-0.1999" y1="-0.3" x2="0.1999" y2="0.3" layer="35"/>
+</package>
+<package name="C0504">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-1.473" y1="0.983" x2="1.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="0.983" x2="1.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="-0.983" x2="-1.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-1.473" y1="-0.983" x2="-1.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="-0.294" y1="0.559" x2="0.294" y2="0.559" width="0.1016" layer="51"/>
+<wire x1="-0.294" y1="-0.559" x2="0.294" y2="-0.559" width="0.1016" layer="51"/>
+<smd name="1" x="-0.7" y="0" dx="1" dy="1.3" layer="1"/>
+<smd name="2" x="0.7" y="0" dx="1" dy="1.3" layer="1"/>
+<text x="-0.635" y="0.889" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-2.159" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-0.6604" y1="-0.6223" x2="-0.2804" y2="0.6276" layer="51"/>
+<rectangle x1="0.2794" y1="-0.6223" x2="0.6594" y2="0.6276" layer="51"/>
+<rectangle x1="-0.1001" y1="-0.4001" x2="0.1001" y2="0.4001" layer="35"/>
+</package>
+<package name="C0603">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-1.473" y1="0.983" x2="1.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="0.983" x2="1.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="-0.983" x2="-1.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-1.473" y1="-0.983" x2="-1.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="-0.356" y1="0.432" x2="0.356" y2="0.432" width="0.1016" layer="51"/>
+<wire x1="-0.356" y1="-0.419" x2="0.356" y2="-0.419" width="0.1016" layer="51"/>
+<smd name="1" x="-0.85" y="0" dx="1.1" dy="1" layer="1"/>
+<smd name="2" x="0.85" y="0" dx="1.1" dy="1" layer="1"/>
+<text x="-0.889" y="0.762" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.889" y="-2.032" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-0.8382" y1="-0.4699" x2="-0.3381" y2="0.4801" layer="51"/>
+<rectangle x1="0.3302" y1="-0.4699" x2="0.8303" y2="0.4801" layer="51"/>
+<rectangle x1="-0.1999" y1="-0.3" x2="0.1999" y2="0.3" layer="35"/>
+</package>
+<package name="C0805">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-1.973" y1="0.983" x2="1.973" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="1.973" y1="-0.983" x2="-1.973" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-1.973" y1="-0.983" x2="-1.973" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="-0.381" y1="0.66" x2="0.381" y2="0.66" width="0.1016" layer="51"/>
+<wire x1="-0.356" y1="-0.66" x2="0.381" y2="-0.66" width="0.1016" layer="51"/>
+<wire x1="1.973" y1="0.983" x2="1.973" y2="-0.983" width="0.0508" layer="39"/>
+<smd name="1" x="-0.85" y="0" dx="1.3" dy="1.5" layer="1"/>
+<smd name="2" x="0.85" y="0" dx="1.3" dy="1.5" layer="1"/>
+<text x="-0.889" y="1.016" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.889" y="-2.286" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.0922" y1="-0.7239" x2="-0.3421" y2="0.7262" layer="51"/>
+<rectangle x1="0.3556" y1="-0.7239" x2="1.1057" y2="0.7262" layer="51"/>
+<rectangle x1="-0.1001" y1="-0.4001" x2="0.1001" y2="0.4001" layer="35"/>
+</package>
+<package name="C1005">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-0.245" y1="0.224" x2="0.245" y2="0.224" width="0.1524" layer="51"/>
+<wire x1="0.245" y1="-0.224" x2="-0.245" y2="-0.224" width="0.1524" layer="51"/>
+<wire x1="-1.473" y1="0.483" x2="1.473" y2="0.483" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="0.483" x2="1.473" y2="-0.483" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="-0.483" x2="-1.473" y2="-0.483" width="0.0508" layer="39"/>
+<wire x1="-1.473" y1="-0.483" x2="-1.473" y2="0.483" width="0.0508" layer="39"/>
+<smd name="1" x="-0.65" y="0" dx="0.7" dy="0.9" layer="1"/>
+<smd name="2" x="0.65" y="0" dx="0.7" dy="0.9" layer="1"/>
+<text x="-0.635" y="0.762" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-1.905" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-0.554" y1="-0.3048" x2="-0.254" y2="0.2951" layer="51"/>
+<rectangle x1="0.2588" y1="-0.3048" x2="0.5588" y2="0.2951" layer="51"/>
+<rectangle x1="-0.1999" y1="-0.3" x2="0.1999" y2="0.3" layer="35"/>
+</package>
+<package name="C1206">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-2.473" y1="0.983" x2="2.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="2.473" y1="-0.983" x2="-2.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-2.473" y1="-0.983" x2="-2.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="2.473" y1="0.983" x2="2.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-0.965" y1="0.787" x2="0.965" y2="0.787" width="0.1016" layer="51"/>
+<wire x1="-0.965" y1="-0.787" x2="0.965" y2="-0.787" width="0.1016" layer="51"/>
+<smd name="1" x="-1.4" y="0" dx="1.6" dy="1.8" layer="1"/>
+<smd name="2" x="1.4" y="0" dx="1.6" dy="1.8" layer="1"/>
+<text x="-1.27" y="1.143" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.27" y="-2.413" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.7018" y1="-0.8509" x2="-0.9517" y2="0.8491" layer="51"/>
+<rectangle x1="0.9517" y1="-0.8491" x2="1.7018" y2="0.8509" layer="51"/>
+<rectangle x1="-0.1999" y1="-0.4001" x2="0.1999" y2="0.4001" layer="35"/>
+</package>
+<package name="C1210">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-2.473" y1="1.483" x2="2.473" y2="1.483" width="0.0508" layer="39"/>
+<wire x1="2.473" y1="-1.483" x2="-2.473" y2="-1.483" width="0.0508" layer="39"/>
+<wire x1="-2.473" y1="-1.483" x2="-2.473" y2="1.483" width="0.0508" layer="39"/>
+<wire x1="-0.9652" y1="1.2446" x2="0.9652" y2="1.2446" width="0.1016" layer="51"/>
+<wire x1="-0.9652" y1="-1.2446" x2="0.9652" y2="-1.2446" width="0.1016" layer="51"/>
+<wire x1="2.473" y1="1.483" x2="2.473" y2="-1.483" width="0.0508" layer="39"/>
+<smd name="1" x="-1.4" y="0" dx="1.6" dy="2.7" layer="1"/>
+<smd name="2" x="1.4" y="0" dx="1.6" dy="2.7" layer="1"/>
+<text x="-1.397" y="1.651" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.397" y="-2.921" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.7018" y1="-1.2954" x2="-0.9517" y2="1.3045" layer="51"/>
+<rectangle x1="0.9517" y1="-1.3045" x2="1.7018" y2="1.2954" layer="51"/>
+<rectangle x1="-0.1999" y1="-0.4001" x2="0.1999" y2="0.4001" layer="35"/>
+</package>
+<package name="C1310">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-1.473" y1="0.983" x2="1.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="0.983" x2="1.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="-0.983" x2="-1.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-1.473" y1="-0.983" x2="-1.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="-0.294" y1="0.559" x2="0.294" y2="0.559" width="0.1016" layer="51"/>
+<wire x1="-0.294" y1="-0.559" x2="0.294" y2="-0.559" width="0.1016" layer="51"/>
+<smd name="1" x="-0.7" y="0" dx="1" dy="1.3" layer="1"/>
+<smd name="2" x="0.7" y="0" dx="1" dy="1.3" layer="1"/>
+<text x="-0.635" y="0.889" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-2.159" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-0.6604" y1="-0.6223" x2="-0.2804" y2="0.6276" layer="51"/>
+<rectangle x1="0.2794" y1="-0.6223" x2="0.6594" y2="0.6276" layer="51"/>
+<rectangle x1="-0.1001" y1="-0.3" x2="0.1001" y2="0.3" layer="35"/>
+</package>
+<package name="C1608">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-1.473" y1="0.983" x2="1.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="0.983" x2="1.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="1.473" y1="-0.983" x2="-1.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-1.473" y1="-0.983" x2="-1.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="-0.356" y1="0.432" x2="0.356" y2="0.432" width="0.1016" layer="51"/>
+<wire x1="-0.356" y1="-0.419" x2="0.356" y2="-0.419" width="0.1016" layer="51"/>
+<smd name="1" x="-0.85" y="0" dx="1.1" dy="1" layer="1"/>
+<smd name="2" x="0.85" y="0" dx="1.1" dy="1" layer="1"/>
+<text x="-0.635" y="0.762" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.635" y="-2.032" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-0.8382" y1="-0.4699" x2="-0.3381" y2="0.4801" layer="51"/>
+<rectangle x1="0.3302" y1="-0.4699" x2="0.8303" y2="0.4801" layer="51"/>
+<rectangle x1="-0.1999" y1="-0.3" x2="0.1999" y2="0.3" layer="35"/>
+</package>
+<package name="C1812">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-2.973" y1="1.983" x2="2.973" y2="1.983" width="0.0508" layer="39"/>
+<wire x1="2.973" y1="-1.983" x2="-2.973" y2="-1.983" width="0.0508" layer="39"/>
+<wire x1="-2.973" y1="-1.983" x2="-2.973" y2="1.983" width="0.0508" layer="39"/>
+<wire x1="-1.4732" y1="1.6002" x2="1.4732" y2="1.6002" width="0.1016" layer="51"/>
+<wire x1="-1.4478" y1="-1.6002" x2="1.4732" y2="-1.6002" width="0.1016" layer="51"/>
+<wire x1="2.973" y1="1.983" x2="2.973" y2="-1.983" width="0.0508" layer="39"/>
+<smd name="1" x="-1.95" y="0" dx="1.9" dy="3.4" layer="1"/>
+<smd name="2" x="1.95" y="0" dx="1.9" dy="3.4" layer="1"/>
+<text x="-1.905" y="1.905" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.905" y="-3.175" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-2.3876" y1="-1.651" x2="-1.4376" y2="1.649" layer="51"/>
+<rectangle x1="1.4478" y1="-1.651" x2="2.3978" y2="1.649" layer="51"/>
+<rectangle x1="-0.3" y1="-0.4001" x2="0.3" y2="0.4001" layer="35"/>
+</package>
+<package name="C1825">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-2.973" y1="3.483" x2="2.973" y2="3.483" width="0.0508" layer="39"/>
+<wire x1="2.973" y1="-3.483" x2="-2.973" y2="-3.483" width="0.0508" layer="39"/>
+<wire x1="-2.973" y1="-3.483" x2="-2.973" y2="3.483" width="0.0508" layer="39"/>
+<wire x1="-1.4986" y1="3.2766" x2="1.4732" y2="3.2766" width="0.1016" layer="51"/>
+<wire x1="-1.4732" y1="-3.2766" x2="1.4986" y2="-3.2766" width="0.1016" layer="51"/>
+<wire x1="2.973" y1="3.483" x2="2.973" y2="-3.483" width="0.0508" layer="39"/>
+<smd name="1" x="-1.95" y="0" dx="1.9" dy="6.8" layer="1"/>
+<smd name="2" x="1.95" y="0" dx="1.9" dy="6.8" layer="1"/>
+<text x="-1.905" y="3.683" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.905" y="-4.826" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-2.413" y1="-3.3528" x2="-1.463" y2="3.3472" layer="51"/>
+<rectangle x1="1.4478" y1="-3.3528" x2="2.3978" y2="3.3472" layer="51"/>
+<rectangle x1="-0.7" y1="-0.7" x2="0.7" y2="0.7" layer="35"/>
+</package>
+<package name="C2012">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-1.973" y1="0.983" x2="1.973" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="1.973" y1="0.983" x2="1.973" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="1.973" y1="-0.983" x2="-1.973" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-1.973" y1="-0.983" x2="-1.973" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="-0.381" y1="0.66" x2="0.381" y2="0.66" width="0.1016" layer="51"/>
+<wire x1="-0.356" y1="-0.66" x2="0.381" y2="-0.66" width="0.1016" layer="51"/>
+<smd name="1" x="-0.85" y="0" dx="1.3" dy="1.5" layer="1"/>
+<smd name="2" x="0.85" y="0" dx="1.3" dy="1.5" layer="1"/>
+<text x="-0.889" y="1.016" size="1.27" layer="25">&gt;NAME</text>
+<text x="-0.889" y="-2.286" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.0922" y1="-0.7239" x2="-0.3421" y2="0.7262" layer="51"/>
+<rectangle x1="0.3556" y1="-0.7239" x2="1.1057" y2="0.7262" layer="51"/>
+<rectangle x1="-0.1001" y1="-0.4001" x2="0.1001" y2="0.4001" layer="35"/>
+</package>
+<package name="C3216">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-2.473" y1="0.983" x2="2.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="2.473" y1="-0.983" x2="-2.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-2.473" y1="-0.983" x2="-2.473" y2="0.983" width="0.0508" layer="39"/>
+<wire x1="2.473" y1="0.983" x2="2.473" y2="-0.983" width="0.0508" layer="39"/>
+<wire x1="-0.965" y1="0.787" x2="0.965" y2="0.787" width="0.1016" layer="51"/>
+<wire x1="-0.965" y1="-0.787" x2="0.965" y2="-0.787" width="0.1016" layer="51"/>
+<smd name="1" x="-1.4" y="0" dx="1.6" dy="1.8" layer="1"/>
+<smd name="2" x="1.4" y="0" dx="1.6" dy="1.8" layer="1"/>
+<text x="-1.27" y="1.143" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.27" y="-2.413" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.7018" y1="-0.8509" x2="-0.9517" y2="0.8491" layer="51"/>
+<rectangle x1="0.9517" y1="-0.8491" x2="1.7018" y2="0.8509" layer="51"/>
+<rectangle x1="-0.3" y1="-0.5001" x2="0.3" y2="0.5001" layer="35"/>
+</package>
+<package name="C3225">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-2.473" y1="1.483" x2="2.473" y2="1.483" width="0.0508" layer="39"/>
+<wire x1="2.473" y1="-1.483" x2="-2.473" y2="-1.483" width="0.0508" layer="39"/>
+<wire x1="-2.473" y1="-1.483" x2="-2.473" y2="1.483" width="0.0508" layer="39"/>
+<wire x1="-0.9652" y1="1.2446" x2="0.9652" y2="1.2446" width="0.1016" layer="51"/>
+<wire x1="-0.9652" y1="-1.2446" x2="0.9652" y2="-1.2446" width="0.1016" layer="51"/>
+<wire x1="2.473" y1="1.483" x2="2.473" y2="-1.483" width="0.0508" layer="39"/>
+<smd name="1" x="-1.4" y="0" dx="1.6" dy="2.7" layer="1"/>
+<smd name="2" x="1.4" y="0" dx="1.6" dy="2.7" layer="1"/>
+<text x="-1.397" y="1.651" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.397" y="-2.921" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.7018" y1="-1.2954" x2="-0.9517" y2="1.3045" layer="51"/>
+<rectangle x1="0.9517" y1="-1.3045" x2="1.7018" y2="1.2954" layer="51"/>
+<rectangle x1="-0.1999" y1="-0.5001" x2="0.1999" y2="0.5001" layer="35"/>
+</package>
+<package name="C4532">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-2.973" y1="1.983" x2="2.973" y2="1.983" width="0.0508" layer="39"/>
+<wire x1="2.973" y1="-1.983" x2="-2.973" y2="-1.983" width="0.0508" layer="39"/>
+<wire x1="-2.973" y1="-1.983" x2="-2.973" y2="1.983" width="0.0508" layer="39"/>
+<wire x1="-1.4732" y1="1.6002" x2="1.4732" y2="1.6002" width="0.1016" layer="51"/>
+<wire x1="-1.4478" y1="-1.6002" x2="1.4732" y2="-1.6002" width="0.1016" layer="51"/>
+<wire x1="2.973" y1="1.983" x2="2.973" y2="-1.983" width="0.0508" layer="39"/>
+<smd name="1" x="-1.95" y="0" dx="1.9" dy="3.4" layer="1"/>
+<smd name="2" x="1.95" y="0" dx="1.9" dy="3.4" layer="1"/>
+<text x="-1.905" y="2.032" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.905" y="-3.175" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-2.3876" y1="-1.651" x2="-1.4376" y2="1.649" layer="51"/>
+<rectangle x1="1.4478" y1="-1.651" x2="2.3978" y2="1.649" layer="51"/>
+<rectangle x1="-0.4001" y1="-0.7" x2="0.4001" y2="0.7" layer="35"/>
+</package>
+<package name="C4564">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+chip</description>
+<wire x1="-2.973" y1="3.483" x2="2.973" y2="3.483" width="0.0508" layer="39"/>
+<wire x1="2.973" y1="-3.483" x2="-2.973" y2="-3.483" width="0.0508" layer="39"/>
+<wire x1="-2.973" y1="-3.483" x2="-2.973" y2="3.483" width="0.0508" layer="39"/>
+<wire x1="-1.4986" y1="3.2766" x2="1.4732" y2="3.2766" width="0.1016" layer="51"/>
+<wire x1="-1.4732" y1="-3.2766" x2="1.4986" y2="-3.2766" width="0.1016" layer="51"/>
+<wire x1="2.973" y1="3.483" x2="2.973" y2="-3.483" width="0.0508" layer="39"/>
+<smd name="1" x="-1.95" y="0" dx="1.9" dy="6.8" layer="1"/>
+<smd name="2" x="1.95" y="0" dx="1.9" dy="6.8" layer="1"/>
+<text x="-1.905" y="3.683" size="1.27" layer="25">&gt;NAME</text>
+<text x="-1.905" y="-4.826" size="1.27" layer="27">&gt;VALUE</text>
+<rectangle x1="-2.413" y1="-3.3528" x2="-1.463" y2="3.3472" layer="51"/>
+<rectangle x1="1.4478" y1="-3.3528" x2="2.3978" y2="3.3472" layer="51"/>
+<rectangle x1="-0.5001" y1="-1" x2="0.5001" y2="1" layer="35"/>
+</package>
+<package name="C025-024X044">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 mm, outline 2.4 x 4.4 mm</description>
+<wire x1="-2.159" y1="-0.635" x2="-2.159" y2="0.635" width="0.1524" layer="21"/>
+<wire x1="-2.159" y1="0.635" x2="-1.651" y2="1.143" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.159" y1="-0.635" x2="-1.651" y2="-1.143" width="0.1524" layer="21" curve="90"/>
+<wire x1="1.651" y1="1.143" x2="-1.651" y2="1.143" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-0.635" x2="2.159" y2="0.635" width="0.1524" layer="21"/>
+<wire x1="1.651" y1="-1.143" x2="-1.651" y2="-1.143" width="0.1524" layer="21"/>
+<wire x1="1.651" y1="1.143" x2="2.159" y2="0.635" width="0.1524" layer="21" curve="-90"/>
+<wire x1="1.651" y1="-1.143" x2="2.159" y2="-0.635" width="0.1524" layer="21" curve="90"/>
+<wire x1="-0.3048" y1="0.762" x2="-0.3048" y2="-0.762" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0.762" x2="0.3302" y2="-0.762" width="0.3048" layer="21"/>
+<wire x1="1.27" y1="0" x2="0.3302" y2="0" width="0.1524" layer="51"/>
+<wire x1="-1.27" y1="0" x2="-0.3048" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-1.778" y="1.397" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-1.778" y="-2.667" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025-025X050">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 mm, outline 2.5 x 5 mm</description>
+<wire x1="-2.159" y1="1.27" x2="2.159" y2="1.27" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-1.27" x2="-2.159" y2="-1.27" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="1.016" x2="2.413" y2="-1.016" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="1.016" x2="-2.413" y2="-1.016" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="1.27" x2="2.413" y2="1.016" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="1.016" x2="-2.159" y2="1.27" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-1.27" x2="2.413" y2="-1.016" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-1.016" x2="-2.159" y2="-1.27" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.762" y1="0" x2="0.381" y2="0" width="0.1524" layer="51"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.286" y="1.524" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.286" y="-2.794" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025-030X050">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 mm, outline 3 x 5 mm</description>
+<wire x1="-2.159" y1="1.524" x2="2.159" y2="1.524" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-1.524" x2="-2.159" y2="-1.524" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="1.27" x2="2.413" y2="-1.27" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="1.27" x2="-2.413" y2="-1.27" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="1.524" x2="2.413" y2="1.27" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="1.27" x2="-2.159" y2="1.524" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-1.524" x2="2.413" y2="-1.27" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-1.27" x2="-2.159" y2="-1.524" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.762" y1="0" x2="0.381" y2="0" width="0.1524" layer="51"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.286" y="1.905" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.286" y="-3.048" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025-040X050">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 mm, outline 4 x 5 mm</description>
+<wire x1="-2.159" y1="1.905" x2="2.159" y2="1.905" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-1.905" x2="-2.159" y2="-1.905" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="1.651" x2="2.413" y2="-1.651" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="1.651" x2="-2.413" y2="-1.651" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="1.905" x2="2.413" y2="1.651" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="1.651" x2="-2.159" y2="1.905" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-1.905" x2="2.413" y2="-1.651" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-1.651" x2="-2.159" y2="-1.905" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.762" y1="0" x2="0.381" y2="0" width="0.1524" layer="51"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.286" y="2.159" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.286" y="-3.429" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025-050X050">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 mm, outline 5 x 5 mm</description>
+<wire x1="-2.159" y1="2.286" x2="2.159" y2="2.286" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-2.286" x2="-2.159" y2="-2.286" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="2.032" x2="2.413" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="2.032" x2="-2.413" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="2.286" x2="2.413" y2="2.032" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="2.032" x2="-2.159" y2="2.286" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-2.286" x2="2.413" y2="-2.032" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-2.032" x2="-2.159" y2="-2.286" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.762" y1="0" x2="0.381" y2="0" width="0.1524" layer="51"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.286" y="2.54" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.286" y="-3.81" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025-060X050">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 mm, outline 6 x 5 mm</description>
+<wire x1="-2.159" y1="2.794" x2="2.159" y2="2.794" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-2.794" x2="-2.159" y2="-2.794" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="2.54" x2="2.413" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="2.54" x2="-2.413" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="2.794" x2="2.413" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="2.54" x2="-2.159" y2="2.794" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-2.794" x2="2.413" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-2.54" x2="-2.159" y2="-2.794" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.762" y1="0" x2="0.381" y2="0" width="0.1524" layer="51"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.286" y="3.048" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.032" y="-2.413" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025_050-024X070">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 mm + 5 mm, outline 2.4 x 7 mm</description>
+<wire x1="-2.159" y1="-0.635" x2="-2.159" y2="0.635" width="0.1524" layer="51"/>
+<wire x1="-2.159" y1="0.635" x2="-1.651" y2="1.143" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.159" y1="-0.635" x2="-1.651" y2="-1.143" width="0.1524" layer="21" curve="90"/>
+<wire x1="1.651" y1="1.143" x2="-1.651" y2="1.143" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-0.635" x2="2.159" y2="0.635" width="0.1524" layer="51"/>
+<wire x1="1.651" y1="-1.143" x2="-1.651" y2="-1.143" width="0.1524" layer="21"/>
+<wire x1="1.651" y1="1.143" x2="2.159" y2="0.635" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-4.191" y1="-1.143" x2="-3.9624" y2="-1.143" width="0.1524" layer="21"/>
+<wire x1="-4.191" y1="1.143" x2="-3.9624" y2="1.143" width="0.1524" layer="21"/>
+<wire x1="-4.699" y1="-0.635" x2="-4.191" y2="-1.143" width="0.1524" layer="21" curve="90"/>
+<wire x1="1.651" y1="-1.143" x2="2.159" y2="-0.635" width="0.1524" layer="21" curve="90"/>
+<wire x1="-4.699" y1="0.635" x2="-4.191" y2="1.143" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-4.699" y1="-0.635" x2="-4.699" y2="0.635" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="1.143" x2="-2.5654" y2="1.143" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="-1.143" x2="-2.5654" y2="-1.143" width="0.1524" layer="21"/>
+<wire x1="-0.3048" y1="0.762" x2="-0.3048" y2="-0.762" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0.762" x2="0.3302" y2="-0.762" width="0.3048" layer="21"/>
+<wire x1="1.27" y1="0" x2="0.3302" y2="0" width="0.1524" layer="51"/>
+<wire x1="-1.27" y1="0" x2="-0.3048" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-3.81" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="3" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.81" y="1.397" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.81" y="-2.667" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025_050-025X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 + 5 mm, outline 2.5 x 7.5 mm</description>
+<wire x1="-2.159" y1="1.27" x2="2.159" y2="1.27" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-1.27" x2="-2.159" y2="-1.27" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="1.016" x2="-2.413" y2="-1.016" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="1.27" x2="2.413" y2="1.016" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="1.016" x2="-2.159" y2="1.27" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-1.27" x2="2.413" y2="-1.016" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-1.016" x2="-2.159" y2="-1.27" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<wire x1="4.953" y1="1.016" x2="4.953" y2="-1.016" width="0.1524" layer="21"/>
+<wire x1="4.699" y1="1.27" x2="4.953" y2="1.016" width="0.1524" layer="21" curve="-90"/>
+<wire x1="4.699" y1="-1.27" x2="4.953" y2="-1.016" width="0.1524" layer="21" curve="90"/>
+<wire x1="2.794" y1="1.27" x2="4.699" y2="1.27" width="0.1524" layer="21"/>
+<wire x1="4.699" y1="-1.27" x2="2.794" y2="-1.27" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="1.016" x2="2.413" y2="0.762" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="-0.762" x2="2.413" y2="-1.016" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="0.254" x2="2.413" y2="-0.254" width="0.1524" layer="21"/>
+<wire x1="1.778" y1="0" x2="2.286" y2="0" width="0.1524" layer="51"/>
+<wire x1="2.286" y1="0" x2="2.794" y2="0" width="0.1524" layer="21"/>
+<wire x1="2.794" y1="0" x2="3.302" y2="0" width="0.1524" layer="51"/>
+<wire x1="0.762" y1="0" x2="0.381" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="3" x="3.81" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.159" y="1.651" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.159" y="-2.794" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025_050-035X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 + 5 mm, outline 3.5 x 7.5 mm</description>
+<wire x1="-2.159" y1="1.778" x2="2.159" y2="1.778" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-1.778" x2="-2.159" y2="-1.778" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="1.524" x2="-2.413" y2="-1.524" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="1.778" x2="2.413" y2="1.524" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="1.524" x2="-2.159" y2="1.778" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-1.778" x2="2.413" y2="-1.524" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-1.524" x2="-2.159" y2="-1.778" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<wire x1="4.953" y1="1.524" x2="4.953" y2="-1.524" width="0.1524" layer="21"/>
+<wire x1="4.699" y1="1.778" x2="4.953" y2="1.524" width="0.1524" layer="21" curve="-90"/>
+<wire x1="4.699" y1="-1.778" x2="4.953" y2="-1.524" width="0.1524" layer="21" curve="90"/>
+<wire x1="2.794" y1="1.778" x2="4.699" y2="1.778" width="0.1524" layer="21"/>
+<wire x1="4.699" y1="-1.778" x2="2.794" y2="-1.778" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="1.524" x2="2.413" y2="1.016" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="-1.016" x2="2.413" y2="-1.524" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="0.508" x2="2.413" y2="-0.508" width="0.1524" layer="21"/>
+<wire x1="0.381" y1="0" x2="0.762" y2="0" width="0.1524" layer="51"/>
+<wire x1="2.286" y1="0" x2="2.794" y2="0" width="0.1524" layer="21"/>
+<wire x1="2.794" y1="0" x2="3.302" y2="0" width="0.1524" layer="51"/>
+<wire x1="2.286" y1="0" x2="1.778" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="3" x="3.81" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.286" y="2.159" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.286" y="-3.302" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025_050-045X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 + 5 mm, outline 4.5 x 7.5 mm</description>
+<wire x1="-2.159" y1="2.286" x2="2.159" y2="2.286" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-2.286" x2="-2.159" y2="-2.286" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="2.032" x2="-2.413" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="2.286" x2="2.413" y2="2.032" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="2.032" x2="-2.159" y2="2.286" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-2.286" x2="2.413" y2="-2.032" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-2.032" x2="-2.159" y2="-2.286" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<wire x1="4.953" y1="2.032" x2="4.953" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="4.699" y1="2.286" x2="4.953" y2="2.032" width="0.1524" layer="21" curve="-90"/>
+<wire x1="4.699" y1="-2.286" x2="4.953" y2="-2.032" width="0.1524" layer="21" curve="90"/>
+<wire x1="2.794" y1="2.286" x2="4.699" y2="2.286" width="0.1524" layer="21"/>
+<wire x1="4.699" y1="-2.286" x2="2.794" y2="-2.286" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="2.032" x2="2.413" y2="1.397" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="-1.397" x2="2.413" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="0.762" x2="2.413" y2="-0.762" width="0.1524" layer="21"/>
+<wire x1="2.286" y1="0" x2="2.794" y2="0" width="0.1524" layer="21"/>
+<wire x1="2.794" y1="0" x2="3.302" y2="0" width="0.1524" layer="51"/>
+<wire x1="0.381" y1="0" x2="0.762" y2="0" width="0.1524" layer="51"/>
+<wire x1="2.286" y1="0" x2="1.778" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="3" x="3.81" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.286" y="2.667" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.286" y="-3.81" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C025_050-055X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 2.5 + 5 mm, outline 5.5 x 7.5 mm</description>
+<wire x1="-2.159" y1="2.794" x2="2.159" y2="2.794" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-2.794" x2="-2.159" y2="-2.794" width="0.1524" layer="21"/>
+<wire x1="-2.413" y1="2.54" x2="-2.413" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="2.794" x2="2.413" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.413" y1="2.54" x2="-2.159" y2="2.794" width="0.1524" layer="21" curve="-90"/>
+<wire x1="2.159" y1="-2.794" x2="2.413" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-2.413" y1="-2.54" x2="-2.159" y2="-2.794" width="0.1524" layer="21" curve="90"/>
+<wire x1="0.381" y1="0" x2="0.254" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="0.762" width="0.254" layer="21"/>
+<wire x1="0.254" y1="0" x2="0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0.762" x2="-0.254" y2="0" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.254" y2="-0.762" width="0.254" layer="21"/>
+<wire x1="-0.254" y1="0" x2="-0.381" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.381" y1="0" x2="-0.762" y2="0" width="0.1524" layer="51"/>
+<wire x1="4.953" y1="2.54" x2="4.953" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="4.699" y1="2.794" x2="4.953" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="4.699" y1="-2.794" x2="4.953" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="2.794" y1="2.794" x2="4.699" y2="2.794" width="0.1524" layer="21"/>
+<wire x1="4.699" y1="-2.794" x2="2.794" y2="-2.794" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="2.54" x2="2.413" y2="2.032" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="-2.032" x2="2.413" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="2.413" y1="0.762" x2="2.413" y2="-0.762" width="0.1524" layer="21"/>
+<wire x1="1.778" y1="0" x2="2.286" y2="0" width="0.1524" layer="51"/>
+<wire x1="2.286" y1="0" x2="2.794" y2="0" width="0.1524" layer="21"/>
+<wire x1="2.794" y1="0" x2="3.302" y2="0" width="0.1524" layer="51"/>
+<wire x1="0.381" y1="0" x2="0.762" y2="0" width="0.1524" layer="51"/>
+<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
+<pad name="3" x="3.81" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.286" y="3.175" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.032" y="-2.286" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C050-024X044">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 5 mm, outline 2.4 x 4.4 mm</description>
+<wire x1="-2.159" y1="-0.635" x2="-2.159" y2="0.635" width="0.1524" layer="51"/>
+<wire x1="-2.159" y1="0.635" x2="-1.651" y2="1.143" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.159" y1="-0.635" x2="-1.651" y2="-1.143" width="0.1524" layer="21" curve="90"/>
+<wire x1="1.651" y1="1.143" x2="-1.651" y2="1.143" width="0.1524" layer="21"/>
+<wire x1="2.159" y1="-0.635" x2="2.159" y2="0.635" width="0.1524" layer="51"/>
+<wire x1="1.651" y1="-1.143" x2="-1.651" y2="-1.143" width="0.1524" layer="21"/>
+<wire x1="1.651" y1="1.143" x2="2.159" y2="0.635" width="0.1524" layer="21" curve="-90"/>
+<wire x1="1.651" y1="-1.143" x2="2.159" y2="-0.635" width="0.1524" layer="21" curve="90"/>
+<wire x1="-0.3048" y1="0.762" x2="-0.3048" y2="0" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-0.3048" y2="-0.762" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0.762" x2="0.3302" y2="0" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="0.3302" y2="-0.762" width="0.3048" layer="21"/>
+<wire x1="1.27" y1="0" x2="0.3302" y2="0" width="0.1524" layer="21"/>
+<wire x1="-1.27" y1="0" x2="-0.3048" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-2.159" y="1.397" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-2.159" y="-2.667" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+<rectangle x1="2.159" y1="-0.381" x2="2.54" y2="0.381" layer="51"/>
+<rectangle x1="-2.54" y1="-0.381" x2="-2.159" y2="0.381" layer="51"/>
+</package>
+<package name="C050-025X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 5 mm, outline 2.5 x 7.5 mm</description>
+<wire x1="-0.3048" y1="0.635" x2="-0.3048" y2="0" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-0.3048" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.3302" y1="0.635" x2="0.3302" y2="0" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="0.3302" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.683" y1="1.016" x2="-3.683" y2="-1.016" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="-1.27" x2="3.429" y2="-1.27" width="0.1524" layer="21"/>
+<wire x1="3.683" y1="-1.016" x2="3.683" y2="1.016" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="1.27" x2="-3.429" y2="1.27" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="1.27" x2="3.683" y2="1.016" width="0.1524" layer="21" curve="-90"/>
+<wire x1="3.429" y1="-1.27" x2="3.683" y2="-1.016" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="-1.016" x2="-3.429" y2="-1.27" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="1.016" x2="-3.429" y2="1.27" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.429" y="1.651" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.429" y="-2.794" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C050-045X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 5 mm, outline 4.5 x 7.5 mm</description>
+<wire x1="-0.3048" y1="0.635" x2="-0.3048" y2="0" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-0.3048" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.3302" y1="0.635" x2="0.3302" y2="0" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="0.3302" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.683" y1="2.032" x2="-3.683" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="-2.286" x2="3.429" y2="-2.286" width="0.1524" layer="21"/>
+<wire x1="3.683" y1="-2.032" x2="3.683" y2="2.032" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="2.286" x2="-3.429" y2="2.286" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="2.286" x2="3.683" y2="2.032" width="0.1524" layer="21" curve="-90"/>
+<wire x1="3.429" y1="-2.286" x2="3.683" y2="-2.032" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="-2.032" x2="-3.429" y2="-2.286" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="2.032" x2="-3.429" y2="2.286" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.556" y="2.667" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.556" y="-3.81" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C050-030X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 5 mm, outline 3 x 7.5 mm</description>
+<wire x1="-0.3048" y1="0.635" x2="-0.3048" y2="0" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-0.3048" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.3302" y1="0.635" x2="0.3302" y2="0" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="0.3302" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.683" y1="1.27" x2="-3.683" y2="-1.27" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="-1.524" x2="3.429" y2="-1.524" width="0.1524" layer="21"/>
+<wire x1="3.683" y1="-1.27" x2="3.683" y2="1.27" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="1.524" x2="-3.429" y2="1.524" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="1.524" x2="3.683" y2="1.27" width="0.1524" layer="21" curve="-90"/>
+<wire x1="3.429" y1="-1.524" x2="3.683" y2="-1.27" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="-1.27" x2="-3.429" y2="-1.524" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="1.27" x2="-3.429" y2="1.524" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.556" y="1.905" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.556" y="-3.048" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C050-050X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 5 mm, outline 5 x 7.5 mm</description>
+<wire x1="-0.3048" y1="0.635" x2="-0.3048" y2="0" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-0.3048" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.3302" y1="0.635" x2="0.3302" y2="0" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="0.3302" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.683" y1="2.286" x2="-3.683" y2="-2.286" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="-2.54" x2="3.429" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="3.683" y1="-2.286" x2="3.683" y2="2.286" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="2.54" x2="-3.429" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="2.54" x2="3.683" y2="2.286" width="0.1524" layer="21" curve="-90"/>
+<wire x1="3.429" y1="-2.54" x2="3.683" y2="-2.286" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="-2.286" x2="-3.429" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="2.286" x2="-3.429" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.429" y="2.921" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.175" y="-2.159" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C050-055X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 5 mm, outline 5.5 x 7.5 mm</description>
+<wire x1="-0.3048" y1="0.635" x2="-0.3048" y2="0" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-0.3048" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.3302" y1="0.635" x2="0.3302" y2="0" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="0.3302" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.683" y1="2.54" x2="-3.683" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="-2.794" x2="3.429" y2="-2.794" width="0.1524" layer="21"/>
+<wire x1="3.683" y1="-2.54" x2="3.683" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="2.794" x2="-3.429" y2="2.794" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="2.794" x2="3.683" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="3.429" y1="-2.794" x2="3.683" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="-2.54" x2="-3.429" y2="-2.794" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="2.54" x2="-3.429" y2="2.794" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.429" y="3.175" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.302" y="-2.286" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C050-075X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 5 mm, outline 7.5 x 7.5 mm</description>
+<wire x1="-1.524" y1="0" x2="-0.4572" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.4572" y1="0" x2="-0.4572" y2="0.762" width="0.4064" layer="21"/>
+<wire x1="-0.4572" y1="0" x2="-0.4572" y2="-0.762" width="0.4064" layer="21"/>
+<wire x1="0.4318" y1="0.762" x2="0.4318" y2="0" width="0.4064" layer="21"/>
+<wire x1="0.4318" y1="0" x2="1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.4318" y1="0" x2="0.4318" y2="-0.762" width="0.4064" layer="21"/>
+<wire x1="-3.683" y1="3.429" x2="-3.683" y2="-3.429" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="-3.683" x2="3.429" y2="-3.683" width="0.1524" layer="21"/>
+<wire x1="3.683" y1="-3.429" x2="3.683" y2="3.429" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="3.683" x2="-3.429" y2="3.683" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="3.683" x2="3.683" y2="3.429" width="0.1524" layer="21" curve="-90"/>
+<wire x1="3.429" y1="-3.683" x2="3.683" y2="-3.429" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="-3.429" x2="-3.429" y2="-3.683" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="3.429" x2="-3.429" y2="3.683" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.429" y="4.064" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.175" y="-2.921" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C050H075X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+Horizontal, grid 5 mm, outline 7.5 x 7.5 mm</description>
+<wire x1="-3.683" y1="7.112" x2="-3.683" y2="0.508" width="0.1524" layer="21"/>
+<wire x1="-3.683" y1="0.508" x2="-3.302" y2="0.508" width="0.1524" layer="21"/>
+<wire x1="-3.302" y1="0.508" x2="-1.778" y2="0.508" width="0.1524" layer="51"/>
+<wire x1="-1.778" y1="0.508" x2="1.778" y2="0.508" width="0.1524" layer="21"/>
+<wire x1="1.778" y1="0.508" x2="3.302" y2="0.508" width="0.1524" layer="51"/>
+<wire x1="3.302" y1="0.508" x2="3.683" y2="0.508" width="0.1524" layer="21"/>
+<wire x1="3.683" y1="0.508" x2="3.683" y2="7.112" width="0.1524" layer="21"/>
+<wire x1="3.175" y1="7.62" x2="-3.175" y2="7.62" width="0.1524" layer="21"/>
+<wire x1="-0.3048" y1="2.413" x2="-0.3048" y2="1.778" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="1.778" x2="-0.3048" y2="1.143" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="1.778" x2="-1.651" y2="1.778" width="0.1524" layer="21"/>
+<wire x1="0.3302" y1="2.413" x2="0.3302" y2="1.778" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="1.778" x2="0.3302" y2="1.143" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="1.778" x2="1.651" y2="1.778" width="0.1524" layer="21"/>
+<wire x1="-3.683" y1="7.112" x2="-3.175" y2="7.62" width="0.1524" layer="21" curve="-90"/>
+<wire x1="3.175" y1="7.62" x2="3.683" y2="7.112" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-2.54" y1="0" x2="-2.54" y2="0.254" width="0.508" layer="51"/>
+<wire x1="2.54" y1="0" x2="2.54" y2="0.254" width="0.508" layer="51"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.302" y="8.001" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.175" y="3.175" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+<rectangle x1="-2.794" y1="0.127" x2="-2.286" y2="0.508" layer="51"/>
+<rectangle x1="2.286" y1="0.127" x2="2.794" y2="0.508" layer="51"/>
+</package>
+<package name="C075-032X103">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 7.5 mm, outline 3.2 x 10.3 mm</description>
+<wire x1="4.826" y1="1.524" x2="-4.826" y2="1.524" width="0.1524" layer="21"/>
+<wire x1="-5.08" y1="1.27" x2="-5.08" y2="-1.27" width="0.1524" layer="21"/>
+<wire x1="-4.826" y1="-1.524" x2="4.826" y2="-1.524" width="0.1524" layer="21"/>
+<wire x1="5.08" y1="-1.27" x2="5.08" y2="1.27" width="0.1524" layer="21"/>
+<wire x1="4.826" y1="1.524" x2="5.08" y2="1.27" width="0.1524" layer="21" curve="-90"/>
+<wire x1="4.826" y1="-1.524" x2="5.08" y2="-1.27" width="0.1524" layer="21" curve="90"/>
+<wire x1="-5.08" y1="-1.27" x2="-4.826" y2="-1.524" width="0.1524" layer="21" curve="90"/>
+<wire x1="-5.08" y1="1.27" x2="-4.826" y2="1.524" width="0.1524" layer="21" curve="-90"/>
+<wire x1="0.508" y1="0" x2="2.54" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.54" y1="0" x2="-0.508" y2="0" width="0.1524" layer="21"/>
+<wire x1="-0.508" y1="0.889" x2="-0.508" y2="0" width="0.4064" layer="21"/>
+<wire x1="-0.508" y1="0" x2="-0.508" y2="-0.889" width="0.4064" layer="21"/>
+<wire x1="0.508" y1="0.889" x2="0.508" y2="0" width="0.4064" layer="21"/>
+<wire x1="0.508" y1="0" x2="0.508" y2="-0.889" width="0.4064" layer="21"/>
+<pad name="1" x="-3.81" y="0" drill="0.9144" shape="octagon"/>
+<pad name="2" x="3.81" y="0" drill="0.9144" shape="octagon"/>
+<text x="-4.826" y="1.905" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-4.826" y="-3.048" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C075-042X103">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 7.5 mm, outline 4.2 x 10.3 mm</description>
+<wire x1="4.826" y1="2.032" x2="-4.826" y2="2.032" width="0.1524" layer="21"/>
+<wire x1="-5.08" y1="1.778" x2="-5.08" y2="-1.778" width="0.1524" layer="21"/>
+<wire x1="-4.826" y1="-2.032" x2="4.826" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="5.08" y1="-1.778" x2="5.08" y2="1.778" width="0.1524" layer="21"/>
+<wire x1="4.826" y1="2.032" x2="5.08" y2="1.778" width="0.1524" layer="21" curve="-90"/>
+<wire x1="4.826" y1="-2.032" x2="5.08" y2="-1.778" width="0.1524" layer="21" curve="90"/>
+<wire x1="-5.08" y1="-1.778" x2="-4.826" y2="-2.032" width="0.1524" layer="21" curve="90"/>
+<wire x1="-5.08" y1="1.778" x2="-4.826" y2="2.032" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-1.27" y1="0" x2="2.667" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.667" y1="0" x2="-2.159" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.159" y1="1.27" x2="-2.159" y2="0" width="0.4064" layer="21"/>
+<wire x1="-2.159" y1="0" x2="-2.159" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-1.27" y1="1.27" x2="-1.27" y2="0" width="0.4064" layer="21"/>
+<wire x1="-1.27" y1="0" x2="-1.27" y2="-1.27" width="0.4064" layer="21"/>
+<pad name="1" x="-3.81" y="0" drill="0.9144" shape="octagon"/>
+<pad name="2" x="3.81" y="0" drill="0.9144" shape="octagon"/>
+<text x="-4.699" y="2.413" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-0.635" y="-1.651" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C075-052X106">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 7.5 mm, outline 5.2 x 10.6 mm</description>
+<wire x1="4.953" y1="2.54" x2="-4.953" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="-5.207" y1="2.286" x2="-5.207" y2="-2.286" width="0.1524" layer="21"/>
+<wire x1="-4.953" y1="-2.54" x2="4.953" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="5.207" y1="-2.286" x2="5.207" y2="2.286" width="0.1524" layer="21"/>
+<wire x1="4.953" y1="2.54" x2="5.207" y2="2.286" width="0.1524" layer="21" curve="-90"/>
+<wire x1="4.953" y1="-2.54" x2="5.207" y2="-2.286" width="0.1524" layer="21" curve="90"/>
+<wire x1="-5.207" y1="-2.286" x2="-4.953" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-5.207" y1="2.286" x2="-4.953" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-1.27" y1="0" x2="2.667" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.667" y1="0" x2="-2.159" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.159" y1="1.27" x2="-2.159" y2="0" width="0.4064" layer="21"/>
+<wire x1="-2.159" y1="0" x2="-2.159" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-1.27" y1="1.27" x2="-1.27" y2="0" width="0.4064" layer="21"/>
+<wire x1="-1.27" y1="0" x2="-1.27" y2="-1.27" width="0.4064" layer="21"/>
+<pad name="1" x="-3.81" y="0" drill="0.9144" shape="octagon"/>
+<pad name="2" x="3.81" y="0" drill="0.9144" shape="octagon"/>
+<text x="-4.826" y="2.921" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-0.635" y="-2.032" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C102-043X133">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 10.2 mm, outline 4.3 x 13.3 mm</description>
+<wire x1="-3.175" y1="1.27" x2="-3.175" y2="0" width="0.4064" layer="21"/>
+<wire x1="-2.286" y1="1.27" x2="-2.286" y2="0" width="0.4064" layer="21"/>
+<wire x1="3.81" y1="0" x2="-2.286" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.286" y1="0" x2="-2.286" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-3.81" y1="0" x2="-3.175" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.175" y1="0" x2="-3.175" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-6.096" y1="2.032" x2="6.096" y2="2.032" width="0.1524" layer="21"/>
+<wire x1="6.604" y1="1.524" x2="6.604" y2="-1.524" width="0.1524" layer="21"/>
+<wire x1="6.096" y1="-2.032" x2="-6.096" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="-6.604" y1="-1.524" x2="-6.604" y2="1.524" width="0.1524" layer="21"/>
+<wire x1="6.096" y1="2.032" x2="6.604" y2="1.524" width="0.1524" layer="21" curve="-90"/>
+<wire x1="6.096" y1="-2.032" x2="6.604" y2="-1.524" width="0.1524" layer="21" curve="90"/>
+<wire x1="-6.604" y1="-1.524" x2="-6.096" y2="-2.032" width="0.1524" layer="21" curve="90"/>
+<wire x1="-6.604" y1="1.524" x2="-6.096" y2="2.032" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-5.08" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="5.08" y="0" drill="1.016" shape="octagon"/>
+<text x="-6.096" y="2.413" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-1.524" y="-1.651" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C102-054X133">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 10.2 mm, outline 5.4 x 13.3 mm</description>
+<wire x1="-3.175" y1="1.27" x2="-3.175" y2="0" width="0.4064" layer="21"/>
+<wire x1="-2.286" y1="1.27" x2="-2.286" y2="0" width="0.4064" layer="21"/>
+<wire x1="3.81" y1="0" x2="-2.286" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.286" y1="0" x2="-2.286" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-3.81" y1="0" x2="-3.175" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.175" y1="0" x2="-3.175" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-6.096" y1="2.54" x2="6.096" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="6.604" y1="2.032" x2="6.604" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="6.096" y1="-2.54" x2="-6.096" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="-6.604" y1="-2.032" x2="-6.604" y2="2.032" width="0.1524" layer="21"/>
+<wire x1="6.096" y1="2.54" x2="6.604" y2="2.032" width="0.1524" layer="21" curve="-90"/>
+<wire x1="6.096" y1="-2.54" x2="6.604" y2="-2.032" width="0.1524" layer="21" curve="90"/>
+<wire x1="-6.604" y1="-2.032" x2="-6.096" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-6.604" y1="2.032" x2="-6.096" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-5.08" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="5.08" y="0" drill="1.016" shape="octagon"/>
+<text x="-6.096" y="2.921" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-1.524" y="-1.905" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C102-064X133">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 10.2 mm, outline 6.4 x 13.3 mm</description>
+<wire x1="-3.175" y1="1.27" x2="-3.175" y2="0" width="0.4064" layer="21"/>
+<wire x1="-2.286" y1="1.27" x2="-2.286" y2="0" width="0.4064" layer="21"/>
+<wire x1="3.81" y1="0" x2="-2.286" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.286" y1="0" x2="-2.286" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-3.81" y1="0" x2="-3.175" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.175" y1="0" x2="-3.175" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-6.096" y1="3.048" x2="6.096" y2="3.048" width="0.1524" layer="21"/>
+<wire x1="6.604" y1="2.54" x2="6.604" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="6.096" y1="-3.048" x2="-6.096" y2="-3.048" width="0.1524" layer="21"/>
+<wire x1="-6.604" y1="-2.54" x2="-6.604" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="6.096" y1="3.048" x2="6.604" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="6.096" y1="-3.048" x2="6.604" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-6.604" y1="-2.54" x2="-6.096" y2="-3.048" width="0.1524" layer="21" curve="90"/>
+<wire x1="-6.604" y1="2.54" x2="-6.096" y2="3.048" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-5.08" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="5.08" y="0" drill="1.016" shape="octagon"/>
+<text x="-6.096" y="3.429" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-1.524" y="-2.032" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C102_152-062X184">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 10.2 mm + 15.2 mm, outline 6.2 x 18.4 mm</description>
+<wire x1="-2.286" y1="1.27" x2="-2.286" y2="0" width="0.4064" layer="21"/>
+<wire x1="-2.286" y1="0" x2="-2.286" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-3.175" y1="1.27" x2="-3.175" y2="0" width="0.4064" layer="21"/>
+<wire x1="-3.175" y1="0" x2="-3.175" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-3.683" y1="0" x2="-3.175" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.286" y1="0" x2="3.683" y2="0" width="0.1524" layer="21"/>
+<wire x1="6.477" y1="0" x2="8.636" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.096" y1="3.048" x2="6.223" y2="3.048" width="0.1524" layer="21"/>
+<wire x1="6.223" y1="-3.048" x2="-6.096" y2="-3.048" width="0.1524" layer="21"/>
+<wire x1="-6.604" y1="-2.54" x2="-6.604" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="6.223" y1="3.048" x2="6.731" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="6.223" y1="-3.048" x2="6.731" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-6.604" y1="-2.54" x2="-6.096" y2="-3.048" width="0.1524" layer="21" curve="90"/>
+<wire x1="-6.604" y1="2.54" x2="-6.096" y2="3.048" width="0.1524" layer="21" curve="-90"/>
+<wire x1="6.731" y1="2.54" x2="6.731" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="11.176" y1="3.048" x2="11.684" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="11.176" y1="-3.048" x2="11.684" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="11.176" y1="-3.048" x2="7.112" y2="-3.048" width="0.1524" layer="21"/>
+<wire x1="7.112" y1="3.048" x2="11.176" y2="3.048" width="0.1524" layer="21"/>
+<wire x1="11.684" y1="2.54" x2="11.684" y2="-2.54" width="0.1524" layer="21"/>
+<pad name="1" x="-5.08" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="5.08" y="0" drill="1.016" shape="octagon"/>
+<pad name="3" x="10.033" y="0" drill="1.016" shape="octagon"/>
+<text x="-5.969" y="3.429" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-1.524" y="-2.286" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C150-054X183">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 15 mm, outline 5.4 x 18.3 mm</description>
+<wire x1="-5.08" y1="1.27" x2="-5.08" y2="0" width="0.4064" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-5.08" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="1.27" x2="-4.191" y2="0" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="-4.191" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="9.017" y1="2.032" x2="9.017" y2="-2.032" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="-2.54" x2="-8.509" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="-9.017" y1="-2.032" x2="-9.017" y2="2.032" width="0.1524" layer="21"/>
+<wire x1="-8.509" y1="2.54" x2="8.509" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="2.54" x2="9.017" y2="2.032" width="0.1524" layer="21" curve="-90"/>
+<wire x1="8.509" y1="-2.54" x2="9.017" y2="-2.032" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="-2.032" x2="-8.509" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="2.032" x2="-8.509" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-7.493" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="7.493" y="0" drill="1.016" shape="octagon"/>
+<text x="-8.382" y="2.921" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.429" y="-2.032" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C150-064X183">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 15 mm, outline 6.4 x 18.3 mm</description>
+<wire x1="-5.08" y1="1.27" x2="-5.08" y2="0" width="0.4064" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-5.08" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="1.27" x2="-4.191" y2="0" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="-4.191" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="9.017" y1="2.54" x2="9.017" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="-3.048" x2="-8.509" y2="-3.048" width="0.1524" layer="21"/>
+<wire x1="-9.017" y1="-2.54" x2="-9.017" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="-8.509" y1="3.048" x2="8.509" y2="3.048" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="3.048" x2="9.017" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="8.509" y1="-3.048" x2="9.017" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="-2.54" x2="-8.509" y2="-3.048" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="2.54" x2="-8.509" y2="3.048" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-7.493" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="7.493" y="0" drill="1.016" shape="octagon"/>
+<text x="-8.509" y="3.429" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.429" y="-2.032" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C150-072X183">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 15 mm, outline 7.2 x 18.3 mm</description>
+<wire x1="-5.08" y1="1.27" x2="-5.08" y2="0" width="0.4064" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-5.08" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="1.27" x2="-4.191" y2="0" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="-4.191" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="9.017" y1="3.048" x2="9.017" y2="-3.048" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="-3.556" x2="-8.509" y2="-3.556" width="0.1524" layer="21"/>
+<wire x1="-9.017" y1="-3.048" x2="-9.017" y2="3.048" width="0.1524" layer="21"/>
+<wire x1="-8.509" y1="3.556" x2="8.509" y2="3.556" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="3.556" x2="9.017" y2="3.048" width="0.1524" layer="21" curve="-90"/>
+<wire x1="8.509" y1="-3.556" x2="9.017" y2="-3.048" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="-3.048" x2="-8.509" y2="-3.556" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="3.048" x2="-8.509" y2="3.556" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-7.493" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="7.493" y="0" drill="1.016" shape="octagon"/>
+<text x="-8.509" y="3.937" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.429" y="-2.286" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C150-084X183">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 15 mm, outline 8.4 x 18.3 mm</description>
+<wire x1="-5.08" y1="1.27" x2="-5.08" y2="0" width="0.4064" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-5.08" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="1.27" x2="-4.191" y2="0" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="-4.191" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="9.017" y1="3.556" x2="9.017" y2="-3.556" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="-4.064" x2="-8.509" y2="-4.064" width="0.1524" layer="21"/>
+<wire x1="-9.017" y1="-3.556" x2="-9.017" y2="3.556" width="0.1524" layer="21"/>
+<wire x1="-8.509" y1="4.064" x2="8.509" y2="4.064" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="4.064" x2="9.017" y2="3.556" width="0.1524" layer="21" curve="-90"/>
+<wire x1="8.509" y1="-4.064" x2="9.017" y2="-3.556" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="-3.556" x2="-8.509" y2="-4.064" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="3.556" x2="-8.509" y2="4.064" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-7.493" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="7.493" y="0" drill="1.016" shape="octagon"/>
+<text x="-8.509" y="4.445" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.429" y="-2.54" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C150-091X182">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 15 mm, outline 9.1 x 18.2 mm</description>
+<wire x1="-5.08" y1="1.27" x2="-5.08" y2="0" width="0.4064" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-5.08" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="1.27" x2="-4.191" y2="0" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="-4.191" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-4.191" y1="0" x2="6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="-5.08" y1="0" x2="-6.096" y2="0" width="0.1524" layer="21"/>
+<wire x1="9.017" y1="3.937" x2="9.017" y2="-3.937" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="-4.445" x2="-8.509" y2="-4.445" width="0.1524" layer="21"/>
+<wire x1="-9.017" y1="-3.937" x2="-9.017" y2="3.937" width="0.1524" layer="21"/>
+<wire x1="-8.509" y1="4.445" x2="8.509" y2="4.445" width="0.1524" layer="21"/>
+<wire x1="8.509" y1="4.445" x2="9.017" y2="3.937" width="0.1524" layer="21" curve="-90"/>
+<wire x1="8.509" y1="-4.445" x2="9.017" y2="-3.937" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="-3.937" x2="-8.509" y2="-4.445" width="0.1524" layer="21" curve="90"/>
+<wire x1="-9.017" y1="3.937" x2="-8.509" y2="4.445" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-7.493" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="7.493" y="0" drill="1.016" shape="octagon"/>
+<text x="-8.509" y="4.826" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.429" y="-2.54" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C225-062X268">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 22.5 mm, outline 6.2 x 26.8 mm</description>
+<wire x1="-12.827" y1="3.048" x2="12.827" y2="3.048" width="0.1524" layer="21"/>
+<wire x1="13.335" y1="2.54" x2="13.335" y2="-2.54" width="0.1524" layer="21"/>
+<wire x1="12.827" y1="-3.048" x2="-12.827" y2="-3.048" width="0.1524" layer="21"/>
+<wire x1="-13.335" y1="-2.54" x2="-13.335" y2="2.54" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="12.827" y1="3.048" x2="13.335" y2="2.54" width="0.1524" layer="21" curve="-90"/>
+<wire x1="12.827" y1="-3.048" x2="13.335" y2="-2.54" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="-2.54" x2="-12.827" y2="-3.048" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="2.54" x2="-12.827" y2="3.048" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-9.652" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="9.652" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-11.303" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="11.303" y="0" drill="1.016" shape="octagon"/>
+<text x="-12.7" y="3.429" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C225-074X268">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 22.5 mm, outline 7.4 x 26.8 mm</description>
+<wire x1="-12.827" y1="3.556" x2="12.827" y2="3.556" width="0.1524" layer="21"/>
+<wire x1="13.335" y1="3.048" x2="13.335" y2="-3.048" width="0.1524" layer="21"/>
+<wire x1="12.827" y1="-3.556" x2="-12.827" y2="-3.556" width="0.1524" layer="21"/>
+<wire x1="-13.335" y1="-3.048" x2="-13.335" y2="3.048" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="12.827" y1="3.556" x2="13.335" y2="3.048" width="0.1524" layer="21" curve="-90"/>
+<wire x1="12.827" y1="-3.556" x2="13.335" y2="-3.048" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="-3.048" x2="-12.827" y2="-3.556" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="3.048" x2="-12.827" y2="3.556" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-9.652" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="9.652" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-11.303" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="11.303" y="0" drill="1.016" shape="octagon"/>
+<text x="-12.827" y="3.937" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C225-087X268">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 22.5 mm, outline 8.7 x 26.8 mm</description>
+<wire x1="-12.827" y1="4.318" x2="12.827" y2="4.318" width="0.1524" layer="21"/>
+<wire x1="13.335" y1="3.81" x2="13.335" y2="-3.81" width="0.1524" layer="21"/>
+<wire x1="12.827" y1="-4.318" x2="-12.827" y2="-4.318" width="0.1524" layer="21"/>
+<wire x1="-13.335" y1="-3.81" x2="-13.335" y2="3.81" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="12.827" y1="4.318" x2="13.335" y2="3.81" width="0.1524" layer="21" curve="-90"/>
+<wire x1="12.827" y1="-4.318" x2="13.335" y2="-3.81" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="-3.81" x2="-12.827" y2="-4.318" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="3.81" x2="-12.827" y2="4.318" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-9.652" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="9.652" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-11.303" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="11.303" y="0" drill="1.016" shape="octagon"/>
+<text x="-12.827" y="4.699" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C225-108X268">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 22.5 mm, outline 10.8 x 26.8 mm</description>
+<wire x1="-12.827" y1="5.334" x2="12.827" y2="5.334" width="0.1524" layer="21"/>
+<wire x1="13.335" y1="4.826" x2="13.335" y2="-4.826" width="0.1524" layer="21"/>
+<wire x1="12.827" y1="-5.334" x2="-12.827" y2="-5.334" width="0.1524" layer="21"/>
+<wire x1="-13.335" y1="-4.826" x2="-13.335" y2="4.826" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="12.827" y1="5.334" x2="13.335" y2="4.826" width="0.1524" layer="21" curve="-90"/>
+<wire x1="12.827" y1="-5.334" x2="13.335" y2="-4.826" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="-4.826" x2="-12.827" y2="-5.334" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="4.826" x2="-12.827" y2="5.334" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-9.652" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="9.652" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-11.303" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="11.303" y="0" drill="1.016" shape="octagon"/>
+<text x="-12.954" y="5.715" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C225-113X268">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 22.5 mm, outline 11.3 x 26.8 mm</description>
+<wire x1="-12.827" y1="5.588" x2="12.827" y2="5.588" width="0.1524" layer="21"/>
+<wire x1="13.335" y1="5.08" x2="13.335" y2="-5.08" width="0.1524" layer="21"/>
+<wire x1="12.827" y1="-5.588" x2="-12.827" y2="-5.588" width="0.1524" layer="21"/>
+<wire x1="-13.335" y1="-5.08" x2="-13.335" y2="5.08" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="12.827" y1="5.588" x2="13.335" y2="5.08" width="0.1524" layer="21" curve="-90"/>
+<wire x1="12.827" y1="-5.588" x2="13.335" y2="-5.08" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="-5.08" x2="-12.827" y2="-5.588" width="0.1524" layer="21" curve="90"/>
+<wire x1="-13.335" y1="5.08" x2="-12.827" y2="5.588" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-9.652" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="9.652" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-11.303" y="0" drill="1.016" shape="octagon"/>
+<pad name="2" x="11.303" y="0" drill="1.016" shape="octagon"/>
+<text x="-12.954" y="5.969" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C275-093X316">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 27.5 mm, outline 9.3 x 31.6 mm</description>
+<wire x1="-15.24" y1="4.572" x2="15.24" y2="4.572" width="0.1524" layer="21"/>
+<wire x1="15.748" y1="4.064" x2="15.748" y2="-4.064" width="0.1524" layer="21"/>
+<wire x1="15.24" y1="-4.572" x2="-15.24" y2="-4.572" width="0.1524" layer="21"/>
+<wire x1="-15.748" y1="-4.064" x2="-15.748" y2="4.064" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="15.24" y1="4.572" x2="15.748" y2="4.064" width="0.1524" layer="21" curve="-90"/>
+<wire x1="15.24" y1="-4.572" x2="15.748" y2="-4.064" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="-4.064" x2="-15.24" y2="-4.572" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="4.064" x2="-15.24" y2="4.572" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-11.557" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="11.557" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-13.716" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="13.716" y="0" drill="1.1938" shape="octagon"/>
+<text x="-15.24" y="4.953" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C275-113X316">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 27.5 mm, outline 11.3 x 31.6 mm</description>
+<wire x1="-15.24" y1="5.588" x2="15.24" y2="5.588" width="0.1524" layer="21"/>
+<wire x1="15.748" y1="5.08" x2="15.748" y2="-5.08" width="0.1524" layer="21"/>
+<wire x1="15.24" y1="-5.588" x2="-15.24" y2="-5.588" width="0.1524" layer="21"/>
+<wire x1="-15.748" y1="-5.08" x2="-15.748" y2="5.08" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="15.24" y1="5.588" x2="15.748" y2="5.08" width="0.1524" layer="21" curve="-90"/>
+<wire x1="15.24" y1="-5.588" x2="15.748" y2="-5.08" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="-5.08" x2="-15.24" y2="-5.588" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="5.08" x2="-15.24" y2="5.588" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-11.557" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="11.557" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-13.716" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="13.716" y="0" drill="1.1938" shape="octagon"/>
+<text x="-15.24" y="5.969" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C275-134X316">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 27.5 mm, outline 13.4 x 31.6 mm</description>
+<wire x1="-15.24" y1="6.604" x2="15.24" y2="6.604" width="0.1524" layer="21"/>
+<wire x1="15.748" y1="6.096" x2="15.748" y2="-6.096" width="0.1524" layer="21"/>
+<wire x1="15.24" y1="-6.604" x2="-15.24" y2="-6.604" width="0.1524" layer="21"/>
+<wire x1="-15.748" y1="-6.096" x2="-15.748" y2="6.096" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="15.24" y1="6.604" x2="15.748" y2="6.096" width="0.1524" layer="21" curve="-90"/>
+<wire x1="15.24" y1="-6.604" x2="15.748" y2="-6.096" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="-6.096" x2="-15.24" y2="-6.604" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="6.096" x2="-15.24" y2="6.604" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-11.557" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="11.557" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-13.716" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="13.716" y="0" drill="1.1938" shape="octagon"/>
+<text x="-15.24" y="6.985" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C275-205X316">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 27.5 mm, outline 20.5 x 31.6 mm</description>
+<wire x1="-15.24" y1="10.16" x2="15.24" y2="10.16" width="0.1524" layer="21"/>
+<wire x1="15.748" y1="9.652" x2="15.748" y2="-9.652" width="0.1524" layer="21"/>
+<wire x1="15.24" y1="-10.16" x2="-15.24" y2="-10.16" width="0.1524" layer="21"/>
+<wire x1="-15.748" y1="-9.652" x2="-15.748" y2="9.652" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="15.24" y1="10.16" x2="15.748" y2="9.652" width="0.1524" layer="21" curve="-90"/>
+<wire x1="15.24" y1="-10.16" x2="15.748" y2="-9.652" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="-9.652" x2="-15.24" y2="-10.16" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="9.652" x2="-15.24" y2="10.16" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-11.557" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="11.557" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-13.716" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="13.716" y="0" drill="1.1938" shape="octagon"/>
+<text x="-15.24" y="10.541" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-4.318" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C325-137X374">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 32.5 mm, outline 13.7 x 37.4 mm</description>
+<wire x1="-14.2748" y1="0" x2="-12.7" y2="0" width="0.1524" layer="21"/>
+<wire x1="-12.7" y1="1.905" x2="-12.7" y2="0" width="0.4064" layer="21"/>
+<wire x1="-11.811" y1="1.905" x2="-11.811" y2="0" width="0.4064" layer="21"/>
+<wire x1="-11.811" y1="0" x2="14.2748" y2="0" width="0.1524" layer="21"/>
+<wire x1="-11.811" y1="0" x2="-11.811" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-12.7" y1="0" x2="-12.7" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="18.542" y1="6.731" x2="18.542" y2="-6.731" width="0.1524" layer="21"/>
+<wire x1="-18.542" y1="6.731" x2="-18.542" y2="-6.731" width="0.1524" layer="21"/>
+<wire x1="-18.542" y1="-6.731" x2="18.542" y2="-6.731" width="0.1524" layer="21"/>
+<wire x1="18.542" y1="6.731" x2="-18.542" y2="6.731" width="0.1524" layer="21"/>
+<pad name="1" x="-16.256" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="16.256" y="0" drill="1.1938" shape="octagon"/>
+<text x="-18.2372" y="7.0612" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-10.8458" y="-2.8702" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C325-162X374">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 32.5 mm, outline 16.2 x 37.4 mm</description>
+<wire x1="-14.2748" y1="0" x2="-12.7" y2="0" width="0.1524" layer="21"/>
+<wire x1="-12.7" y1="1.905" x2="-12.7" y2="0" width="0.4064" layer="21"/>
+<wire x1="-11.811" y1="1.905" x2="-11.811" y2="0" width="0.4064" layer="21"/>
+<wire x1="-11.811" y1="0" x2="14.2748" y2="0" width="0.1524" layer="21"/>
+<wire x1="-11.811" y1="0" x2="-11.811" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-12.7" y1="0" x2="-12.7" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="18.542" y1="8.001" x2="18.542" y2="-8.001" width="0.1524" layer="21"/>
+<wire x1="-18.542" y1="8.001" x2="-18.542" y2="-8.001" width="0.1524" layer="21"/>
+<wire x1="-18.542" y1="-8.001" x2="18.542" y2="-8.001" width="0.1524" layer="21"/>
+<wire x1="18.542" y1="8.001" x2="-18.542" y2="8.001" width="0.1524" layer="21"/>
+<pad name="1" x="-16.256" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="16.256" y="0" drill="1.1938" shape="octagon"/>
+<text x="-18.3642" y="8.3312" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-10.8458" y="-2.8702" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C325-182X374">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 32.5 mm, outline 18.2 x 37.4 mm</description>
+<wire x1="-14.2748" y1="0" x2="-12.7" y2="0" width="0.1524" layer="21"/>
+<wire x1="-12.7" y1="1.905" x2="-12.7" y2="0" width="0.4064" layer="21"/>
+<wire x1="-11.811" y1="1.905" x2="-11.811" y2="0" width="0.4064" layer="21"/>
+<wire x1="-11.811" y1="0" x2="14.2748" y2="0" width="0.1524" layer="21"/>
+<wire x1="-11.811" y1="0" x2="-11.811" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-12.7" y1="0" x2="-12.7" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="18.542" y1="9.017" x2="18.542" y2="-9.017" width="0.1524" layer="21"/>
+<wire x1="-18.542" y1="9.017" x2="-18.542" y2="-9.017" width="0.1524" layer="21"/>
+<wire x1="-18.542" y1="-9.017" x2="18.542" y2="-9.017" width="0.1524" layer="21"/>
+<wire x1="18.542" y1="9.017" x2="-18.542" y2="9.017" width="0.1524" layer="21"/>
+<pad name="1" x="-16.256" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="16.256" y="0" drill="1.1938" shape="octagon"/>
+<text x="-18.3642" y="9.3472" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-10.8458" y="-2.8702" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C375-192X418">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 37.5 mm, outline 19.2 x 41.8 mm</description>
+<wire x1="-20.32" y1="8.509" x2="20.32" y2="8.509" width="0.1524" layer="21"/>
+<wire x1="20.828" y1="8.001" x2="20.828" y2="-8.001" width="0.1524" layer="21"/>
+<wire x1="20.32" y1="-8.509" x2="-20.32" y2="-8.509" width="0.1524" layer="21"/>
+<wire x1="-20.828" y1="-8.001" x2="-20.828" y2="8.001" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="20.32" y1="8.509" x2="20.828" y2="8.001" width="0.1524" layer="21" curve="-90"/>
+<wire x1="20.32" y1="-8.509" x2="20.828" y2="-8.001" width="0.1524" layer="21" curve="90"/>
+<wire x1="-20.828" y1="-8.001" x2="-20.32" y2="-8.509" width="0.1524" layer="21" curve="90"/>
+<wire x1="-20.828" y1="8.001" x2="-20.32" y2="8.509" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-16.002" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="16.002" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-18.796" y="0" drill="1.3208" shape="octagon"/>
+<pad name="2" x="18.796" y="0" drill="1.3208" shape="octagon"/>
+<text x="-20.447" y="8.89" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C375-203X418">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 37.5 mm, outline 20.3 x 41.8 mm</description>
+<wire x1="-20.32" y1="10.16" x2="20.32" y2="10.16" width="0.1524" layer="21"/>
+<wire x1="20.828" y1="9.652" x2="20.828" y2="-9.652" width="0.1524" layer="21"/>
+<wire x1="20.32" y1="-10.16" x2="-20.32" y2="-10.16" width="0.1524" layer="21"/>
+<wire x1="-20.828" y1="-9.652" x2="-20.828" y2="9.652" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="20.32" y1="10.16" x2="20.828" y2="9.652" width="0.1524" layer="21" curve="-90"/>
+<wire x1="20.32" y1="-10.16" x2="20.828" y2="-9.652" width="0.1524" layer="21" curve="90"/>
+<wire x1="-20.828" y1="-9.652" x2="-20.32" y2="-10.16" width="0.1524" layer="21" curve="90"/>
+<wire x1="-20.828" y1="9.652" x2="-20.32" y2="10.16" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-16.002" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="16.002" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-18.796" y="0" drill="1.3208" shape="octagon"/>
+<pad name="2" x="18.796" y="0" drill="1.3208" shape="octagon"/>
+<text x="-20.32" y="10.541" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C050-035X075">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 5 mm, outline 3.5 x 7.5 mm</description>
+<wire x1="-0.3048" y1="0.635" x2="-0.3048" y2="0" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-0.3048" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="-0.3048" y1="0" x2="-1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="0.3302" y1="0.635" x2="0.3302" y2="0" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="0.3302" y2="-0.635" width="0.3048" layer="21"/>
+<wire x1="0.3302" y1="0" x2="1.524" y2="0" width="0.1524" layer="21"/>
+<wire x1="-3.683" y1="1.524" x2="-3.683" y2="-1.524" width="0.1524" layer="21"/>
+<wire x1="-3.429" y1="-1.778" x2="3.429" y2="-1.778" width="0.1524" layer="21"/>
+<wire x1="3.683" y1="-1.524" x2="3.683" y2="1.524" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="1.778" x2="-3.429" y2="1.778" width="0.1524" layer="21"/>
+<wire x1="3.429" y1="1.778" x2="3.683" y2="1.524" width="0.1524" layer="21" curve="-90"/>
+<wire x1="3.429" y1="-1.778" x2="3.683" y2="-1.524" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="-1.524" x2="-3.429" y2="-1.778" width="0.1524" layer="21" curve="90"/>
+<wire x1="-3.683" y1="1.524" x2="-3.429" y2="1.778" width="0.1524" layer="21" curve="-90"/>
+<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
+<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
+<text x="-3.556" y="2.159" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-3.556" y="-3.429" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C375-155X418">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 37.5 mm, outline 15.5 x 41.8 mm</description>
+<wire x1="-20.32" y1="7.62" x2="20.32" y2="7.62" width="0.1524" layer="21"/>
+<wire x1="20.828" y1="7.112" x2="20.828" y2="-7.112" width="0.1524" layer="21"/>
+<wire x1="20.32" y1="-7.62" x2="-20.32" y2="-7.62" width="0.1524" layer="21"/>
+<wire x1="-20.828" y1="-7.112" x2="-20.828" y2="7.112" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="20.32" y1="7.62" x2="20.828" y2="7.112" width="0.1524" layer="21" curve="-90"/>
+<wire x1="20.32" y1="-7.62" x2="20.828" y2="-7.112" width="0.1524" layer="21" curve="90"/>
+<wire x1="-20.828" y1="-7.112" x2="-20.32" y2="-7.62" width="0.1524" layer="21" curve="90"/>
+<wire x1="-20.828" y1="7.112" x2="-20.32" y2="7.62" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-16.002" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="16.002" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-18.796" y="0" drill="1.3208" shape="octagon"/>
+<pad name="2" x="18.796" y="0" drill="1.3208" shape="octagon"/>
+<text x="-20.447" y="8.001" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C075-063X106">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 7.5 mm, outline 6.3 x 10.6 mm</description>
+<wire x1="4.953" y1="3.048" x2="-4.953" y2="3.048" width="0.1524" layer="21"/>
+<wire x1="-5.207" y1="2.794" x2="-5.207" y2="-2.794" width="0.1524" layer="21"/>
+<wire x1="-4.953" y1="-3.048" x2="4.953" y2="-3.048" width="0.1524" layer="21"/>
+<wire x1="5.207" y1="-2.794" x2="5.207" y2="2.794" width="0.1524" layer="21"/>
+<wire x1="4.953" y1="3.048" x2="5.207" y2="2.794" width="0.1524" layer="21" curve="-90"/>
+<wire x1="4.953" y1="-3.048" x2="5.207" y2="-2.794" width="0.1524" layer="21" curve="90"/>
+<wire x1="-5.207" y1="-2.794" x2="-4.953" y2="-3.048" width="0.1524" layer="21" curve="90"/>
+<wire x1="-5.207" y1="2.794" x2="-4.953" y2="3.048" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-1.27" y1="0" x2="2.667" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.667" y1="0" x2="-2.159" y2="0" width="0.1524" layer="21"/>
+<wire x1="-2.159" y1="1.27" x2="-2.159" y2="0" width="0.4064" layer="21"/>
+<wire x1="-2.159" y1="0" x2="-2.159" y2="-1.27" width="0.4064" layer="21"/>
+<wire x1="-1.27" y1="1.27" x2="-1.27" y2="0" width="0.4064" layer="21"/>
+<wire x1="-1.27" y1="0" x2="-1.27" y2="-1.27" width="0.4064" layer="21"/>
+<pad name="1" x="-3.81" y="0" drill="0.9144" shape="octagon"/>
+<pad name="2" x="3.81" y="0" drill="0.9144" shape="octagon"/>
+<text x="-4.826" y="3.429" size="1.27" layer="25" ratio="10">&gt;NAME</text>
+<text x="-0.635" y="-2.54" size="1.27" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C275-154X316">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 27.5 mm, outline 15.4 x 31.6 mm</description>
+<wire x1="-15.24" y1="7.62" x2="15.24" y2="7.62" width="0.1524" layer="21"/>
+<wire x1="15.748" y1="7.112" x2="15.748" y2="-7.112" width="0.1524" layer="21"/>
+<wire x1="15.24" y1="-7.62" x2="-15.24" y2="-7.62" width="0.1524" layer="21"/>
+<wire x1="-15.748" y1="-7.112" x2="-15.748" y2="7.112" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="15.24" y1="7.62" x2="15.748" y2="7.112" width="0.1524" layer="21" curve="-90"/>
+<wire x1="15.24" y1="-7.62" x2="15.748" y2="-7.112" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="-7.112" x2="-15.24" y2="-7.62" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="7.112" x2="-15.24" y2="7.62" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-11.557" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="11.557" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-13.716" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="13.716" y="0" drill="1.1938" shape="octagon"/>
+<text x="-15.24" y="8.001" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C275-173X316">
+<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;
+grid 27.5 mm, outline 17.3 x 31.6 mm</description>
+<wire x1="-15.24" y1="8.509" x2="15.24" y2="8.509" width="0.1524" layer="21"/>
+<wire x1="15.748" y1="8.001" x2="15.748" y2="-8.001" width="0.1524" layer="21"/>
+<wire x1="15.24" y1="-8.509" x2="-15.24" y2="-8.509" width="0.1524" layer="21"/>
+<wire x1="-15.748" y1="-8.001" x2="-15.748" y2="8.001" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="1.905" x2="-6.731" y2="0" width="0.4064" layer="21"/>
+<wire x1="-6.731" y1="0" x2="-6.731" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="1.905" x2="-7.62" y2="0" width="0.4064" layer="21"/>
+<wire x1="-7.62" y1="0" x2="-7.62" y2="-1.905" width="0.4064" layer="21"/>
+<wire x1="15.24" y1="8.509" x2="15.748" y2="8.001" width="0.1524" layer="21" curve="-90"/>
+<wire x1="15.24" y1="-8.509" x2="15.748" y2="-8.001" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="-8.001" x2="-15.24" y2="-8.509" width="0.1524" layer="21" curve="90"/>
+<wire x1="-15.748" y1="8.001" x2="-15.24" y2="8.509" width="0.1524" layer="21" curve="-90"/>
+<wire x1="-11.557" y1="0" x2="-7.62" y2="0" width="0.1524" layer="21"/>
+<wire x1="-6.731" y1="0" x2="11.557" y2="0" width="0.1524" layer="21"/>
+<pad name="1" x="-13.716" y="0" drill="1.1938" shape="octagon"/>
+<pad name="2" x="13.716" y="0" drill="1.1938" shape="octagon"/>
+<text x="-15.24" y="8.89" size="1.778" layer="25" ratio="10">&gt;NAME</text>
+<text x="-5.08" y="-2.54" size="1.778" layer="27" ratio="10">&gt;VALUE</text>
+</package>
+<package name="C0402K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 0204 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 1005</description>
+<wire x1="-0.425" y1="0.2" x2="0.425" y2="0.2" width="0.1016" layer="51"/>
+<wire x1="0.425" y1="-0.2" x2="-0.425" y2="-0.2" width="0.1016" layer="51"/>
+<smd name="1" x="-0.6" y="0" dx="0.925" dy="0.74" layer="1"/>
+<smd name="2" x="0.6" y="0" dx="0.925" dy="0.74" layer="1"/>
+<text x="-0.5" y="0.425" size="1.016" layer="25">&gt;NAME</text>
+<text x="-0.5" y="-1.45" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-0.5" y1="-0.25" x2="-0.225" y2="0.25" layer="51"/>
+<rectangle x1="0.225" y1="-0.25" x2="0.5" y2="0.25" layer="51"/>
+</package>
+<package name="C0603K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 0603 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 1608</description>
+<wire x1="-0.725" y1="0.35" x2="0.725" y2="0.35" width="0.1016" layer="51"/>
+<wire x1="0.725" y1="-0.35" x2="-0.725" y2="-0.35" width="0.1016" layer="51"/>
+<smd name="1" x="-0.875" y="0" dx="1.05" dy="1.08" layer="1"/>
+<smd name="2" x="0.875" y="0" dx="1.05" dy="1.08" layer="1"/>
+<text x="-0.8" y="0.65" size="1.016" layer="25">&gt;NAME</text>
+<text x="-0.8" y="-1.65" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-0.8" y1="-0.4" x2="-0.45" y2="0.4" layer="51"/>
+<rectangle x1="0.45" y1="-0.4" x2="0.8" y2="0.4" layer="51"/>
+</package>
+<package name="C0805K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 0805 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 2012</description>
+<wire x1="-0.925" y1="0.6" x2="0.925" y2="0.6" width="0.1016" layer="51"/>
+<wire x1="0.925" y1="-0.6" x2="-0.925" y2="-0.6" width="0.1016" layer="51"/>
+<smd name="1" x="-1" y="0" dx="1.3" dy="1.6" layer="1"/>
+<smd name="2" x="1" y="0" dx="1.3" dy="1.6" layer="1"/>
+<text x="-1" y="0.875" size="1.016" layer="25">&gt;NAME</text>
+<text x="-1" y="-1.9" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-1" y1="-0.65" x2="-0.5" y2="0.65" layer="51"/>
+<rectangle x1="0.5" y1="-0.65" x2="1" y2="0.65" layer="51"/>
+</package>
+<package name="C1206K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 1206 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 3216</description>
+<wire x1="-1.525" y1="0.75" x2="1.525" y2="0.75" width="0.1016" layer="51"/>
+<wire x1="1.525" y1="-0.75" x2="-1.525" y2="-0.75" width="0.1016" layer="51"/>
+<smd name="1" x="-1.5" y="0" dx="1.5" dy="2" layer="1"/>
+<smd name="2" x="1.5" y="0" dx="1.5" dy="2" layer="1"/>
+<text x="-1.6" y="1.1" size="1.016" layer="25">&gt;NAME</text>
+<text x="-1.6" y="-2.1" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.6" y1="-0.8" x2="-1.1" y2="0.8" layer="51"/>
+<rectangle x1="1.1" y1="-0.8" x2="1.6" y2="0.8" layer="51"/>
+</package>
+<package name="C1210K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 1210 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 3225</description>
+<wire x1="-1.525" y1="1.175" x2="1.525" y2="1.175" width="0.1016" layer="51"/>
+<wire x1="1.525" y1="-1.175" x2="-1.525" y2="-1.175" width="0.1016" layer="51"/>
+<smd name="1" x="-1.5" y="0" dx="1.5" dy="2.9" layer="1"/>
+<smd name="2" x="1.5" y="0" dx="1.5" dy="2.9" layer="1"/>
+<text x="-1.6" y="1.55" size="1.016" layer="25">&gt;NAME</text>
+<text x="-1.6" y="-2.575" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.6" y1="-1.25" x2="-1.1" y2="1.25" layer="51"/>
+<rectangle x1="1.1" y1="-1.25" x2="1.6" y2="1.25" layer="51"/>
+</package>
+<package name="C1812K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 1812 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 4532</description>
+<wire x1="-2.175" y1="1.525" x2="2.175" y2="1.525" width="0.1016" layer="51"/>
+<wire x1="2.175" y1="-1.525" x2="-2.175" y2="-1.525" width="0.1016" layer="51"/>
+<smd name="1" x="-2.05" y="0" dx="1.8" dy="3.7" layer="1"/>
+<smd name="2" x="2.05" y="0" dx="1.8" dy="3.7" layer="1"/>
+<text x="-2.25" y="1.95" size="1.016" layer="25">&gt;NAME</text>
+<text x="-2.25" y="-2.975" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-2.25" y1="-1.6" x2="-1.65" y2="1.6" layer="51"/>
+<rectangle x1="1.65" y1="-1.6" x2="2.25" y2="1.6" layer="51"/>
+</package>
+<package name="C1825K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 1825 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 4564</description>
+<wire x1="-1.525" y1="3.125" x2="1.525" y2="3.125" width="0.1016" layer="51"/>
+<wire x1="1.525" y1="-3.125" x2="-1.525" y2="-3.125" width="0.1016" layer="51"/>
+<smd name="1" x="-1.5" y="0" dx="1.8" dy="6.9" layer="1"/>
+<smd name="2" x="1.5" y="0" dx="1.8" dy="6.9" layer="1"/>
+<text x="-1.6" y="3.55" size="1.016" layer="25">&gt;NAME</text>
+<text x="-1.6" y="-4.625" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-1.6" y1="-3.2" x2="-1.1" y2="3.2" layer="51"/>
+<rectangle x1="1.1" y1="-3.2" x2="1.6" y2="3.2" layer="51"/>
+</package>
+<package name="C2220K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 2220 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 5650</description>
+<wire x1="-2.725" y1="2.425" x2="2.725" y2="2.425" width="0.1016" layer="51"/>
+<wire x1="2.725" y1="-2.425" x2="-2.725" y2="-2.425" width="0.1016" layer="51"/>
+<smd name="1" x="-2.55" y="0" dx="1.85" dy="5.5" layer="1"/>
+<smd name="2" x="2.55" y="0" dx="1.85" dy="5.5" layer="1"/>
+<text x="-2.8" y="2.95" size="1.016" layer="25">&gt;NAME</text>
+<text x="-2.8" y="-3.975" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-2.8" y1="-2.5" x2="-2.2" y2="2.5" layer="51"/>
+<rectangle x1="2.2" y1="-2.5" x2="2.8" y2="2.5" layer="51"/>
+</package>
+<package name="C2225K">
+<description>&lt;b&gt;Ceramic Chip Capacitor KEMET 2225 Reflow solder&lt;/b&gt;&lt;p&gt;
+Metric Code Size 5664</description>
+<wire x1="-2.725" y1="3.075" x2="2.725" y2="3.075" width="0.1016" layer="51"/>
+<wire x1="2.725" y1="-3.075" x2="-2.725" y2="-3.075" width="0.1016" layer="51"/>
+<smd name="1" x="-2.55" y="0" dx="1.85" dy="6.8" layer="1"/>
+<smd name="2" x="2.55" y="0" dx="1.85" dy="6.8" layer="1"/>
+<text x="-2.8" y="3.6" size="1.016" layer="25">&gt;NAME</text>
+<text x="-2.8" y="-4.575" size="1.016" layer="27">&gt;VALUE</text>
+<rectangle x1="-2.8" y1="-3.15" x2="-2.2" y2="3.15" layer="51"/>
+<rectangle x1="2.2" y1="-3.15" x2="2.8" y2="3.15" layer="51"/>
+</package>
+</packages>
+<symbols>
+<symbol name="C-EU">
+<wire x1="0" y1="0" x2="0" y2="-0.508" width="0.1524" layer="94"/>
+<wire x1="0" y1="-2.54" x2="0" y2="-2.032" width="0.1524" layer="94"/>
+<text x="1.524" y="0.381" size="1.778" layer="95">&gt;NAME</text>
+<text x="1.524" y="-4.699" size="1.778" layer="96">&gt;VALUE</text>
+<rectangle x1="-2.032" y1="-2.032" x2="2.032" y2="-1.524" layer="94"/>
+<rectangle x1="-2.032" y1="-1.016" x2="2.032" y2="-0.508" layer="94"/>
+<pin name="1" x="0" y="2.54" visible="off" length="short" direction="pas" swaplevel="1" rot="R270"/>
+<pin name="2" x="0" y="-5.08" visible="off" length="short" direction="pas" swaplevel="1" rot="R90"/>
+</symbol>
+</symbols>
+<devicesets>
+<deviceset name="C-EU" prefix="C" uservalue="yes">
+<description>&lt;B&gt;CAPACITOR&lt;/B&gt;, European symbol</description>
+<gates>
+<gate name="G$1" symbol="C-EU" x="0" y="0"/>
+</gates>
+<devices>
+<device name="C0402" package="C0402">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C0504" package="C0504">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C0603" package="C0603">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C0805" package="C0805">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1005" package="C1005">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1206" package="C1206">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1210" package="C1210">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1310" package="C1310">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1608" package="C1608">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1812" package="C1812">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1825" package="C1825">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C2012" package="C2012">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C3216" package="C3216">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C3225" package="C3225">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C4532" package="C4532">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C4564" package="C4564">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025-024X044" package="C025-024X044">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025-025X050" package="C025-025X050">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025-030X050" package="C025-030X050">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025-040X050" package="C025-040X050">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025-050X050" package="C025-050X050">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025-060X050" package="C025-060X050">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C025_050-024X070" package="C025_050-024X070">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025_050-025X075" package="C025_050-025X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025_050-035X075" package="C025_050-035X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025_050-045X075" package="C025_050-045X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="025_050-055X075" package="C025_050-055X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050-024X044" package="C050-024X044">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050-025X075" package="C050-025X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050-045X075" package="C050-045X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050-030X075" package="C050-030X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050-050X075" package="C050-050X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050-055X075" package="C050-055X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050-075X075" package="C050-075X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050H075X075" package="C050H075X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="075-032X103" package="C075-032X103">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="075-042X103" package="C075-042X103">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="075-052X106" package="C075-052X106">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="102-043X133" package="C102-043X133">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="102-054X133" package="C102-054X133">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="102-064X133" package="C102-064X133">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="102_152-062X184" package="C102_152-062X184">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="150-054X183" package="C150-054X183">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="150-064X183" package="C150-064X183">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="150-072X183" package="C150-072X183">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="150-084X183" package="C150-084X183">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="150-091X182" package="C150-091X182">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="225-062X268" package="C225-062X268">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="225-074X268" package="C225-074X268">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="225-087X268" package="C225-087X268">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="225-108X268" package="C225-108X268">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="225-113X268" package="C225-113X268">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="275-093X316" package="C275-093X316">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="275-113X316" package="C275-113X316">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="275-134X316" package="C275-134X316">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="275-205X316" package="C275-205X316">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="325-137X374" package="C325-137X374">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="325-162X374" package="C325-162X374">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="325-182X374" package="C325-182X374">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="375-192X418" package="C375-192X418">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="375-203X418" package="C375-203X418">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="050-035X075" package="C050-035X075">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="375-155X418" package="C375-155X418">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="075-063X106" package="C075-063X106">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="275-154X316" package="C275-154X316">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="275-173X316" package="C275-173X316">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C0402K" package="C0402K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C0603K" package="C0603K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C0805K" package="C0805K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1206K" package="C1206K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1210K" package="C1210K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1812K" package="C1812K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C1825K" package="C1825K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C2220K" package="C2220K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+<device name="C2225K" package="C2225K">
+<connects>
+<connect gate="G$1" pin="1" pad="1"/>
+<connect gate="G$1" pin="2" pad="2"/>
+</connects>
+<technologies>
+<technology name=""/>
+</technologies>
+</device>
+</devices>
+</deviceset>
+</devicesets>
+</library>
+</libraries>
+<attributes>
+</attributes>
+<variantdefs>
+</variantdefs>
+<classes>
+<class number="0" name="default" width="0" drill="0">
+</class>
+</classes>
+<parts>
+<part name="X1" library="con-chipcard-iso7816" deviceset="CHIPCARD-ISO-7816" device="ISO"/>
+<part name="IC1" library="atmel" deviceset="TINY10" device="S"/>
+<part name="TP1" library="testpad" deviceset="TP" device="TP10SQ"/>
+<part name="TP2" library="testpad" deviceset="TP" device="TP10SQ"/>
+<part name="TP3" library="testpad" deviceset="TP" device="TP10SQ"/>
+<part name="C1" library="resistor" deviceset="C-EU" device="C0805"/>
+<part name="TP4" library="testpad" deviceset="TP" device="TP10SQ">
+<attribute name="TP_SIGNAL_NAME" value=""/>
+</part>
+<part name="TP5" library="testpad" deviceset="TP" device="TP10SQ">
+<attribute name="TP_SIGNAL_NAME" value=""/>
+</part>
+<part name="TP6" library="testpad" deviceset="TP" device="TP10SQ">
+<attribute name="TP_SIGNAL_NAME" value=""/>
+</part>
+<part name="IC2" library="atmel" deviceset="TINY10" device="P"/>
+<part name="C2" library="resistor" deviceset="C-EU" device="C0805"/>
+<part name="TP7" library="testpad" deviceset="TP" device="TP10SQ">
+<attribute name="TP_SIGNAL_NAME" value=""/>
+</part>
+</parts>
+<sheets>
+<sheet>
+<plain>
+</plain>
+<instances>
+<instance part="X1" gate="G$1" x="35.56" y="60.96"/>
+<instance part="IC1" gate="G$1" x="35.56" y="33.02"/>
+<instance part="TP1" gate="G$1" x="68.58" y="27.94" rot="R270"/>
+<instance part="TP2" gate="G$1" x="68.58" y="30.48" rot="R270"/>
+<instance part="TP3" gate="G$1" x="68.58" y="33.02" rot="R270"/>
+<instance part="C1" gate="G$1" x="0" y="30.48" rot="R90"/>
+<instance part="TP4" gate="G$1" x="63.5" y="48.26" rot="R270"/>
+<instance part="TP5" gate="G$1" x="7.62" y="33.02"/>
+<instance part="TP6" gate="G$1" x="7.62" y="25.4" rot="R180"/>
+<instance part="IC2" gate="G$1" x="35.56" y="0"/>
+<instance part="C2" gate="G$1" x="7.62" y="-2.54" rot="R90"/>
+<instance part="TP7" gate="G$1" x="68.58" y="35.56" rot="R270"/>
+</instances>
+<busses>
+</busses>
+<nets>
+<net name="RST" class="0">
+<segment>
+<pinref part="IC1" gate="G$1" pin="(RESET)PB5"/>
+<wire x1="53.34" y1="40.64" x2="55.88" y2="40.64" width="0.1524" layer="91"/>
+<wire x1="55.88" y1="40.64" x2="60.96" y2="40.64" width="0.1524" layer="91"/>
+<wire x1="60.96" y1="40.64" x2="60.96" y2="48.26" width="0.1524" layer="91"/>
+<wire x1="60.96" y1="48.26" x2="7.62" y2="48.26" width="0.1524" layer="91"/>
+<wire x1="7.62" y1="48.26" x2="7.62" y2="60.96" width="0.1524" layer="91"/>
+<pinref part="X1" gate="G$1" pin="RST"/>
+<wire x1="7.62" y1="60.96" x2="22.86" y2="60.96" width="0.1524" layer="91"/>
+<pinref part="TP4" gate="G$1" pin="TP"/>
+<junction x="60.96" y="48.26"/>
+<wire x1="55.88" y1="40.64" x2="55.88" y2="7.62" width="0.1524" layer="91"/>
+<pinref part="IC2" gate="G$1" pin="(RESET)PB5"/>
+<wire x1="55.88" y1="7.62" x2="53.34" y2="7.62" width="0.1524" layer="91"/>
+<junction x="55.88" y="40.64"/>
+</segment>
+</net>
+<net name="CLK" class="0">
+<segment>
+<wire x1="66.04" y1="35.56" x2="66.04" y2="50.8" width="0.1524" layer="91"/>
+<wire x1="66.04" y1="50.8" x2="10.16" y2="50.8" width="0.1524" layer="91"/>
+<wire x1="10.16" y1="50.8" x2="10.16" y2="58.42" width="0.1524" layer="91"/>
+<pinref part="X1" gate="G$1" pin="CLK"/>
+<wire x1="10.16" y1="58.42" x2="22.86" y2="58.42" width="0.1524" layer="91"/>
+<pinref part="IC1" gate="G$1" pin="(XTAL1)PB3"/>
+<wire x1="66.04" y1="35.56" x2="60.96" y2="35.56" width="0.1524" layer="91"/>
+<wire x1="60.96" y1="35.56" x2="53.34" y2="35.56" width="0.1524" layer="91"/>
+<wire x1="60.96" y1="35.56" x2="60.96" y2="2.54" width="0.1524" layer="91"/>
+<pinref part="IC2" gate="G$1" pin="(XTAL1)PB3"/>
+<wire x1="60.96" y1="2.54" x2="53.34" y2="2.54" width="0.1524" layer="91"/>
+<junction x="60.96" y="35.56"/>
+<pinref part="TP7" gate="G$1" pin="TP"/>
+<junction x="66.04" y="35.56"/>
+</segment>
+</net>
+<net name="VCC" class="0">
+<segment>
+<pinref part="X1" gate="G$1" pin="VCC"/>
+<wire x1="22.86" y1="63.5" x2="5.08" y2="63.5" width="0.1524" layer="91"/>
+<wire x1="5.08" y1="63.5" x2="5.08" y2="30.48" width="0.1524" layer="91"/>
+<pinref part="IC1" gate="G$1" pin="VCC"/>
+<wire x1="5.08" y1="30.48" x2="7.62" y2="30.48" width="0.1524" layer="91"/>
+<pinref part="C1" gate="G$1" pin="2"/>
+<junction x="5.08" y="30.48"/>
+<pinref part="TP5" gate="G$1" pin="TP"/>
+<junction x="7.62" y="30.48"/>
+<wire x1="7.62" y1="30.48" x2="12.7" y2="30.48" width="0.1524" layer="91"/>
+<wire x1="12.7" y1="30.48" x2="17.78" y2="30.48" width="0.1524" layer="91"/>
+<wire x1="12.7" y1="30.48" x2="12.7" y2="-2.54" width="0.1524" layer="91"/>
+<pinref part="IC2" gate="G$1" pin="VCC"/>
+<wire x1="12.7" y1="-2.54" x2="17.78" y2="-2.54" width="0.1524" layer="91"/>
+<junction x="12.7" y="30.48"/>
+<pinref part="C2" gate="G$1" pin="2"/>
+<junction x="12.7" y="-2.54"/>
+</segment>
+</net>
+<net name="GND" class="0">
+<segment>
+<pinref part="IC1" gate="G$1" pin="GND"/>
+<wire x1="7.62" y1="27.94" x2="-2.54" y2="27.94" width="0.1524" layer="91"/>
+<wire x1="-2.54" y1="27.94" x2="-2.54" y2="30.48" width="0.1524" layer="91"/>
+<wire x1="-2.54" y1="30.48" x2="-2.54" y2="66.04" width="0.1524" layer="91"/>
+<wire x1="-2.54" y1="66.04" x2="63.5" y2="66.04" width="0.1524" layer="91"/>
+<wire x1="63.5" y1="66.04" x2="63.5" y2="63.5" width="0.1524" layer="91"/>
+<pinref part="X1" gate="G$1" pin="GND"/>
+<wire x1="63.5" y1="63.5" x2="48.26" y2="63.5" width="0.1524" layer="91"/>
+<pinref part="C1" gate="G$1" pin="1"/>
+<junction x="-2.54" y="30.48"/>
+<pinref part="TP6" gate="G$1" pin="TP"/>
+<junction x="7.62" y="27.94"/>
+<wire x1="7.62" y1="27.94" x2="15.24" y2="27.94" width="0.1524" layer="91"/>
+<wire x1="15.24" y1="27.94" x2="17.78" y2="27.94" width="0.1524" layer="91"/>
+<wire x1="15.24" y1="27.94" x2="15.24" y2="-5.08" width="0.1524" layer="91"/>
+<pinref part="IC2" gate="G$1" pin="GND"/>
+<wire x1="15.24" y1="-5.08" x2="17.78" y2="-5.08" width="0.1524" layer="91"/>
+<junction x="15.24" y="27.94"/>
+<pinref part="C2" gate="G$1" pin="1"/>
+<wire x1="5.08" y1="-2.54" x2="2.54" y2="-2.54" width="0.1524" layer="91"/>
+<wire x1="2.54" y1="-2.54" x2="2.54" y2="-5.08" width="0.1524" layer="91"/>
+<wire x1="2.54" y1="-5.08" x2="15.24" y2="-5.08" width="0.1524" layer="91"/>
+<junction x="15.24" y="-5.08"/>
+</segment>
+</net>
+<net name="DAT" class="0">
+<segment>
+<pinref part="X1" gate="G$1" pin="I/O"/>
+<wire x1="71.12" y1="58.42" x2="48.26" y2="58.42" width="0.1524" layer="91"/>
+<wire x1="71.12" y1="58.42" x2="71.12" y2="38.1" width="0.1524" layer="91"/>
+<pinref part="IC1" gate="G$1" pin="(XTAL2)PB4"/>
+<wire x1="71.12" y1="38.1" x2="58.42" y2="38.1" width="0.1524" layer="91"/>
+<wire x1="58.42" y1="38.1" x2="53.34" y2="38.1" width="0.1524" layer="91"/>
+<wire x1="58.42" y1="38.1" x2="58.42" y2="5.08" width="0.1524" layer="91"/>
+<pinref part="IC2" gate="G$1" pin="(XTAL2)PB4"/>
+<wire x1="58.42" y1="5.08" x2="53.34" y2="5.08" width="0.1524" layer="91"/>
+<junction x="58.42" y="38.1"/>
+</segment>
+</net>
+<net name="PB0" class="0">
+<segment>
+<pinref part="IC1" gate="G$1" pin="(AIN0)PB0"/>
+<pinref part="TP1" gate="G$1" pin="TP"/>
+<wire x1="66.04" y1="27.94" x2="53.34" y2="27.94" width="0.1524" layer="91"/>
+</segment>
+</net>
+<net name="PB1" class="0">
+<segment>
+<pinref part="IC1" gate="G$1" pin="(AIN1)PB1"/>
+<pinref part="TP2" gate="G$1" pin="TP"/>
+<wire x1="66.04" y1="30.48" x2="53.34" y2="30.48" width="0.1524" layer="91"/>
+</segment>
+</net>
+<net name="PB2" class="0">
+<segment>
+<pinref part="IC1" gate="G$1" pin="(T0)PB2"/>
+<pinref part="TP3" gate="G$1" pin="TP"/>
+<wire x1="66.04" y1="33.02" x2="53.34" y2="33.02" width="0.1524" layer="91"/>
+</segment>
+</net>
+</nets>
+</sheet>
+</sheets>
+</schematic>
+</drawing>
+</eagle>
diff --git a/src/Makefile.am b/src/Makefile.am
index 94c3f6c..40271e5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,7 +52,8 @@ SUBDIRS += \
eurosignal \
tv \
radio \
- zeitansage
+ zeitansage \
+ sim
if HAVE_SDR
if HAVE_FUSE
diff --git a/src/amps/amps.c b/src/amps/amps.c
index 39435b5..969a9af 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -494,7 +494,7 @@ static amps_t *search_pc(void)
}
/* Create transceiver instance and link to a list. */
-int amps_create(const char *kanal, enum amps_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, amps_si *si, uint16_t sid, uint8_t sat, int polarity, int tolerant, int loopback)
+int amps_create(const char *kanal, enum amps_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, amps_si *si, uint16_t sid, uint8_t sat, int polarity, int tolerant, int loopback)
{
sender_t *sender;
amps_t *amps;
@@ -565,7 +565,7 @@ int amps_create(const char *kanal, enum amps_chan_type chan_type, const char *au
PDEBUG(DAMPS, DEBUG_DEBUG, "Creating 'AMPS' instance for channel = %s of band %s (sample rate %d).\n", kanal, band, samplerate);
/* init general part of transceiver */
- rc = sender_create(&amps->sender, kanal, amps_channel2freq(atoi(kanal), 0), amps_channel2freq(atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
+ rc = sender_create(&amps->sender, kanal, amps_channel2freq(atoi(kanal), 0), amps_channel2freq(atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, tx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DAMPS, DEBUG_ERROR, "Failed to init transceiver process!\n");
goto error;
diff --git a/src/amps/amps.h b/src/amps/amps.h
index f04b3d3..c080e0d 100644
--- a/src/amps/amps.h
+++ b/src/amps/amps.h
@@ -174,7 +174,7 @@ const char *amps_min12number(uint32_t min1);
void amps_number2min(const char *number, uint32_t *min1, uint16_t *min2);
const char *amps_min2number(uint32_t min1, uint16_t min2);
const char *amps_scm(uint8_t scm);
-int amps_create(const char *kanal, enum amps_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, amps_si *si, uint16_t sid, uint8_t sat, int polarity, int tolerant, int loopback);
+int amps_create(const char *kanal, enum amps_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, amps_si *si, uint16_t sid, uint8_t sat, int polarity, int tolerant, int loopback);
void amps_destroy(sender_t *sender);
void amps_go_idle(amps_t *amps);
void amps_rx_signaling_tone(amps_t *amps, int tone, double quality);
diff --git a/src/amps/amps_tacs_main.c b/src/amps/amps_tacs_main.c
index 7edb214..5978482 100644
--- a/src/amps/amps_tacs_main.c
+++ b/src/amps/amps_tacs_main.c
@@ -264,7 +264,7 @@ int main_amps_tacs(int argc, char *argv[])
}
if (!num_kanal) {
- printf("No channel (\"Kanal\") is specified, I suggest channel %d.\n\n", (!tacs) ? 334 : 323);
+ printf("No channel (\"Kanal\") is specified, I suggest channel %d.\n\n", (!tacs) ? 333 : 323);
print_help(argv[0]);
return 0;
}
@@ -381,7 +381,7 @@ int main_amps_tacs(int argc, char *argv[])
amps_si si;
init_sysinfo(&si, ms_power, ms_power, dtx, dcc, sid >> 1, regh, regr, pureg, pdreg, locaid, regincr, bis);
- rc = amps_create(kanal[i], chan_type[i], audiodev[i], use_sdr, samplerate, rx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, &si, sid, scc, polarity, tolerant, loopback);
+ rc = amps_create(kanal[i], chan_type[i], audiodev[i], use_sdr, samplerate, rx_gain, tx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, &si, sid, scc, polarity, tolerant, loopback);
if (rc < 0) {
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index 0aac909..fc9fc52 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -186,7 +186,7 @@ static void anetz_timeout(struct timer *timer);
static void anetz_go_idle(anetz_t *anetz);
/* Create transceiver instance and link to a list. */
-int anetz_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double page_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *operator)
+int anetz_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, double page_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *operator)
{
anetz_t *anetz;
int rc;
@@ -207,7 +207,7 @@ int anetz_create(const char *kanal, const char *audiodev, int use_sdr, int sampl
PDEBUG(DANETZ, DEBUG_DEBUG, "Creating 'A-Netz' instance for 'Kanal' = %s (sample rate %d).\n", kanal, samplerate);
/* init general part of transceiver */
- rc = sender_create(&anetz->sender, kanal, anetz_kanal2freq(atoi(kanal), 0), anetz_kanal2freq(atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
+ rc = sender_create(&anetz->sender, kanal, anetz_kanal2freq(atoi(kanal), 0), anetz_kanal2freq(atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, tx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DANETZ, DEBUG_ERROR, "Failed to init 'Sender' processing!\n");
goto error;
diff --git a/src/anetz/anetz.h b/src/anetz/anetz.h
index 1278315..30dc763 100644
--- a/src/anetz/anetz.h
+++ b/src/anetz/anetz.h
@@ -54,7 +54,7 @@ typedef struct anetz {
double anetz_kanal2freq(int kanal, int unterband);
int anetz_init(void);
-int anetz_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double page_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *operator);
+int anetz_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, double page_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *operator);
void anetz_destroy(sender_t *sender);
void anetz_loss_indication(anetz_t *anetz, double loss_time);
void anetz_receive_tone(anetz_t *anetz, int bit);
diff --git a/src/anetz/main.c b/src/anetz/main.c
index 4de9435..855aef4 100644
--- a/src/anetz/main.c
+++ b/src/anetz/main.c
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
/* create transceiver instance */
for (i = 0; i < num_kanal; i++) {
- rc = anetz_create(kanal[i], audiodev[i], use_sdr, samplerate, rx_gain, page_gain, page_sequence, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, squelch_db, operator);
+ rc = anetz_create(kanal[i], audiodev[i], use_sdr, samplerate, rx_gain, tx_gain, page_gain, page_sequence, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, squelch_db, operator);
if (rc < 0) {
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;
diff --git a/src/bnetz/bnetz.c b/src/bnetz/bnetz.c
index 86229ea..1ea7002 100644
--- a/src/bnetz/bnetz.c
+++ b/src/bnetz/bnetz.c
@@ -157,7 +157,7 @@ static void bnetz_timeout(struct timer *timer);
static void bnetz_go_idle(bnetz_t *bnetz);
/* Create transceiver instance and link to a list. */
-int bnetz_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int gfs, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *paging, int metering)
+int bnetz_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int gfs, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *paging, int metering)
{
bnetz_t *bnetz;
enum paging_signal paging_signal = PAGING_SIGNAL_NONE;
@@ -223,7 +223,7 @@ error_paging:
PDEBUG(DBNETZ, DEBUG_DEBUG, "Creating 'B-Netz' instance for 'Kanal' = %s 'Gruppenfreisignal' = %d (sample rate %d).\n", kanal, gfs, samplerate);
/* init general part of transceiver */
- rc = sender_create(&bnetz->sender, kanal, bnetz_kanal2freq(atoi(kanal), 0), bnetz_kanal2freq(atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, paging_signal);
+ rc = sender_create(&bnetz->sender, kanal, bnetz_kanal2freq(atoi(kanal), 0), bnetz_kanal2freq(atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, tx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, paging_signal);
if (rc < 0) {
PDEBUG(DBNETZ, DEBUG_ERROR, "Failed to init transceiver process!\n");
goto error;
diff --git a/src/bnetz/bnetz.h b/src/bnetz/bnetz.h
index 38aa078..70154c4 100644
--- a/src/bnetz/bnetz.h
+++ b/src/bnetz/bnetz.h
@@ -113,7 +113,7 @@ typedef struct bnetz {
double bnetz_kanal2freq(int kanal, int unterband);
int bnetz_init(void);
-int bnetz_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int gfs, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *paging, int metering);
+int bnetz_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int gfs, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *paging, int metering);
void bnetz_destroy(sender_t *sender);
void bnetz_loss_indication(bnetz_t *bnetz, double loss_time);
void bnetz_receive_tone(bnetz_t *bnetz, int bit);
diff --git a/src/bnetz/main.c b/src/bnetz/main.c
index b78352b..383a323 100644
--- a/src/bnetz/main.c
+++ b/src/bnetz/main.c
@@ -185,7 +185,7 @@ int main(int argc, char *argv[])
/* create transceiver instance */
for (i = 0; i < num_kanal; i++) {
- rc = bnetz_create(kanal[i], audiodev[i], use_sdr, samplerate, rx_gain, gfs, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, squelch_db, paging, metering);
+ rc = bnetz_create(kanal[i], audiodev[i], use_sdr, samplerate, rx_gain, tx_gain, gfs, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, squelch_db, paging, metering);
if (rc < 0) {
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;
diff --git a/src/cnetz/cnetz.c b/src/cnetz/cnetz.c
index df0968b..97c8795 100644
--- a/src/cnetz/cnetz.c
+++ b/src/cnetz/cnetz.c
@@ -126,7 +126,7 @@
* The encoder generates a precise clocked signal using correction value given
* by command line. For multichannel, the second sound card's channel (slave) is
* synced to the first one (master), if calculation of signal phase might drift
- * due to routing errors.
+ * due to rounding errors.
*
* The decoder is synced to the phone, whenever it receives a valid frame.
*
@@ -267,7 +267,7 @@ int cnetz_init(void)
}
/* Create transceiver instance and link to a list. */
-int cnetz_create(const char *kanal, enum cnetz_chan_type chan_type, const char *audiodev, int use_sdr, enum demod_type demod, int samplerate, double rx_gain, int challenge_valid, uint64_t challenge, int response_valid, uint64_t response, int warteschlange, int metering, double speech_deviation, int ms_power, int measure_speed, double clock_speed[2], int polarity, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback)
+int cnetz_create(const char *kanal, enum cnetz_chan_type chan_type, const char *audiodev, int use_sdr, enum demod_type demod, int samplerate, double rx_gain, double tx_gain, int challenge_valid, uint64_t challenge, int response_valid, uint64_t response, int warteschlange, int metering, double speech_deviation, int ms_power, int measure_speed, double clock_speed[2], int polarity, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback)
{
sender_t *sender;
cnetz_t *cnetz;
@@ -323,7 +323,7 @@ int cnetz_create(const char *kanal, enum cnetz_chan_type chan_type, const char *
/* init general part of transceiver */
/* do not enable emphasis, since it is done by cnetz code, not by common sender code */
- rc = sender_create(&cnetz->sender, kanal, cnetz_kanal2freq(atoi(kanal), 0), cnetz_kanal2freq(atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
+ rc = sender_create(&cnetz->sender, kanal, cnetz_kanal2freq(atoi(kanal), 0), cnetz_kanal2freq(atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, tx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DCNETZ, DEBUG_ERROR, "Failed to init transceiver process!\n");
goto error;
@@ -377,21 +377,23 @@ int cnetz_create(const char *kanal, enum cnetz_chan_type chan_type, const char *
goto error;
/* go into idle state */
- cnetz_set_dsp_mode(cnetz, DSP_MODE_OGK);
- cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_OGK, 0);
+ if (chan_type == CHAN_TYPE_OGK || chan_type == CHAN_TYPE_OGK_SPK)
+ cnetz_set_dsp_mode(cnetz, DSP_MODE_OGK);
+ else
+ cnetz_set_dsp_mode(cnetz, DSP_MODE_OFF);
cnetz_go_idle(cnetz);
#ifdef DEBUG_SPK
transaction_t *trans = create_transaction(cnetz, TRANS_DS, 2, 2, 22002, -1, -1);
trans->mo_call = 1;
- cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_SPK_K, 2);
+ cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_SPK_K, (cnetz->sched_ts + 2) & 31);
#else
/* create transaction for speech channel loopback */
if (loopback && chan_type == CHAN_TYPE_SPK) {
transaction_t *trans = create_transaction(cnetz, TRANS_VHQ_K, 2, 2, 22002, -1, -1);
trans->mo_call = 1;
cnetz_set_dsp_mode(cnetz, DSP_MODE_SPK_K);
- cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_SPK_K, 0);
+ cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_SPK_K, (cnetz->sched_ts + 1) & 31);
}
#endif
@@ -509,10 +511,11 @@ void cnetz_go_idle(cnetz_t *cnetz)
/* set scheduler to OgK or turn off SpK */
if (cnetz->dsp_mode == DSP_MODE_SPK_K || cnetz->dsp_mode == DSP_MODE_SPK_V) {
- /* go idle after next frame/slot */
- cnetz_set_sched_dsp_mode(cnetz, (atoi(cnetz->sender.kanal) == CNETZ_OGK_KANAL) ? DSP_MODE_OGK : DSP_MODE_OFF, 1);
+ /* switch next frame after distributed signaling boundary (mutliple of 8 slots) */
+ cnetz_set_sched_dsp_mode(cnetz, (atoi(cnetz->sender.kanal) == CNETZ_OGK_KANAL) ? DSP_MODE_OGK : DSP_MODE_OFF, (cnetz->sched_ts + 8) & 24);
} else {
- cnetz_set_sched_dsp_mode(cnetz, (atoi(cnetz->sender.kanal) == CNETZ_OGK_KANAL) ? DSP_MODE_OGK : DSP_MODE_OFF, 0);
+ /* switch next frame */
+ cnetz_set_sched_dsp_mode(cnetz, (atoi(cnetz->sender.kanal) == CNETZ_OGK_KANAL) ? DSP_MODE_OGK : DSP_MODE_OFF, (cnetz->sched_ts + 1) & 31);
cnetz_set_dsp_mode(cnetz, (atoi(cnetz->sender.kanal) == CNETZ_OGK_KANAL) ? DSP_MODE_OGK : DSP_MODE_OFF);
}
@@ -533,7 +536,7 @@ static void cnetz_release(transaction_t *trans, uint8_t cause)
trans_new_state(trans, (trans->cnetz->dsp_mode == DSP_MODE_OGK) ? TRANS_VA : TRANS_AF);
trans->repeat = 0;
trans->release_cause = cause;
- trans->cnetz->sched_switch_mode = 0;
+ trans->cnetz->sched_dsp_mode_ts = -1;
timer_stop(&trans->timer);
}
@@ -1068,7 +1071,7 @@ vak:
/* change state to busy */
cnetz_new_state(spk, CNETZ_BUSY);
/* schedule switching two slots ahead */
- cnetz_set_sched_dsp_mode(spk, DSP_MODE_SPK_K, 2);
+ cnetz_set_sched_dsp_mode(spk, DSP_MODE_SPK_K, (cnetz->sched_ts + 2) & 31);
/* relink */
unlink_transaction(trans);
link_transaction(trans, spk);
@@ -1166,7 +1169,7 @@ void cnetz_receive_telegramm_ogk(cnetz_t *cnetz, telegramm_t *telegramm, int blo
else
PDEBUG_CHAN(DCNETZ, DEBUG_INFO, "Received Attachment 'Einbuchen' message from Subscriber '%s' with %s card's security code %d\n", rufnummer, (telegramm->chipkarten_futelg_bit) ? "chip":"magnet", telegramm->sicherungs_code);
if (telegramm->erweitertes_frequenzbandbit)
- PDEBUG(DCNETZ, DEBUG_INFO, " -> Phone support extended frequency band\n");
+ PDEBUG(DCNETZ, DEBUG_INFO, " -> Phone supports extended frequency band\n");
if (cnetz->state != CNETZ_IDLE) {
PDEBUG(DCNETZ, DEBUG_NOTICE, "Ignoring Attachment from subscriber '%s', because we are busy becoming SpK.\n", rufnummer);
break;
@@ -1187,7 +1190,7 @@ void cnetz_receive_telegramm_ogk(cnetz_t *cnetz, telegramm_t *telegramm, int blo
else
PDEBUG_CHAN(DCNETZ, DEBUG_INFO, "Received Roaming 'Umbuchen' message from Subscriber '%s' with %s card's security code %d\n", rufnummer, (telegramm->chipkarten_futelg_bit) ? "chip":"magnet", telegramm->sicherungs_code);
if (telegramm->erweitertes_frequenzbandbit)
- PDEBUG(DCNETZ, DEBUG_INFO, " -> Phone support extended frequency band\n");
+ PDEBUG(DCNETZ, DEBUG_INFO, " -> Phone supports extended frequency band\n");
if (cnetz->state != CNETZ_IDLE) {
PDEBUG(DCNETZ, DEBUG_NOTICE, "Ignoring Roaming from subscriber '%s', because we are busy becoming SpK.\n", rufnummer);
break;
@@ -1384,7 +1387,7 @@ no_auth:
/* next sub frame */
trans_new_state(trans, TRANS_VHQ_V);
trans->repeat = 0;
- cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_SPK_V, 1);
+ cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_SPK_V, (cnetz->sched_ts + 1) & 31);
#ifndef DEBUG_SPK
timer_start(&trans->timer, 0.075 + 0.6 * F_VHQ); /* one slot + F_VHQ frames */
#endif
@@ -1401,7 +1404,7 @@ no_auth:
/* next sub frame */
trans_new_state(trans, TRANS_VHQ_V);
trans->repeat = 0;
- cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_SPK_V, 1);
+ cnetz_set_sched_dsp_mode(cnetz, DSP_MODE_SPK_V, (cnetz->sched_ts + 1) & 31);
timer_start(&trans->timer, 0.075 + 0.6 * F_VHQ); /* one slot + F_VHQ frames */
}
break;
diff --git a/src/cnetz/cnetz.h b/src/cnetz/cnetz.h
index 88e621f..cb2d195 100644
--- a/src/cnetz/cnetz.h
+++ b/src/cnetz/cnetz.h
@@ -94,8 +94,8 @@ struct cnetz {
int sched_ts; /* current time slot */
int sched_last_ts; /* last timeslot we transmitted, to sync time of the receiver */
int sched_r_m; /* Rufblock (0) / Meldeblock (1) */
- int sched_switch_mode; /* counts slots until mode is switched */
- enum dsp_mode sched_dsp_mode; /* what mode shall be switched to */
+ enum dsp_mode sched_dsp_mode; /* what mode shall be switched to */
+ int sched_dsp_mode_ts; /* time slot when to switch mode (-1 = don't switch) */
/* dsp states */
enum dsp_mode dsp_mode; /* current mode: audio, "Telegramm", .... */
@@ -139,7 +139,7 @@ int cnetz_channel_by_short_name(const char *short_name);
const char *chan_type_short_name(enum cnetz_chan_type chan_type);
const char *chan_type_long_name(enum cnetz_chan_type chan_type);
int cnetz_init(void);
-int cnetz_create(const char *kanal, enum cnetz_chan_type chan_type, const char *audiodev, int use_sdr, enum demod_type demod, int samplerate, double rx_gain, int challenge_valid, uint64_t challenge, int response_valid, uint64_t response, int warteschlange, int metering, double speech_deviation, int ms_power, int measure_speed, double clock_speed[2], int polarity, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback);
+int cnetz_create(const char *kanal, enum cnetz_chan_type chan_type, const char *audiodev, int use_sdr, enum demod_type demod, int samplerate, double rx_gain, double tx_gain, int challenge_valid, uint64_t challenge, int response_valid, uint64_t response, int warteschlange, int metering, double speech_deviation, int ms_power, int measure_speed, double clock_speed[2], int polarity, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback);
void cnetz_destroy(sender_t *sender);
void cnetz_go_idle(cnetz_t *cnetz);
void cnetz_sync_frame(cnetz_t *cnetz, double sync, int ts);
diff --git a/src/cnetz/dsp.c b/src/cnetz/dsp.c
index 91f967c..1c03b6d 100644
--- a/src/cnetz/dsp.c
+++ b/src/cnetz/dsp.c
@@ -54,6 +54,27 @@ scrambler_t scrambler_test_scrambler1;
scrambler_t scrambler_test_scrambler2;
#endif
+const char *cnetz_dsp_mode_name(enum dsp_mode mode)
+{
+ static char invalid[16];
+
+ switch (mode) {
+ case DSP_SCHED_NONE:
+ return "SCHED_NONE";
+ case DSP_MODE_OFF:
+ return "OFF";
+ case DSP_MODE_OGK:
+ return "OGK";
+ case DSP_MODE_SPK_K:
+ return "SPK_K";
+ case DSP_MODE_SPK_V:
+ return "SPK_V";
+ }
+
+ sprintf(invalid, "invalid(%d)", mode);
+ return invalid;
+}
+
static sample_t ramp_up[256], ramp_down[256];
void dsp_init(void)
@@ -97,20 +118,20 @@ int dsp_init_sender(cnetz_t *cnetz, int measure_speed, double clock_speed[2], en
}
if (clock_speed[0] > 1000 || clock_speed[0] < -1000 || clock_speed[1] > 1000 || clock_speed[1] < -1000) {
- PDEBUG(DDSP, DEBUG_ERROR, "Clock speed %.1f,%.1f ppm out of range! Plese use range between +-1000 ppm!\n", clock_speed[0], clock_speed[1]);
+ PDEBUG_CHAN(DDSP, DEBUG_ERROR, "Clock speed %.1f,%.1f ppm out of range! Plese use range between +-1000 ppm!\n", clock_speed[0], clock_speed[1]);
return -EINVAL;
}
- PDEBUG(DDSP, DEBUG_INFO, "Using clock speed of %.1f ppm (RX) and %.1f ppm (TX) to correct sound card's clock.\n", clock_speed[0], clock_speed[1]);
+ PDEBUG_CHAN(DDSP, DEBUG_INFO, "Using clock speed of %.1f ppm (RX) and %.1f ppm (TX) to correct sound card's clock.\n", clock_speed[0], clock_speed[1]);
cnetz->fsk_bitduration = (double)cnetz->sender.samplerate / ((double)BITRATE / (1.0 + clock_speed[1] / 1000000.0));
cnetz->fsk_tx_bitstep = 1.0 / cnetz->fsk_bitduration;
- PDEBUG(DDSP, DEBUG_DEBUG, "Use %.4f samples for one bit duration @ %d.\n", cnetz->fsk_bitduration, cnetz->sender.samplerate);
+ PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Use %.4f samples for one bit duration @ %d.\n", cnetz->fsk_bitduration, cnetz->sender.samplerate);
size = cnetz->fsk_bitduration * (double)BLOCK_BITS * 16.0; /* 16 blocks for distributed frames */
cnetz->fsk_tx_buffer_size = size * 1.1; /* more to compensate clock speed */
cnetz->fsk_tx_buffer = calloc(sizeof(sample_t), cnetz->fsk_tx_buffer_size);
if (!cnetz->fsk_tx_buffer) {
- PDEBUG(DDSP, DEBUG_ERROR, "No memory!\n");
+ PDEBUG_CHAN(DDSP, DEBUG_ERROR, "No memory!\n");
rc = -ENOMEM;
goto error;
}
@@ -125,7 +146,7 @@ int dsp_init_sender(cnetz_t *cnetz, int measure_speed, double clock_speed[2], en
/* create speech buffer */
cnetz->dsp_speech_buffer = calloc(sizeof(sample_t), (int)(cnetz->fsk_bitduration * 70.0)); /* more to compensate clock speed. we just need it to fill 62 bits (60 bits, including pause bits). */
if (!cnetz->dsp_speech_buffer) {
- PDEBUG(DDSP, DEBUG_ERROR, "No memory!\n");
+ PDEBUG_CHAN(DDSP, DEBUG_ERROR, "No memory!\n");
rc = -ENOMEM;
goto error;
}
@@ -159,13 +180,15 @@ int dsp_init_sender(cnetz_t *cnetz, int measure_speed, double clock_speed[2], en
#ifdef TEST_SCRAMBLE
rc = jitter_create(&scrambler_test_jb, cnetz->sender.samplerate / 5);
if (rc < 0) {
- PDEBUG(DDSP, DEBUG_ERROR, "Failed to init jitter buffer for scrambler test!\n");
+ PDEBUG_CHAN(DDSP, DEBUG_ERROR, "Failed to init jitter buffer for scrambler test!\n");
exit(0);
}
scrambler_setup(&scrambler_test_scrambler1, cnetz->sender.samplerate);
scrambler_setup(&scrambler_test_scrambler2, cnetz->sender.samplerate);
#endif
+ cnetz->sched_dsp_mode_ts = -1;
+
return 0;
error:
@@ -636,10 +659,11 @@ again:
}
/* switch to speech channel */
- if (cnetz->sched_switch_mode && cnetz->sched_r_m == 0) {
- if (--cnetz->sched_switch_mode == 0) {
+ if (cnetz->sched_dsp_mode_ts >= 0 && cnetz->sched_r_m == 0) {
+ if (cnetz->sched_dsp_mode_ts == cnetz->sched_ts) {
/* OgK / SpK(K) / SpK(V) */
- PDEBUG_CHAN(DDSP, DEBUG_INFO, "Switching channel (mode)\n");
+ PDEBUG_CHAN(DDSP, DEBUG_INFO, "Now switchting channel mode to %s at timeslot %d\n", cnetz_dsp_mode_name(cnetz->sched_dsp_mode), cnetz->sched_dsp_mode_ts);
+ cnetz->sched_dsp_mode_ts = -1;
cnetz_set_dsp_mode(cnetz, cnetz->sched_dsp_mode);
}
}
@@ -653,19 +677,19 @@ again:
if (cnetz->auto_polarity)
cnetz->negative_polarity = (cnetz->sched_ts & 7) >> 2;
/* send on timeslots depending on the polarity:
- * positive polarity: 0, 8, 16, 24
- * negative polarity: 4, 12, 20, 28
+ * positive polarity: ts, ts+8, ts+16, ts+24
+ * negative polarity: ts+4, ts+12, ts+20, ts+28
*/
- if (((cnetz->sched_ts & 7) == 0 && cnetz->negative_polarity == 0)
- || ((cnetz->sched_ts & 7) == 4 && cnetz->negative_polarity == 1)) {
+ if (((cnetz->sched_ts & 7) == (si.timeslot & 7) && cnetz->negative_polarity == 0)
+ || ((cnetz->sched_ts & 7) == ((si.timeslot + 4) & 7) && cnetz->negative_polarity == 1)) {
if (cnetz->sched_r_m == 0) {
/* set last time slot, so we know to which time slot the message from mobile station belongs to */
cnetz->sched_last_ts = cnetz->sched_ts;
- PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Transmitting 'Rufblock' at timeslot %d\n", cnetz->sched_ts);
bits = cnetz_encode_telegramm(cnetz);
+ PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Transmitting 'Rufblock' at timeslot %d\n", cnetz->sched_ts);
} else {
- PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Transmitting 'Meldeblock' at timeslot %d\n", cnetz->sched_ts);
bits = cnetz_encode_telegramm(cnetz);
+ PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Transmitting 'Meldeblock' at timeslot %d\n", cnetz->sched_ts);
}
fsk_block_encode(cnetz, bits, 1);
} else {
@@ -673,14 +697,14 @@ again:
}
break;
case DSP_MODE_SPK_K:
- PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Transmitting 'Konzentrierte Signalisierung'\n");
bits = cnetz_encode_telegramm(cnetz);
fsk_block_encode(cnetz, bits, 0);
+ PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Transmitting 'Konzentrierte Signalisierung' at timeslot %d.%d\n", cnetz->sched_ts, cnetz->sched_r_m * 5);
break;
case DSP_MODE_SPK_V:
- PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Transmitting 'Verteilte Signalisierung'\n");
bits = cnetz_encode_telegramm(cnetz);
fsk_distributed_encode(cnetz, bits);
+ PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Transmitting 'Verteilte Signalisierung' starting at timeslot %d\n", cnetz->sched_ts);
break;
case DSP_MODE_OFF:
default:
@@ -843,39 +867,22 @@ void unshrink_speech(cnetz_t *cnetz, sample_t *speech_buffer, int count)
cnetz->sender.rxbuf_pos = pos;
}
-const char *cnetz_dsp_mode_name(enum dsp_mode mode)
-{
- static char invalid[16];
-
- switch (mode) {
- case DSP_SCHED_NONE:
- return "SCHED_NONE";
- case DSP_MODE_OFF:
- return "OFF";
- case DSP_MODE_OGK:
- return "OGK";
- case DSP_MODE_SPK_K:
- return "SPK_K";
- case DSP_MODE_SPK_V:
- return "SPK_V";
- }
-
- sprintf(invalid, "invalid(%d)", mode);
- return invalid;
-}
-
void cnetz_set_dsp_mode(cnetz_t *cnetz, enum dsp_mode mode)
{
- PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "DSP mode %s -> %s\n", cnetz_dsp_mode_name(cnetz->dsp_mode), cnetz_dsp_mode_name(mode));
- cnetz->dsp_mode = mode;
+ if (mode != cnetz->dsp_mode) {
+ PDEBUG_CHAN(DDSP, DEBUG_INFO, "DSP mode %s -> %s\n", cnetz_dsp_mode_name(cnetz->dsp_mode), cnetz_dsp_mode_name(mode));
+ cnetz->dsp_mode = mode;
+ }
/* we must get rid of partly received frame */
fsk_demod_reset(&cnetz->fsk_demod);
}
-void cnetz_set_sched_dsp_mode(cnetz_t *cnetz, enum dsp_mode mode, int frames_ahead)
+void cnetz_set_sched_dsp_mode(cnetz_t *cnetz, enum dsp_mode mode, int timeslot)
{
- PDEBUG_CHAN(DDSP, DEBUG_DEBUG, " Schedule DSP mode %s -> %s in %d frames\n", cnetz_dsp_mode_name(cnetz->dsp_mode), cnetz_dsp_mode_name(mode), frames_ahead);
- cnetz->sched_dsp_mode = mode;
- cnetz->sched_switch_mode = frames_ahead;
+ if (mode != cnetz->dsp_mode) {
+ PDEBUG_CHAN(DDSP, DEBUG_INFO, "Schedule DSP mode %s -> %s at timeslot %d\n", cnetz_dsp_mode_name(cnetz->dsp_mode), cnetz_dsp_mode_name(mode), timeslot);
+ cnetz->sched_dsp_mode = mode;
+ cnetz->sched_dsp_mode_ts = timeslot;
+ }
}
diff --git a/src/cnetz/dsp.h b/src/cnetz/dsp.h
index f5e3506..7af7c94 100644
--- a/src/cnetz/dsp.h
+++ b/src/cnetz/dsp.h
@@ -5,5 +5,5 @@ void dsp_cleanup_sender(cnetz_t *cnetz);
void calc_clock_speed(cnetz_t *cnetz, double samples, int tx, int result);
void unshrink_speech(cnetz_t *cnetz, sample_t *speech_buffer, int count);
void cnetz_set_dsp_mode(cnetz_t *cnetz, enum dsp_mode mode);
-void cnetz_set_sched_dsp_mode(cnetz_t *cnetz, enum dsp_mode mode, int frames_ahead);
+void cnetz_set_sched_dsp_mode(cnetz_t *cnetz, enum dsp_mode mode, int timeslot);
diff --git a/src/cnetz/main.c b/src/cnetz/main.c
index 265e433..74f093a 100644
--- a/src/cnetz/main.c
+++ b/src/cnetz/main.c
@@ -51,6 +51,7 @@ int challenge_valid;
uint64_t challenge;
int response_valid;
uint64_t response;
+uint8_t timeslot = 0;
uint8_t fuz_nat = 1;
uint8_t fuz_fuvst = 4;
uint8_t fuz_rest = 66;
@@ -120,6 +121,11 @@ void print_help(const char *arg0)
printf(" It is unclear what the actual voice deviation is. Please decrease, if\n");
printf(" mobile's microphone is too loud and speaker is too quiet.\n");
printf(" (default = %.0f)\n", speech_deviation);
+ printf(" -S --sysinfo timeslot=<0..31>\n");
+ printf(" Set time slot of OgK broadcast. There are 32 time slots, but every 8th\n");
+ printf(" slot is used. This means if you select time slot 0, also slots 8, 16\n");
+ printf(" and 24 will be used. If you select slot 14, also slots 6, 22 and 30\n");
+ printf(" will be used. (default = %d)\n", timeslot);
printf(" -S --sysinfo fuz-nat=<nat>\n");
printf(" Set country ID of base station. All IDs were used inside Germany only.\n");
printf(" (default = %d)\n", fuz_nat);
@@ -139,10 +145,10 @@ void print_help(const char *arg0)
printf(" 2 = Higher priority base station.\n");
printf(" 3 = Highest priority base station.\n");
printf(" Note: Priority has no effect, because there is only one base station.\n");
- printf(" -A --sysinfo authentifikationsbit=auth>\n");
+ printf(" -S --sysinfo auth=<auth>\n");
printf(" Enable authentication flag on the base station. Since we cannot\n");
printf(" authenticate, because we don't know the secret key and the algorithm,\n");
- printf(" we just accept any card. Useful get the vendor IDs of the phone.\n");
+ printf(" we just accept any card. Useful to get the vendor IDs of the phone.\n");
printf(" 0 = Disable. Even chip card phones behave like magnetic card phones.\n");
printf(" 1 = Enable. Chip card phones send their card ID.\n");
printf(" (default = %d)\n", authentifikationsbit);
@@ -341,6 +347,9 @@ static int handle_options(int short_option, int argi, char **argv)
return -EINVAL;
}
p++;
+ if (!strncasecmp(argv[argi], "timeslot=", p - argv[argi])) {
+ timeslot = atoi_limit(p, 0, 31);
+ } else
if (!strncasecmp(argv[argi], "fuz-nat=", p - argv[argi])) {
fuz_nat = atoi_limit(p, 0, 7);
} else
@@ -556,7 +565,7 @@ int main(int argc, char *argv[])
}
if (anzahl_gesperrter_teilnehmergruppen)
printf("Blocked subscriber with number's last 4 bits from 0x%x to 0x%x\n", teilnehmergruppensperre, (teilnehmergruppensperre + anzahl_gesperrter_teilnehmergruppen - 1) & 0xf);
- init_sysinfo(fuz_nat, fuz_fuvst, fuz_rest, kennung_fufst, authentifikationsbit, ws_kennung, fuvst_sperren, grenz_einbuchen, grenz_umschalten, grenz_ausloesen, mittel_umschalten, mittel_ausloesen, genauigkeit, bewertung, entfernung, reduzierung, nachbar_prio, teilnehmergruppensperre, anzahl_gesperrter_teilnehmergruppen);
+ init_sysinfo(timeslot, fuz_nat, fuz_fuvst, fuz_rest, kennung_fufst, authentifikationsbit, ws_kennung, fuvst_sperren, grenz_einbuchen, grenz_umschalten, grenz_ausloesen, mittel_umschalten, mittel_ausloesen, genauigkeit, bewertung, entfernung, reduzierung, nachbar_prio, teilnehmergruppensperre, anzahl_gesperrter_teilnehmergruppen);
dsp_init();
rc = init_telegramm();
if (rc < 0) {
@@ -626,7 +635,7 @@ int main(int argc, char *argv[])
/* create transceiver instance */
for (i = 0; i < num_kanal; i++) {
- rc = cnetz_create(kanal[i], chan_type[i], audiodev[i], use_sdr, demod, samplerate, rx_gain, challenge_valid, challenge, response_valid, response, warteschlange, metering, speech_deviation, ms_power, (i == 0) ? measure_speed : 0, clock_speed, polarity, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback);
+ rc = cnetz_create(kanal[i], chan_type[i], audiodev[i], use_sdr, demod, samplerate, rx_gain, tx_gain, challenge_valid, challenge, response_valid, response, warteschlange, metering, speech_deviation, ms_power, (i == 0) ? measure_speed : 0, clock_speed, polarity, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback);
if (rc < 0) {
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;
diff --git a/src/cnetz/sysinfo.c b/src/cnetz/sysinfo.c
index 0c0802d..02eeae3 100644
--- a/src/cnetz/sysinfo.c
+++ b/src/cnetz/sysinfo.c
@@ -4,10 +4,13 @@
cnetz_si si;
-void init_sysinfo(uint8_t fuz_nat, uint8_t fuz_fuvst, uint8_t fuz_rest, uint8_t kennung_fufst, uint8_t authentifikationsbit, uint8_t ws_kennung, uint8_t vermittlungstechnische_sperren, uint8_t grenz_einbuchen, uint8_t grenz_umschalten, uint8_t grenz_ausloesen, uint8_t mittel_umschalten, uint8_t mittel_ausloesen, uint8_t genauigkeit, uint8_t bewertung, uint8_t entfernung, uint8_t reduzierung, uint8_t nachbar_prio, int8_t teilnehmergruppensperre, uint8_t anzahl_gesperrter_teilnehmergruppen)
+void init_sysinfo(uint8_t timeslot, uint8_t fuz_nat, uint8_t fuz_fuvst, uint8_t fuz_rest, uint8_t kennung_fufst, uint8_t authentifikationsbit, uint8_t ws_kennung, uint8_t vermittlungstechnische_sperren, uint8_t grenz_einbuchen, uint8_t grenz_umschalten, uint8_t grenz_ausloesen, uint8_t mittel_umschalten, uint8_t mittel_ausloesen, uint8_t genauigkeit, uint8_t bewertung, uint8_t entfernung, uint8_t reduzierung, uint8_t nachbar_prio, int8_t teilnehmergruppensperre, uint8_t anzahl_gesperrter_teilnehmergruppen)
{
memset(&si, 0, sizeof(si));
+ /* timeslot to use */
+ si.timeslot = timeslot;
+
/* ID of base station */
si.fuz_nat = fuz_nat;
si.fuz_fuvst = fuz_fuvst;
diff --git a/src/cnetz/sysinfo.h b/src/cnetz/sysinfo.h
index 3e94042..74be9b9 100644
--- a/src/cnetz/sysinfo.h
+++ b/src/cnetz/sysinfo.h
@@ -1,5 +1,6 @@
typedef struct system_information {
+ uint8_t timeslot; /* timeslot to use */
uint8_t fuz_nat; /* national network ID */
uint8_t fuz_fuvst; /* id of switching center */
uint8_t fuz_rest; /* rest of base station id */
@@ -23,5 +24,5 @@ typedef struct system_information {
extern cnetz_si si;
-void init_sysinfo(uint8_t fuz_nat, uint8_t fuz_fuvst, uint8_t fuz_rest, uint8_t kennung_fufst, uint8_t authentifikationsbit, uint8_t ws_kennung, uint8_t vermittlungstechnische_sperren, uint8_t grenz_einbuchen, uint8_t grenz_umschalten, uint8_t grenz_ausloesen, uint8_t mittel_umschalten, uint8_t mittel_ausloesen, uint8_t genauigkeit, uint8_t bewertung, uint8_t entfernung, uint8_t reduzierung, uint8_t nachbar_prio, int8_t teilnehmergruppensperre, uint8_t anzahl_gesperrter_teilnehmergruppen);
+void init_sysinfo(uint8_t timeslot, uint8_t fuz_nat, uint8_t fuz_fuvst, uint8_t fuz_rest, uint8_t kennung_fufst, uint8_t authentifikationsbit, uint8_t ws_kennung, uint8_t vermittlungstechnische_sperren, uint8_t grenz_einbuchen, uint8_t grenz_umschalten, uint8_t grenz_ausloesen, uint8_t mittel_umschalten, uint8_t mittel_ausloesen, uint8_t genauigkeit, uint8_t bewertung, uint8_t entfernung, uint8_t reduzierung, uint8_t nachbar_prio, int8_t teilnehmergruppensperre, uint8_t anzahl_gesperrter_teilnehmergruppen);
diff --git a/src/cnetz/telegramm.c b/src/cnetz/telegramm.c
index 1a21369..e6f8a5d 100644
--- a/src/cnetz/telegramm.c
+++ b/src/cnetz/telegramm.c
@@ -46,7 +46,7 @@ static const char *param_ja[] = {
static const char *param_betriebsart[] = {
"Sprache klar",
"Sprache invertiert",
- "Illegaler Parameter 2",
+ "Datenbetrieb",
"Illegaler Parameter 3",
};
@@ -260,7 +260,7 @@ static struct definition_parameter {
{ 'H',"OgK-Vorschlag", 10, param_frequenz },
{ 'I',"FuZ-Nationalitaet", 3, NULL },
{ 'J',"Sendeleistungsanpassung", 1, param_anpassen },
- { 'K',"Frequenz-Nr.", 11, param_frequenz },
+ { 'K',"Frequenz-Nr.", 0, param_frequenz }, /* length 10 or 11 */
{ 'L',"Art der Signalisierung im OgK", 1, param_signalisierung },
{ 'M',"OgK-Verkehrsanteil", 5, param_verkehrsanteil },
{ 'N',"FuTln-Nationalitaet", 3, NULL },
@@ -274,6 +274,7 @@ static struct definition_parameter {
{ 'V',"Sicherungs-Code", 16, NULL },
{ 'W',"WS-Kennung", 2, param_wskennung },
{ 'X',"Wahlziffer beliebig 16 Ziffern", 64, NULL },
+ { 'Y',"Bahn-MS", 1, param_ja },
{ 'Z',"Zeitschlitz-Nr.", 5, NULL },
{ 'a',"Grenzert fuer Ausloesen", 4, param_ausloesen },
{ 'b',"Chipkarten-FuTelG-Bit", 1, param_chipkarte },
@@ -298,6 +299,7 @@ static struct definition_parameter {
{ 'u',"Grenzwert fuer Umschalten", 4, param_ausloesen },
{ 'v',"Vermittlungtechnische Sperren", 2, param_sperren },
{ 'w',"Erweitertes Frequenzbandbit", 1, NULL },
+ { 'x',"Bahn-BS", 1, param_ja },
{ 'y',"Reduzierungsfaktor", 2, param_reduzierung },
{ '_',"Illegaler Opcode", 64, NULL },
{ 0 ,"", 0, NULL },
@@ -347,12 +349,12 @@ static struct definition_opcode {
{ "------dJ--------eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "VH(K)", BLOCK_K,"Verbindung halten" },
{ "------dJ--------eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "RTAQ(K)", BLOCK_K,"Quittung Rufton anschalten" },
{ "------dJBB------eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "AH(K)", BLOCK_K,"Abhebe-Signal" },
- { "-----wdJBBCt----eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "VH(V)", BLOCK_V,"Verbindung halten" },
+ { "----YwdJBBCt----eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "VH(V)", BLOCK_V,"Verbindung halten" },
{ "------dJ----------------IIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "AT(K)", BLOCK_K,"Ausloesen durch Funktelefonteilnehmer" },
{ "------dJBBC-------------IIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "AT(V)", BLOCK_V,"Ausloesen durch Funktelefonteilnehmer" },
{ "------dJBB------eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "DSQ(K)", BLOCK_K,"Durchschalten Quittung" },
- { "-----wdJBBCt----eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "USAI(V)", BLOCK_V,"Umschaltantrag intern" },
- { "-----wdJBBCt----eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "USAE(V)", BLOCK_V,"Umschaltantrag extern" },
+ { "----YwdJBBCt----eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "USAI(V)", BLOCK_V,"Umschaltantrag intern" },
+ { "----YwdJBBCt----eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "USAE(V)", BLOCK_V,"Umschaltantrag extern" },
{ "------dJBB--------------IIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "USTLN(K)", BLOCK_K,"Umschalten Funktelefonteilnehmer" },
{ "oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo", NULL, "ZFZQ(K)", BLOCK_K,"Zufallszahlquittung" },
{ "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", NULL, "AP(K)", BLOCK_K,"Autorisierungsparameter" },
@@ -366,7 +368,7 @@ static struct definition_opcode {
{ "PPdZZZZZ----------------IIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "UBQ(R)", BLOCK_R,"Umbuchquittung" },
{ "PPdZZZZZ----------------IIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "WSK(R)", BLOCK_R,"Warteschglange kommend" },
{ "PP-MMMMMDDDDEEEE------HHHHHHHHHHFFFFFFFF------------------------", NULL, "MLR(M)", BLOCK_M,"Melde-Leer-Ruf" },
- { "PPdZZZZZffflvvWW------yyIIIAAAAAFFFFFFFFkkgprrrrmmmmnnnnuuuuaaaa", NULL, "LR(R)", BLOCK_R,"Leer-Ruf" },
+ { "PPdZZZZZffflvvWW-----xyyIIIAAAAAFFFFFFFFkkgprrrrmmmmnnnnuuuuaaaa", NULL, "LR(R)", BLOCK_R,"Leer-Ruf" },
{ "PPdZZZZZ----------------IIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "ATQ(R)", BLOCK_R,"Quittung fuer Ausloesen des FuTelG im OgK-Betrieb" },
{ "PPdZZZZZ----------------IIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "SAR(R)", BLOCK_R,"Sperraufruf" },
{ "PP-MMMMMDDDDEEEE------HHHHHHHHHHFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "WAF(M)", BLOCK_M,"Wahlaufforderung" },
@@ -385,7 +387,7 @@ static struct definition_opcode {
{ "PP----dJ------cc--------IIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "AF(V)", BLOCK_V,"Ausloesen durch FuFSt in verteilter Signalisierung" },
{ "PP----dJ--------eeeeeeeeIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "DSB(K)", BLOCK_K,"Durchschaltung" },
{ "PP----dJ-----KKKKKKKKKKKIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "DSBI(V)", BLOCK_V,"Umschaltbefehl intern (neuer SpK in der gleichen FuZ)" },
- { "PP----dJ-----KKKKKKKKKKKIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "USF(K)", BLOCK_K,"Umschalten FuFst" },
+ { "PPuuuudJ-xnnnnKKKKKKKKKKIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "USF(K)", BLOCK_K,"Umschalten FuFst" },
{ "PP----dJ-----KKKKKKKKKKKIIIAAAAAFFFFFFFFNNNUUUUUTTTTTTTTTTTTTTTT", NULL, "USBE(V)", BLOCK_V,"Umschaltbefehl extern (neuer SpK in einer anderen Funkzelle)" },
{ "oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo", NULL, "ZFZ(K)", BLOCK_K,"Zufallszahl" },
{ "________________________________________________________________", NULL, "opcode 61",BLOCK_I,"Illegaler Opcode" },
@@ -422,7 +424,7 @@ int init_telegramm(void)
printf("Message #%d has invalid digit '%c'\n", i, last_bit);
return -1;
}
- if (parameter->bits != count_bits) {
+ if (parameter->bits && parameter->bits != count_bits) {
printf("Message #%d has digit '%c' with %d bits, but parameter has %d bits\n", i, last_bit, count_bits, parameter->bits);
return -1;
}
@@ -718,6 +720,9 @@ static char *assemble_telegramm(const telegramm_t *telegramm, int debug)
abort();
}
break;
+ case 'Y':
+ value = telegramm->bahn_ms;
+ break;
case 'Z':
value = telegramm->zeitschlitz_nr;
break;
@@ -790,6 +795,9 @@ static char *assemble_telegramm(const telegramm_t *telegramm, int debug)
case 'w':
value = telegramm->erweitertes_frequenzbandbit;
break;
+ case 'x':
+ value = telegramm->bahn_bs;
+ break;
case 'y':
value = telegramm->reduzierungsfaktor;
break;
@@ -927,6 +935,9 @@ static void disassemble_telegramm(telegramm_t *telegramm, const char *bits, int
case 'X':
decode_dialstring(telegramm->wahlziffern, value);
break;
+ case 'Y':
+ telegramm->bahn_ms = value;
+ break;
case 'Z':
telegramm->zeitschlitz_nr = value;
break;
@@ -999,6 +1010,9 @@ static void disassemble_telegramm(telegramm_t *telegramm, const char *bits, int
case 'w':
telegramm->erweitertes_frequenzbandbit = value;
break;
+ case 'x':
+ telegramm->bahn_bs = value;
+ break;
case 'y':
telegramm->reduzierungsfaktor = value;
break;
@@ -1485,16 +1499,16 @@ void cnetz_decode_telegramm(cnetz_t *cnetz, const char *bits, double level, doub
return;
}
- disassemble_telegramm(&telegramm, bits, si.authentifikationsbit);
- opcode = telegramm.opcode;
- telegramm.level = level;
- telegramm.sync_time = sync_time;
-
if (bit_errors)
PDEBUG_CHAN(DDSP, DEBUG_INFO, "RX Level: %.0f%% Standard deviation: %.0f%% Sync Time: %.2f (TS %.2f) Bit errors: %d %s\n", fabs(level) / cnetz->fsk_deviation * 100.0, stddev / fabs(level) * 100.0, sync_time, sync_time / 396.0, bit_errors, (level < 0) ? "NEGATIVE (phone's mode)" : "POSITIVE (base station's mode)");
else
PDEBUG_CHAN(DDSP, DEBUG_INFO, "RX Level: %.0f%% Standard deviation: %.0f%% Sync Time: %.2f (TS %.2f) %s\n", fabs(level) / cnetz->fsk_deviation * 100.0, stddev / fabs(level) * 100.0, sync_time, sync_time / 396.0, (level < 0) ? "NEGATIVE (phone's mode)" : "POSITIVE (base station's mode)");
+ disassemble_telegramm(&telegramm, bits, si.authentifikationsbit);
+ opcode = telegramm.opcode;
+ telegramm.level = level;
+ telegramm.sync_time = sync_time;
+
if (cnetz->sender.loopback) {
PDEBUG(DFRAME, DEBUG_NOTICE, "Received Telegramm in loopback test mode (opcode %d = %s)\n", opcode, definition_opcode[opcode].message_name);
cnetz_sync_frame(cnetz, sync_time, -1);
diff --git a/src/cnetz/telegramm.h b/src/cnetz/telegramm.h
index 06758aa..06adda8 100644
--- a/src/cnetz/telegramm.h
+++ b/src/cnetz/telegramm.h
@@ -112,6 +112,8 @@ typedef struct telegramm {
uint8_t erweitertes_frequenzbandbit;
uint8_t reduzierungsfaktor;
uint64_t illegaler_opcode;
+ uint8_t bahn_ms;
+ uint8_t bahn_bs;
} telegramm_t;
int init_telegramm(void);
diff --git a/src/eurosignal/eurosignal.c b/src/eurosignal/eurosignal.c
index 661f6dc..4d35701 100644
--- a/src/eurosignal/eurosignal.c
+++ b/src/eurosignal/eurosignal.c
@@ -240,7 +240,7 @@ void euro_exit(void)
static void call_timeout(struct timer *timer);
/* Create transceiver instance and link to a list. */
-int euro_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int fm, int tx, int rx, int repeat, int degraded, int random, uint32_t scan_from, uint32_t scan_to, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback)
+int euro_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int fm, int tx, int rx, int repeat, int degraded, int random, uint32_t scan_from, uint32_t scan_to, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback)
{
euro_t *euro;
int rc;
@@ -264,7 +264,7 @@ int euro_create(const char *kanal, const char *audiodev, int use_sdr, int sample
PDEBUG(DEURO, DEBUG_DEBUG, "Creating 'Eurosignal' instance for 'Kanal' = %s (sample rate %d).\n", kanal, samplerate);
/* init general part of transceiver */
- rc = sender_create(&euro->sender, kanal, euro_kanal2freq(kanal, fm), euro_kanal2freq(kanal, fm), audiodev, use_sdr, samplerate, rx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
+ rc = sender_create(&euro->sender, kanal, euro_kanal2freq(kanal, fm), euro_kanal2freq(kanal, fm), audiodev, use_sdr, samplerate, rx_gain, tx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DEURO, DEBUG_ERROR, "Failed to init transceiver process!\n");
goto error;
diff --git a/src/eurosignal/eurosignal.h b/src/eurosignal/eurosignal.h
index 2b48677..630a0cc 100644
--- a/src/eurosignal/eurosignal.h
+++ b/src/eurosignal/eurosignal.h
@@ -82,7 +82,7 @@ double euro_kanal2freq(const char *kanal, int fm);
void euro_list_channels(void);
int euro_init(void);
void euro_exit(void);
-int euro_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int fm, int tx, int rx, int repeat, int degraded, int random, uint32_t scan_from, uint32_t scan_to, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback);
+int euro_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int fm, int tx, int rx, int repeat, int degraded, int random, uint32_t scan_from, uint32_t scan_to, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback);
void euro_destroy(sender_t *sender);
void euro_get_id(euro_t *euro, char *id);
void euro_receive_id(euro_t *euro, char *id);
diff --git a/src/eurosignal/main.c b/src/eurosignal/main.c
index 88f63bc..fbc7ebb 100644
--- a/src/eurosignal/main.c
+++ b/src/eurosignal/main.c
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
/* create transceiver instance */
for (i = 0; i < num_kanal; i++) {
- rc = euro_create(kanal[i], audiodev[i], use_sdr, samplerate, rx_gain, fm, tx, rx, repeat, degraded, random_id, scan_from, scan_to, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback);
+ rc = euro_create(kanal[i], audiodev[i], use_sdr, samplerate, rx_gain, tx_gain, fm, tx, rx, repeat, degraded, random_id, scan_from, scan_to, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback);
if (rc < 0) {
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;
diff --git a/src/imts/imts.c b/src/imts/imts.c
index 721fb51..11a0e25 100644
--- a/src/imts/imts.c
+++ b/src/imts/imts.c
@@ -277,7 +277,7 @@ static void imts_paging(imts_t *imts, const char *dial_string, int loopback);
static void imts_detector_test(imts_t *imts, double length_1, double length_2, double length_3);
/* Create transceiver instance and link to a list. */
-int imts_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, int ptt, int station_length, double fast_seize, enum mode mode, const char *operator, double length_1, double length_2, double length_3)
+int imts_create(const char *kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, int ptt, int station_length, double fast_seize, enum mode mode, const char *operator, double length_1, double length_2, double length_3)
{
imts_t *imts;
int rc;
@@ -320,7 +320,7 @@ int imts_create(const char *kanal, const char *audiodev, int use_sdr, int sample
/* init general part of transceiver */
/* do not enable emphasis, since it is done by imts code, not by common sender code */
- rc = sender_create(&imts->sender, kanal, imts_channel2freq(kanal, 0), imts_channel2freq(kanal, 1), audiodev, use_sdr, samplerate, rx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
+ rc = sender_create(&imts->sender, kanal, imts_channel2freq(kanal, 0), imts_channel2freq(kanal, 1), audiodev, use_sdr, samplerate, rx_gain, tx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DIMTS, DEBUG_ERROR, "Failed to init 'Sender' processing!\n");
goto error;
diff --git a/src/imts/imts.h b/src/imts/imts.h
index 88b3da8..0e29cc8 100644
--- a/src/imts/imts.h
+++ b/src/imts/imts.h
@@ -129,7 +129,7 @@ typedef struct imts {
void imts_list_channels(void);
double imts_channel2freq(const char *kanal, int uplink);
int imts_init(void);
-int imts_create(const char *channel, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, int ptt, int station_length, double fast_seize, enum mode mode, const char *operator, double length_1, double length_2, double length_3);
+int imts_create(const char *channel, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, int ptt, int station_length, double fast_seize, enum mode mode, const char *operator, double length_1, double length_2, double length_3);
void imts_destroy(sender_t *sender);
void imts_loss_indication(imts_t *imts, double loss_time);
void imts_signal_indication(imts_t *imts);
diff --git a/src/imts/main.c b/src/imts/main.c
index 7263542..a064938 100644
--- a/src/imts/main.c
+++ b/src/imts/main.c
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
/* create transceiver instance */
for (i = 0; i < num_kanal; i++) {
- rc = imts_create(kanal[i], audiodev[i], use_sdr, samplerate, rx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, squelch_db, ptt, station_length, fast_seize, mode, operator, detector_test_length_1, detector_test_length_2, detector_test_length_3);
+ rc = imts_create(kanal[i], audiodev[i], use_sdr, samplerate, rx_gain, tx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, squelch_db, ptt, station_length, fast_seize, mode, operator, detector_test_length_1, detector_test_length_2, detector_test_length_3);
if (rc < 0) {
fprintf(stderr, "Failed to create \"Sender\" instance. Quitting!\n");
goto fail;
diff --git a/src/jolly/jolly.c b/src/jolly/jolly.c
index ba21d74..bd62bfc 100644
--- a/src/jolly/jolly.c
+++ b/src/jolly/jolly.c
@@ -212,7 +212,7 @@ static void jolly_speech_timeout(struct timer *timer);
static void jolly_go_idle(jolly_t *jolly);
/* Create transceiver instance and link to a list. */
-int jolly_create(const char *kanal, double dl_freq, double ul_freq, double step, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, int nbfm, int repeater)
+int jolly_create(const char *kanal, double dl_freq, double ul_freq, double step, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, int nbfm, int repeater)
{
jolly_t *jolly;
int rc;
@@ -229,7 +229,7 @@ int jolly_create(const char *kanal, double dl_freq, double ul_freq, double step,
ul_freq = ul_freq * 1e6 + step * 1e3 * (double)atoi(kanal);
/* init general part of transceiver */
- rc = sender_create(&jolly->sender, kanal, dl_freq, ul_freq, audiodev, use_sdr, samplerate, rx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
+ rc = sender_create(&jolly->sender, kanal, dl_freq, ul_freq, audiodev, use_sdr, samplerate, rx_gain, tx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DJOLLY, DEBUG_ERROR, "Failed to init 'Sender' processing!\n");
goto error;
diff --git a/src/jolly/jolly.h b/src/jolly/jolly.h
index 243b8ea..15ea158 100644
--- a/src/jolly/jolly.h
+++ b/src/jolly/jolly.h
@@ -50,7 +50,7 @@ typedef struct jolly {
int delay_max; /* number of samples in delay buffer */
} jolly_t;
-int jolly_create(const char *kanal, double dl_freq, double ul_freq, double step, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, int nbfm, int repeater);
+int jolly_create(const char *kanal, double dl_freq, double ul_freq, double step, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, int nbfm, int repeater);
void jolly_destroy(sender_t *sender);
void speech_finished(jolly_t *jolly);
void jolly_receive_dtmf(void *priv, char digit, dtmf_meas_t *meas);
diff --git a/src/jolly/main.c b/src/jolly/main.c
index 905baff..15cf635 100644
--- a/src/jolly/main.c
+++ b/src/jolly/main.c
@@ -191,7 +191,7 @@ int main(int argc, char *argv[])
/* create transceiver instance */
for (i = 0; i < num_kanal; i++) {
- rc = jolly_create(kanal[i], dl_freq, ul_freq, step, audiodev[i], use_sdr, samplerate, rx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, squelch_db, nbfm, repeater);
+ rc = jolly_create(kanal[i], dl_freq, ul_freq, step, audiodev[i], use_sdr, samplerate, rx_gain, tx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, squelch_db, nbfm, repeater);
if (rc < 0) {
fprintf(stderr, "Failed to create transceiver instance. Quitting!\n");
goto fail;
diff --git a/src/libdebug/debug.c b/src/libdebug/debug.c
index 5d2db98..5763f4f 100644..100755
--- a/src/libdebug/debug.c
+++ b/src/libdebug/debug.c
@@ -71,6 +71,10 @@ struct debug_cat {
{ "device", "\033[0;33m" },
{ "datenklo", "\033[1;34m" },
{ "zeit", "\033[1;34m" },
+ { "sim layer 1", "\033[0;31m" },
+ { "sim layer 2", "\033[0;33m" },
+ { "sim ICL layer", "\033[0;36m" },
+ { "sim layer 7", "\033[0;37m" },
{ NULL, NULL }
};
@@ -97,8 +101,6 @@ void get_win_size(int *w, int *h)
*h = win.ws_row;
*w = win.ws_col;
- if (*w > MAX_DISPLAY_WIDTH - 1)
- *w = MAX_DISPLAY_WIDTH - 1;
}
void _printdebug(const char *file, const char __attribute__((unused)) *function, int line, int cat, int level, const char *kanal, const char *fmt, ...)
@@ -121,7 +123,7 @@ void _printdebug(const char *file, const char __attribute__((unused)) *function,
s -= strlen(buffer);
}
- if (!(debug_mask & (1 << cat)))
+ if (!(debug_mask & ((uint64_t)1 << cat)))
return;
va_start(args, fmt);
@@ -225,7 +227,7 @@ int parse_debug_opt(const char *optarg)
fprintf(stderr, "Given debug category '%s' unknown, use 'list' to show available categories!\n", p);
return -EINVAL;
}
- debug_mask |= (1 << i);
+ debug_mask |= ((uint64_t)1 << i);
}
return 0;
diff --git a/src/libdebug/debug.h b/src/libdebug/debug.h
index 1f74946..33b188f 100644
--- a/src/libdebug/debug.h
+++ b/src/libdebug/debug.h
@@ -34,6 +34,10 @@
#define DDEVICE 27
#define DDATENKLO 28
#define DZEIT 29
+#define DSIM1 30
+#define DSIM2 31
+#define DSIMI 32
+#define DSIM7 33
void get_win_size(int *w, int *h);
diff --git a/src/libdisplay/display_iq.c b/src/libdisplay/display_iq.c
index 303706a..a16594f 100644
--- a/src/libdisplay/display_iq.c
+++ b/src/libdisplay/display_iq.c
@@ -54,6 +54,8 @@ void display_iq_on(int on)
int w, h;
get_win_size(&w, &h);
+ if (w > MAX_DISPLAY_WIDTH - 1)
+ w = MAX_DISPLAY_WIDTH - 1;
if (iq_on) {
memset(&screen, ' ', sizeof(screen));
@@ -113,6 +115,8 @@ void display_iq(float *samples, int length)
return;
get_win_size(&width, &h);
+ if (width > MAX_DISPLAY_WIDTH - 1)
+ width = MAX_DISPLAY_WIDTH - 1;
/* at what line we draw our zero-line and what character we use */
x_center = width >> 1;
diff --git a/src/libdisplay/display_measurements.c b/src/libdisplay/display_measurements.c
index d22e4ff..c8329ef 100644
--- a/src/libdisplay/display_measurements.c
+++ b/src/libdisplay/display_measurements.c
@@ -102,6 +102,8 @@ static void print_measurements(int on)
int bar_width, bar_left, bar_right, bar_hold, bar_mark;
get_win_size(&width, &h);
+ if (width > MAX_DISPLAY_WIDTH - 1)
+ width = MAX_DISPLAY_WIDTH - 1;
/* no display, if bar graph is less than one character */
bar_width = width - MAX_NAME_LEN - MAX_UNIT_LEN;
diff --git a/src/libdisplay/display_spectrum.c b/src/libdisplay/display_spectrum.c
index c2fc1c3..a85da76 100644
--- a/src/libdisplay/display_spectrum.c
+++ b/src/libdisplay/display_spectrum.c
@@ -95,6 +95,8 @@ void display_spectrum_on(int on)
int w, h;
get_win_size(&w, &h);
+ if (w > MAX_DISPLAY_WIDTH - 1)
+ w = MAX_DISPLAY_WIDTH - 1;
if (spectrum_on) {
memset(&screen, ' ', sizeof(screen));
@@ -139,8 +141,8 @@ void display_spectrum(float *samples, int length)
return;
get_win_size(&width, &h);
- if (width > MAX_DISPLAY_WIDTH)
- width = MAX_DISPLAY_WIDTH;
+ if (width > MAX_DISPLAY_WIDTH - 1)
+ width = MAX_DISPLAY_WIDTH - 1;
/* calculate size of FFT */
int m, fft_size = 0, fft_taps = 0;
diff --git a/src/libdisplay/display_status.c b/src/libdisplay/display_status.c
index c15b88b..5205159 100644
--- a/src/libdisplay/display_status.c
+++ b/src/libdisplay/display_status.c
@@ -37,6 +37,8 @@ static void print_status(int on)
int w, h;
get_win_size(&w, &h);
+ if (w > MAX_DISPLAY_WIDTH - 1)
+ w = MAX_DISPLAY_WIDTH - 1;
if (w > MAX_DISPLAY_WIDTH)
w = MAX_DISPLAY_WIDTH;
diff --git a/src/libdisplay/display_wave.c b/src/libdisplay/display_wave.c
index 261c5bb..8932960 100644
--- a/src/libdisplay/display_wave.c
+++ b/src/libdisplay/display_wave.c
@@ -47,6 +47,8 @@ void display_wave_on(int on)
int w, h;
get_win_size(&w, &h);
+ if (w > MAX_DISPLAY_WIDTH - 1)
+ w = MAX_DISPLAY_WIDTH - 1;
if (wave_on) {
memset(&screen, ' ', sizeof(screen));
@@ -101,6 +103,8 @@ void display_wave(dispwav_t *disp, sample_t *samples, int length, double range)
return;
get_win_size(&width, &h);
+ if (width > MAX_DISPLAY_WIDTH - 1)
+ width = MAX_DISPLAY_WIDTH - 1;
/* at what line we draw our zero-line and what character we use */
center_line = (HEIGHT - 1) >> 1;
diff --git a/src/libdtmf/dtmf_decode.c b/src/libdtmf/dtmf_decode.c
index c9ace1e..740d504 100644
--- a/src/libdtmf/dtmf_decode.c
+++ b/src/libdtmf/dtmf_decode.c
@@ -64,7 +64,7 @@ int dtmf_decode_init(dtmf_dec_t *dtmf, void *priv, void (*recv_digit)(void *priv
dtmf->priv = priv;
dtmf->recv_digit = recv_digit;
dtmf->samplerate = samplerate;
- dtmf->freq_tollerance = 3.0;
+ dtmf->freq_margin = 1.03; /* 1.8 .. 3.5 % */
dtmf->max_amplitude = max_amplitude;
dtmf->min_amplitude = min_amplitude;
dtmf->forward_twist = db2level(4.0);
@@ -119,15 +119,15 @@ void dtmf_decode(dtmf_dec_t *dtmf, sample_t *samples, int length)
{
sample_t frequency_low[length], amplitude_low[length];
sample_t frequency_high[length], amplitude_high[length];
- double tollerance, min_amplitude, max_amplitude, forward_twist, reverse_twist, f1, f2;
+ double margin, min_amplitude, max_amplitude, forward_twist, reverse_twist, f1, f2;
int time_detect, time_meas, time_pause;
int low = 0, high = 0;
char detected, digit;
int count;
- int aplitude_ok, twist_ok;
+ int amplitude_ok, twist_ok;
int i;
- tollerance = dtmf->freq_tollerance;
+ margin = dtmf->freq_margin;
min_amplitude = dtmf->min_amplitude;
max_amplitude = dtmf->max_amplitude;
forward_twist = dtmf->forward_twist;
@@ -143,27 +143,27 @@ void dtmf_decode(dtmf_dec_t *dtmf, sample_t *samples, int length)
for (i = 0; i < length; i++) {
#ifdef DEBUG
- printf("%s %.5f\n", _debug_amplitude(samples[i]/2.0), samples[i]/2.0);
+// printf("%s %.5f\n", _debug_amplitude(samples[i]/2.0), samples[i]/2.0);
#endif
/* get frequency of low frequencies, correct amplitude drop at cutoff point */
f1 = frequency_low[i] + (DTMF_LOW_1 + DTMF_LOW_4) / 2.0;
- if (f1 >= DTMF_LOW_1 - tollerance && f1 <= DTMF_LOW_1 + tollerance) {
+ if (f1 >= DTMF_LOW_1 / margin && f1 <= DTMF_LOW_1 * margin) {
/* cutoff point */
amplitude_low[i] /= 0.7071;
low = 1;
f1 -= DTMF_LOW_1;
} else
- if (f1 >= DTMF_LOW_2 - tollerance && f1 <= DTMF_LOW_2 + tollerance) {
+ if (f1 >= DTMF_LOW_2 / margin && f1 <= DTMF_LOW_2 * margin) {
amplitude_low[i] /= 1.0734;
low = 2;
f1 -= DTMF_LOW_2;
} else
- if (f1 >= DTMF_LOW_3 - tollerance && f1 <= DTMF_LOW_3 + tollerance) {
+ if (f1 >= DTMF_LOW_3 / margin && f1 <= DTMF_LOW_3 * margin) {
amplitude_low[i] /= 1.0389;
low = 3;
f1 -= DTMF_LOW_3;
} else
- if (f1 >= DTMF_LOW_4 - tollerance && f1 <= DTMF_LOW_4 + tollerance) {
+ if (f1 >= DTMF_LOW_4 / margin && f1 <= DTMF_LOW_4 * margin) {
/* cutoff point */
amplitude_low[i] /= 0.7071;
low = 4;
@@ -172,23 +172,23 @@ void dtmf_decode(dtmf_dec_t *dtmf, sample_t *samples, int length)
low = 0;
/* get frequency of high frequencies, correct amplitude drop at cutoff point */
f2 = frequency_high[i] + (DTMF_HIGH_1 + DTMF_HIGH_4) / 2.0;
- if (f2 >= DTMF_HIGH_1 - tollerance && f2 <= DTMF_HIGH_1 + tollerance) {
+ if (f2 >= DTMF_HIGH_1 / margin && f2 <= DTMF_HIGH_1 * margin) {
/* cutoff point */
amplitude_high[i] /= 0.7071;
high = 1;
f2 -= DTMF_HIGH_1;
} else
- if (f2 >= DTMF_HIGH_2 - tollerance && f2 <= DTMF_HIGH_2 + tollerance) {
+ if (f2 >= DTMF_HIGH_2 / margin && f2 <= DTMF_HIGH_2 * margin) {
amplitude_high[i] /= 1.0731;
high = 2;
f2 -= DTMF_HIGH_2;
} else
- if (f2 >= DTMF_HIGH_3 - tollerance && f2 <= DTMF_HIGH_3 + tollerance) {
+ if (f2 >= DTMF_HIGH_3 / margin && f2 <= DTMF_HIGH_3 * margin) {
amplitude_high[i] /= 1.0372;
high = 3;
f2 -= DTMF_HIGH_3;
} else
- if (f2 >= DTMF_HIGH_4 - tollerance && f2 <= DTMF_HIGH_4 + tollerance) {
+ if (f2 >= DTMF_HIGH_4 / margin && f2 <= DTMF_HIGH_4 * margin) {
/* cutoff point */
amplitude_high[i] /= 0.7071;
high = 4;
@@ -196,15 +196,15 @@ void dtmf_decode(dtmf_dec_t *dtmf, sample_t *samples, int length)
} else
high = 0;
digit = 0;
- aplitude_ok = 0;
+ amplitude_ok = 0;
twist_ok = 0;
if (low && high) {
digit = dtmf_digit[low*4+high];
/* check for limits */
if (amplitude_low[i] <= max_amplitude && amplitude_low[i] >= min_amplitude && amplitude_high[i] <= max_amplitude && amplitude_high[i] >= min_amplitude) {
- aplitude_ok = 1;
+ amplitude_ok = 1;
#ifdef DEBUG
- printf("%.5f %.5f %.1f\n", amplitude_low[i], amplitude_high[i], level2db(amplitude_high[i] / amplitude_low[i]));
+ printf("%.1f %.1f (limits %.1f .. %.1f) %.1f\n", level2db(amplitude_low[i]), level2db(amplitude_high[i]), level2db(min_amplitude), level2db(max_amplitude), level2db(amplitude_high[i] / amplitude_low[i]));
#endif
if (amplitude_high[i] / amplitude_low[i] <= forward_twist && amplitude_low[i] / amplitude_high[i] <= reverse_twist)
twist_ok = 1;
@@ -212,7 +212,7 @@ void dtmf_decode(dtmf_dec_t *dtmf, sample_t *samples, int length)
}
if (!detected) {
- if (digit && aplitude_ok && twist_ok) {
+ if (digit && amplitude_ok && twist_ok) {
if (count == 0) {
memset(&dtmf->meas, 0, sizeof(dtmf->meas));
}
@@ -236,7 +236,7 @@ void dtmf_decode(dtmf_dec_t *dtmf, sample_t *samples, int length)
} else
count = 0;
} else {
- if (!digit || digit != detected || !aplitude_ok || !twist_ok) {
+ if (!digit || digit != detected || !amplitude_ok || !twist_ok) {
count++;
if (count >= time_pause) {
detected = 0;
@@ -249,7 +249,7 @@ void dtmf_decode(dtmf_dec_t *dtmf, sample_t *samples, int length)
}
#ifdef DEBUG
if (digit)
- printf("DTMF tone='%c' diff frequency=%.1f %.1f amplitude=%.1f %.1f dB (%s) twist=%.1f dB (%s)\n", digit, f1, f2, level2db(amplitude_low[i]), level2db(amplitude_high[i]), (aplitude_ok) ? "OK" : "nok", level2db(amplitude_high[i] / amplitude_low[i]), (twist_ok) ? "OK" : "nok");
+ printf("DTMF tone='%c' diff frequency=%.1f %.1f amplitude=%.1f %.1f dB (%s) twist=%.1f dB (%s)\n", digit, f1, f2, level2db(amplitude_low[i]), level2db(amplitude_high[i]), (amplitude_ok) ? "OK" : "nok", level2db(amplitude_high[i] / amplitude_low[i]), (twist_ok) ? "OK" : "nok");
#endif
dtmf->detected = detected;
diff --git a/src/libdtmf/dtmf_decode.h b/src/libdtmf/dtmf_decode.h
index 4aa6546..7c5780f 100644
--- a/src/libdtmf/dtmf_decode.h
+++ b/src/libdtmf/dtmf_decode.h
@@ -12,7 +12,7 @@ typedef struct dtmf_dec {
void *priv;
void (*recv_digit)(void *priv, char digit, dtmf_meas_t *meas);
int samplerate; /* samplerate */
- double freq_tollerance; /* +- limit of frequency deviation to allow */
+ double freq_margin; /* +- limit of frequency deviation (percent) valid tone*/
double min_amplitude; /* minimum amplitude relative to 0 dBm */
double max_amplitude; /* maximum amplitude relative to 0 dBm */
double forward_twist; /* how much do higher frequencies are louder than lower frequencies */
diff --git a/src/libmncc/mncc_console.c b/src/libmncc/mncc_console.c
index 599dad7..912446d 100644
--- a/src/libmncc/mncc_console.c
+++ b/src/libmncc/mncc_console.c
@@ -260,7 +260,8 @@ int console_init(const char *station_id, const char *audiodev, int samplerate, i
print_console_text = _print_console_text;
memset(&console, 0, sizeof(console));
- strncpy(console.station_id, station_id, sizeof(console.station_id) - 1);
+ if (station_id)
+ strncpy(console.station_id, station_id, sizeof(console.station_id) - 1);
strncpy(console.audiodev, audiodev, sizeof(console.audiodev) - 1);
console.samplerate = samplerate;
console.latspl = latency * samplerate / 1000;
@@ -442,7 +443,7 @@ dial_after_hangup:
* returns 1 on exit (ctrl+c) */
void process_console(int c)
{
- if (!console.loopback)
+ if (!console.loopback && console.num_digits)
process_ui(c);
if (!console.sound)
diff --git a/src/libmobile/call.c b/src/libmobile/call.c
index 6d12b30..d00a4b6 100644..100755
--- a/src/libmobile/call.c
+++ b/src/libmobile/call.c
@@ -631,7 +631,8 @@ void mncc_down(uint8_t *buf, int length)
if (mncc->msg_type == MNCC_SETUP_REQ)
process = create_process(callref, PROCESS_SETUP_RT);
else {
- if (mncc->msg_type != MNCC_REL_REQ)
+ /* release collisions and audio packet are not forbidden */
+ if (mncc->msg_type != MNCC_REL_REQ && mncc->msg_type != ANALOG_8000HZ)
PDEBUG(DCALL, DEBUG_ERROR, "No process!\n");
return;
}
diff --git a/src/libmobile/main_mobile.c b/src/libmobile/main_mobile.c
index 2ae7bf7..cc122fa 100644
--- a/src/libmobile/main_mobile.c
+++ b/src/libmobile/main_mobile.c
@@ -53,6 +53,7 @@ int num_kanal = 0;
const char *kanal[MAX_SENDER];
int num_audiodev = 0;
const char *audiodev[MAX_SENDER] = { "hw:0,0" };
+int allow_sdr = 1;
int use_sdr = 0;
static const char *call_audiodev = "";
int samplerate = 48000;
@@ -63,6 +64,7 @@ int uses_emphasis = 1;
int do_pre_emphasis = 0;
int do_de_emphasis = 0;
double rx_gain = 1.0;
+double tx_gain = 1.0;
static int echo_test = 0;
static int use_mncc_sock = 0;
static int use_mncc_cross = 0;
@@ -120,10 +122,12 @@ void main_mobile_print_help(const char *arg0, const char *ext_usage)
printf(" Enable de-emphasis, if you directly connect to the discriminator of\n");
printf(" the receiver. (No de-emphasis done by the receiver.)\n");
}
- printf(" -g --rx-gain <dB>\n");
- printf(" Raise receiver RX level by given gain in dB. This is useful if input\n");
- printf(" level of the sound device is too low, even after setting maximum level\n");
- printf(" with the mixer settings. (Works with sound card only.)\n");
+ printf(" --rx-gain <dB>\n");
+ printf(" Raise/lower receiver's RX level by given gain in dB.\n");
+ printf(" (Works with sound card only.)\n");
+ printf(" --tx-gain <dB>\n");
+ printf(" Raise/lower transmitters's RX level by given gain in dB.\n");
+ printf(" (Works with sound card only.)\n");
printf(" -e --echo-test\n");
printf(" Use echo test, to send back audio from mobile phone's microphone to\n");
printf(" the speaker. (German: 'Blasprobe').\n");
@@ -158,11 +162,13 @@ void main_mobile_print_help(const char *arg0, const char *ext_usage)
printf(" --read-tx-wave <file>\n");
printf(" Replace transmitted audio by given wave file.\n");
#ifdef HAVE_SDR
+ if (allow_sdr) {
printf(" --limesdr\n");
printf(" Auto-select several required options for LimeSDR\n");
printf(" --limesdr-mini\n");
printf(" Auto-select several required options for LimeSDR Mini\n");
sdr_config_print_help();
+ }
#endif
printf("\nNetwork specific options:\n");
}
@@ -176,18 +182,22 @@ void main_mobile_print_hotkeys(void)
printf("Press 'c' key to toggle display of channel status.\n");
printf("Press 'm' key to toggle display of measurement value.\n");
#ifdef HAVE_SDR
+ if (allow_sdr) {
sdr_config_print_hotkeys();
+ }
#endif
}
#define OPT_CHANNEL 1000
-#define OPT_WRITE_RX_WAVE 1001
-#define OPT_WRITE_TX_WAVE 1002
-#define OPT_READ_RX_WAVE 1003
-#define OPT_READ_TX_WAVE 1004
-#define OPT_CALL_SAMPLERATE 1005
-#define OPT_MNCC_NAME 1006
-#define OPT_FAST_MATH 1007
+#define OPT_RX_GAIN 1001
+#define OPT_TX_GAIN 1002
+#define OPT_WRITE_RX_WAVE 1003
+#define OPT_WRITE_TX_WAVE 1004
+#define OPT_READ_RX_WAVE 1005
+#define OPT_READ_TX_WAVE 1006
+#define OPT_CALL_SAMPLERATE 1007
+#define OPT_MNCC_NAME 1008
+#define OPT_FAST_MATH 1009
#define OPT_LIMESDR 1100
#define OPT_LIMESDR_MINI 1101
@@ -203,7 +213,8 @@ void main_mobile_add_options(void)
option_add('b', "buffer", 1);
option_add('p', "pre-emphasis", 0);
option_add('d', "de-emphasis", 0);
- option_add('g', "rx-gain", 1);
+ option_add(OPT_RX_GAIN, "rx-gain", 1);
+ option_add(OPT_TX_GAIN, "tx-gain", 1);
option_add('e', "echo-test", 0);
option_add('x', "mncc-cross", 0);
option_add('m', "mncc-sock", 0);
@@ -280,14 +291,14 @@ int main_mobile_handle_options(int short_option, int argi, char **argv)
goto no_emph;
do_de_emphasis = 1;
break;
- case 'g':
+ case OPT_RX_GAIN:
gain_db = atof(argv[argi]);
- if (gain_db < 0.0) {
- fprintf(stderr, "Given gain is below 0. To reduce RX signal, use sound card's mixer (or resistor net)!\n");
- return -EINVAL;
- }
rx_gain = pow(10, gain_db / 20.0);
break;
+ case OPT_TX_GAIN:
+ gain_db = atof(argv[argi]);
+ tx_gain = pow(10, gain_db / 20.0);
+ break;
case 'e':
echo_test = 1;
break;
@@ -332,7 +343,7 @@ int main_mobile_handle_options(int short_option, int argi, char **argv)
break;
#ifdef HAVE_SDR
case OPT_LIMESDR:
- {
+ if (allow_sdr) {
char *argv_lime[] = { argv[0],
"--sdr-soapy",
"--sdr-rx-antenna", "LNAL",
@@ -345,8 +356,9 @@ int main_mobile_handle_options(int short_option, int argi, char **argv)
int argc_lime = sizeof(argv_lime) / sizeof (*argv_lime);
return options_command_line(argc_lime, argv_lime, main_mobile_handle_options);
}
+ break;
case OPT_LIMESDR_MINI:
- {
+ if (allow_sdr) {
char *argv_lime[] = { argv[0],
"--sdr-soapy",
"--sdr-rx-antenna", "LNAW",
@@ -360,13 +372,14 @@ int main_mobile_handle_options(int short_option, int argi, char **argv)
int argc_lime = sizeof(argv_lime) / sizeof (*argv_lime);
return options_command_line(argc_lime, argv_lime, main_mobile_handle_options);
}
+ break;
#endif
default:
#ifdef HAVE_SDR
- return sdr_config_handle_options(short_option, argi, argv);
-#else
- return -EINVAL;
+ if (allow_sdr)
+ return sdr_config_handle_options(short_option, argi, argv);
#endif
+ return -EINVAL;
}
return 1;
diff --git a/src/libmobile/main_mobile.h b/src/libmobile/main_mobile.h
index aa6625c..8bef792 100644
--- a/src/libmobile/main_mobile.h
+++ b/src/libmobile/main_mobile.h
@@ -4,6 +4,7 @@ extern const char *kanal[];
extern int swap_links;
extern int num_audiodev;
extern const char *audiodev[];
+extern int allow_sdr;
extern int use_sdr;
extern int samplerate;
extern int interval;
@@ -12,6 +13,7 @@ extern int uses_emphasis;
extern int do_pre_emphasis;
extern int do_de_emphasis;
extern double rx_gain;
+extern double tx_gain;
extern int send_patterns;
extern int loopback;
extern int rt_prio;
diff --git a/src/libmobile/sender.c b/src/libmobile/sender.c
index cdd1fae..369d90e 100644
--- a/src/libmobile/sender.c
+++ b/src/libmobile/sender.c
@@ -35,9 +35,10 @@
sender_t *sender_head = NULL;
static sender_t **sender_tailp = &sender_head;
int cant_recover = 0;
+int check_channel = 1;
/* Init transceiver instance and link to list of transceivers. */
-int sender_create(sender_t *sender, const char *kanal, double sendefrequenz, double empfangsfrequenz, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, enum paging_signal paging_signal)
+int sender_create(sender_t *sender, const char *kanal, double sendefrequenz, double empfangsfrequenz, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, enum paging_signal paging_signal)
{
sender_t *master, *slave;
int rc = 0;
@@ -48,6 +49,7 @@ int sender_create(sender_t *sender, const char *kanal, double sendefrequenz, dou
strncpy(sender->audiodev, audiodev, sizeof(sender->audiodev) - 1);
sender->samplerate = samplerate;
sender->rx_gain = rx_gain;
+ sender->tx_gain = tx_gain;
sender->pre_emphasis = pre_emphasis;
sender->de_emphasis = de_emphasis;
sender->loopback = loopback;
@@ -58,8 +60,10 @@ int sender_create(sender_t *sender, const char *kanal, double sendefrequenz, dou
sender->read_tx_wave = read_tx_wave;
/* no gain with SDR */
- if (use_sdr)
+ if (use_sdr) {
sender->rx_gain = 1.0;
+ sender->tx_gain = 1.0;
+ }
if (samplerate < 8000) {
PDEBUG(DSENDER, DEBUG_NOTICE, "Given sample rate is below 8 KHz. Please use higher sample rate!\n");
@@ -80,7 +84,7 @@ int sender_create(sender_t *sender, const char *kanal, double sendefrequenz, dou
rc = -EIO;
goto error;
}
- if (abs(atoi(master->kanal) - atoi(kanal)) == 1) {
+ if (check_channel && abs(atoi(master->kanal) - atoi(kanal)) == 1) {
PDEBUG(DSENDER, DEBUG_NOTICE, "------------------------------------------------------------------------\n");
PDEBUG(DSENDER, DEBUG_NOTICE, "NOTE: Channel %s is next to channel %s. This will cause interferences.\n", kanal, master->kanal);
PDEBUG(DSENDER, DEBUG_NOTICE, "Please use at least one channel distance to avoid that.\n");
@@ -343,7 +347,7 @@ void process_sender_audio(sender_t *sender, int *quit, int latspl)
#endif
count = sender->audio_get_tosend(sender->audio, latspl);
if (count < 0) {
- PDEBUG(DSENDER, DEBUG_ERROR, "Failed to get number of samples in buffer (rc = %d)!\n", count);
+ PDEBUG_CHAN(DSENDER, DEBUG_ERROR, "Failed to get number of samples in buffer (rc = %d)!\n", count);
if (count == -EPIPE) {
if (cant_recover) {
cant_recover:
@@ -377,6 +381,9 @@ cant_recover:
/* do pre emphasis towards radio */
if (inst->pre_emphasis)
pre_emphasis(&inst->estate, samples[i], count);
+ /* tx gain */
+ if (inst->tx_gain != 1.0)
+ gain_samples(samples[i], count, inst->tx_gain);
/* normal level to frequency deviation of speech level */
gain_samples(samples[i], count, inst->speech_deviation);
/* set paging signal */
diff --git a/src/libmobile/sender.h b/src/libmobile/sender.h
index 0e2ffcb..25e68d1 100644
--- a/src/libmobile/sender.h
+++ b/src/libmobile/sender.h
@@ -52,7 +52,8 @@ typedef struct sender {
int (*audio_get_tosend)(void *, int);
int samplerate;
samplerate_t srstate; /* sample rate conversion state */
- double rx_gain; /* factor of level to apply on rx samples */
+ double rx_gain; /* factor of level to apply on RX samples */
+ double tx_gain; /* factor of level to apply on TX samples */
int pre_emphasis; /* use pre_emhasis, done by sender */
int de_emphasis; /* use de_emhasis, done by sender */
emphasis_t estate; /* pre and de emphasis */
@@ -88,11 +89,11 @@ typedef struct sender {
dispmeas_t dispmeas; /* display measurements */
} sender_t;
-/* list of all senders */
extern sender_t *sender_head;
extern int cant_recover;
+extern int check_channel;
-int sender_create(sender_t *sender, const char *kanal, double sendefrequenz, double empfangsfrequenz, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, enum paging_signal paging_signal);
+int sender_create(sender_t *sender, const char *kanal, double sendefrequenz, double empfangsfrequenz, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, enum paging_signal paging_signal);
void sender_destroy(sender_t *sender);
void sender_set_fm(sender_t *sender, double max_deviation, double max_modulation, double speech_deviation, double max_display);
void sender_set_am(sender_t *sender, double max_modulation, double speech_deviation, double max_display, double modulation_index);
diff --git a/src/liboptions/options.c b/src/liboptions/options.c
index 171f257..4b8f062 100644
--- a/src/liboptions/options.c
+++ b/src/liboptions/options.c
@@ -62,16 +62,16 @@ void option_add(int short_option, const char *long_option, int parameter_count)
option_tailp = &(option->next);
}
-// FIXME: support more than one option */
int options_config_file(const char *config_file, int (*handle_options)(int short_option, int argi, char *argv[]))
{
static const char *home;
char config[256];
FILE *fp;
- char buffer[256], opt[256], param[256], *p, *argv[1];
+ char buffer[256], opt[256], param[256], *p, *argv[16];
+ char params[1024];
int line;
int rc = 1;
- int i;
+ int i, j, quote;
option_t *option;
/* open config file */
@@ -113,18 +113,66 @@ int options_config_file(const char *config_file, int (*handle_options)(int short
while (*p > '\0' && *p <= ' ')
p++;
/* get param from line */
+ params[0] = '\0';
i = 0;
- while (*p > ' ')
- param[i++] = *p++;
- param[i] = '\0';
+ while (*p) {
+ /* copy parameter */
+ j = 0;
+ quote = 0;
+ while (*p) {
+ /* escape allows all following characters */
+ if (*p == '\\') {
+ p++;
+ if (*p)
+ param[j++] = *p++;
+ continue;
+ }
+ /* no quote, check for them or break on white space */
+ if (quote == 0) {
+ if (*p == '\'') {
+ quote = 1;
+ p++;
+ continue;
+ }
+ if (*p == '\"') {
+ quote = 2;
+ p++;
+ continue;
+ }
+ if (*p <= ' ')
+ break;
+ }
+ /* single quote, check for unquote */
+ if (quote == 1 && *p == '\'') {
+ quote = 0;
+ p++;
+ continue;
+ }
+ /* double quote, check for unquote */
+ if (quote == 2 && *p == '\"') {
+ quote = 0;
+ p++;
+ continue;
+ }
+ /* copy character */
+ param[j++] = *p++;
+ }
+ param[j] = '\0';
+ argv[i] = strdup(param);
+ sprintf(strchr(params, '\0'), " '%s'", param);
+ /* skip white spaces behind option */
+ while (*p > '\0' && *p <= ' ')
+ p++;
+ i++;
+ }
/* search option */
for (option = option_head; option; option = option->next) {
if (opt[0] == option->short_option && opt[1] == '\0') {
- PDEBUG(DOPTIONS, DEBUG_INFO, "Config file option '%s' ('%s'), parameter '%s'\n", opt, option->long_option, param);
+ PDEBUG(DOPTIONS, DEBUG_INFO, "Config file option '%s' ('%s'), parameter%s\n", opt, option->long_option, params);
break;
}
if (!strcmp(opt, option->long_option)) {
- PDEBUG(DOPTIONS, DEBUG_INFO, "Config file option '%s', parameter '%s'\n", opt, param);
+ PDEBUG(DOPTIONS, DEBUG_INFO, "Config file option '%s', parameter%s\n", opt, params);
break;
}
}
@@ -133,11 +181,10 @@ int options_config_file(const char *config_file, int (*handle_options)(int short
rc = -EINVAL;
goto done;
}
- if (option->parameter_count && !param[0]) {
+ if (option->parameter_count != i) {
PDEBUG(DOPTIONS, DEBUG_ERROR, "Given option '%s' in config file '%s' at line %d requires %d parameter(s), use '-h' for help!\n", opt, config_file, line, option->parameter_count);
return -EINVAL;
}
- argv[0] = strdup(param);
rc = handle_options(option->short_option, 0, argv);
if (rc <= 0)
goto done;
@@ -154,7 +201,7 @@ done:
int options_command_line(int argc, char *argv[], int (*handle_options)(int short_option, int argi, char *argv[]))
{
option_t *option;
- char params[256];
+ char params[1024];
int argi, i;
int rc;
diff --git a/src/libsound/sound_alsa.c b/src/libsound/sound_alsa.c
index 21199c9..6cb0cc2 100644
--- a/src/libsound/sound_alsa.c
+++ b/src/libsound/sound_alsa.c
@@ -28,6 +28,9 @@
typedef struct sound {
snd_pcm_t *phandle, *chandle;
int pchannels, cchannels;
+ int channels; /* required number of channels */
+ int samplerate; /* required sample rate */
+ char *audiodev; /* required device */
double spl_deviation; /* how much deviation is one sample step */
double paging_phaseshift; /* phase to shift every sample */
double paging_phase; /* current phase */
@@ -112,9 +115,48 @@ error:
return rc;
}
-static int sound_prepare(sound_t *sound)
+static int dev_open(sound_t *sound)
{
- int rc;
+ int rc, rc_rec, rc_play;
+
+ rc_play = snd_pcm_open(&sound->phandle, sound->audiodev, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
+ rc_rec = snd_pcm_open(&sound->chandle, sound->audiodev, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK);
+ if (rc_play < 0 && rc_rec < 0) {
+ PDEBUG(DSOUND, DEBUG_ERROR, "Failed to open '%s'! (%s)\n", sound->audiodev, snd_strerror(rc_play));
+ PDEBUG(DSOUND, DEBUG_ERROR, "Run 'aplay -l' to get a list of available cards and devices.\n");
+ PDEBUG(DSOUND, DEBUG_ERROR, "Then use 'hw:<card>:<device>' for audio device.\n");
+ return rc_play;
+ }
+ if (rc_play < 0) {
+ PDEBUG(DSOUND, DEBUG_ERROR, "Failed to open '%s' for playback! (%s) Please select a device that supports both direction audio.\n", sound->audiodev, snd_strerror(rc_play));
+ return rc_play;
+ }
+ if (rc_rec < 0) {
+ PDEBUG(DSOUND, DEBUG_ERROR, "Failed to open '%s' for capture! (%s) Please select a device that supports both direction audio.\n", sound->audiodev, snd_strerror(rc_rec));
+ return rc_rec;
+ }
+
+ rc = set_hw_params(sound->phandle, sound->samplerate, &sound->pchannels);
+ if (rc < 0) {
+ PDEBUG(DSOUND, DEBUG_ERROR, "Failed to set playback hw params\n");
+ return rc;
+ }
+ if (sound->pchannels < sound->channels) {
+ PDEBUG(DSOUND, DEBUG_ERROR, "Sound card only supports %d channel for playback.\n", sound->pchannels);
+ return rc;
+ }
+ PDEBUG(DSOUND, DEBUG_DEBUG, "Playback with %d channels.\n", sound->pchannels);
+
+ rc = set_hw_params(sound->chandle, sound->samplerate, &sound->cchannels);
+ if (rc < 0) {
+ PDEBUG(DSOUND, DEBUG_ERROR, "Failed to set capture hw params\n");
+ return rc;
+ }
+ if (sound->cchannels < sound->channels) {
+ PDEBUG(DSOUND, DEBUG_ERROR, "Sound card only supports %d channel for capture.\n", sound->cchannels);
+ return -EIO;
+ }
+ PDEBUG(DSOUND, DEBUG_DEBUG, "Capture with %d channels.\n", sound->cchannels);
rc = snd_pcm_prepare(sound->phandle);
if (rc < 0) {
@@ -131,10 +173,18 @@ static int sound_prepare(sound_t *sound)
return 0;
}
+static void dev_close(sound_t *sound)
+{
+ if (sound->phandle != NULL)
+ snd_pcm_close(sound->phandle);
+ if (sound->chandle != NULL)
+ snd_pcm_close(sound->chandle);
+}
+
void *sound_open(const char *audiodev, double __attribute__((unused)) *tx_frequency, double __attribute__((unused)) *rx_frequency, int __attribute__((unused)) *am, int channels, double __attribute__((unused)) paging_frequency, int samplerate, int __attribute((unused)) latspl, double max_deviation, double __attribute__((unused)) max_modulation, double __attribute__((unused)) modulation_index)
{
sound_t *sound;
- int rc, rc_rec, rc_play;
+ int rc;
if (channels < 1 || channels > 2) {
PDEBUG(DSOUND, DEBUG_ERROR, "Cannot use more than two channels with the same sound card!\n");
@@ -147,49 +197,13 @@ void *sound_open(const char *audiodev, double __attribute__((unused)) *tx_freque
return NULL;
}
+ sound->audiodev = strdup(audiodev);
+ sound->channels = channels;
+ sound->samplerate = samplerate;
sound->spl_deviation = max_deviation / 32767.0;
sound->paging_phaseshift = 1.0 / ((double)samplerate / 1000.0);
- rc_play = snd_pcm_open(&sound->phandle, audiodev, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
- rc_rec = snd_pcm_open(&sound->chandle, audiodev, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK);
- if (rc_play < 0 && rc_rec < 0) {
- PDEBUG(DSOUND, DEBUG_ERROR, "Failed to open '%s'! (%s)\n", audiodev, snd_strerror(rc_play));
- PDEBUG(DSOUND, DEBUG_ERROR, "Run 'aplay -l' to get a list of available cards and devices.\n");
- PDEBUG(DSOUND, DEBUG_ERROR, "Then use 'hw:<card>:<device>' for audio device.\n");
- goto error;
- }
- if (rc_play < 0) {
- PDEBUG(DSOUND, DEBUG_ERROR, "Failed to open '%s' for playback! (%s) Please select a device that supports both direction audio.\n", audiodev, snd_strerror(rc_play));
- goto error;
- }
- if (rc_rec < 0) {
- PDEBUG(DSOUND, DEBUG_ERROR, "Failed to open '%s' for capture! (%s) Please select a device that supports both direction audio.\n", audiodev, snd_strerror(rc_rec));
- goto error;
- }
-
- rc = set_hw_params(sound->phandle, samplerate, &sound->pchannels);
- if (rc < 0) {
- PDEBUG(DSOUND, DEBUG_ERROR, "Failed to set playback hw params\n");
- goto error;
- }
- if (sound->pchannels < channels) {
- PDEBUG(DSOUND, DEBUG_ERROR, "Sound card only supports %d channel for playback.\n", sound->pchannels);
- goto error;
- }
- PDEBUG(DSOUND, DEBUG_DEBUG, "Playback with %d channels.\n", sound->pchannels);
-
- rc = set_hw_params(sound->chandle, samplerate, &sound->cchannels);
- if (rc < 0) {
- PDEBUG(DSOUND, DEBUG_ERROR, "Failed to set capture hw params\n");
- goto error;
- }
- if (sound->cchannels < channels) {
- PDEBUG(DSOUND, DEBUG_ERROR, "Sound card only supports %d channel for capture.\n", sound->cchannels);
- goto error;
- }
- PDEBUG(DSOUND, DEBUG_DEBUG, "Capture with %d channels.\n", sound->cchannels);
-
- rc = sound_prepare(sound);
+ rc = dev_open(sound);
if (rc < 0)
goto error;
@@ -228,10 +242,8 @@ void sound_close(void *inst)
{
sound_t *sound = (sound_t *)inst;
- if (sound->phandle != NULL)
- snd_pcm_close(sound->phandle);
- if (sound->chandle != NULL)
- snd_pcm_close(sound->chandle);
+ dev_close(sound);
+ free(sound->audiodev);
free(sound);
}
@@ -344,8 +356,12 @@ int sound_write(void *inst, sample_t **samples, uint8_t __attribute__((unused))
if (rc < 0) {
PDEBUG(DSOUND, DEBUG_ERROR, "failed to write audio to interface (%s)\n", snd_strerror(rc));
if (rc == -EPIPE) {
- sound_prepare(sound);
+ dev_close(sound);
+ rc = dev_open(sound);
+ if (rc < 0)
+ return rc;
sound_start(sound);
+ return -EPIPE; /* indicate what happened */
}
return rc;
}
@@ -390,8 +406,12 @@ int sound_read(void *inst, sample_t **samples, int num, int channels, double *rf
PDEBUG(DSOUND, DEBUG_ERROR, "failed to read audio from interface (%s)\n", snd_strerror(rc));
/* recover read */
if (rc == -EPIPE) {
- sound_prepare(sound);
+ dev_close(sound);
+ rc = dev_open(sound);
+ if (rc < 0)
+ return rc;
sound_start(sound);
+ return -EPIPE; /* indicate what happened */
}
return rc;
}
@@ -464,8 +484,12 @@ int sound_get_tosend(void *inst, int latspl)
else
PDEBUG(DSOUND, DEBUG_ERROR, "failed to get delay from interface (%s)\n", snd_strerror(rc));
if (rc == -EPIPE) {
- sound_prepare(sound);
+ dev_close(sound);
+ rc = dev_open(sound);
+ if (rc < 0)
+ return rc;
sound_start(sound);
+ return -EPIPE; /* indicate what happened */
}
return rc;
}
diff --git a/src/libwave/wave.c b/src/libwave/wave.c
index a2de2af..50c2c96 100644
--- a/src/libwave/wave.c
+++ b/src/libwave/wave.c
@@ -375,6 +375,7 @@ int wave_read(wave_play_t *play, sample_t **samples, int length)
int __attribute__((__unused__)) len;
int i, c;
int to_read;
+ int got = 0;
/* we have finished */
if (play->left == 0) {
@@ -384,7 +385,7 @@ read_empty:
for (c = 0; c < play->channels; c++)
samples[c][i] = 0;
}
- return length;
+ return got;
}
/* how much do we read from buffer */
@@ -413,6 +414,7 @@ read_empty:
samples[c][i] = (double)value / 32767.0 * max_deviation;
}
}
+ got += to_read;
play->left -= to_read;
if (!play->left)
@@ -421,7 +423,7 @@ read_empty:
if (to_read < length)
goto read_empty;
- return length;
+ return got;
}
void wave_destroy_record(wave_rec_t *rec)
diff --git a/src/nmt/countries.c b/src/nmt/countries.c
index 29d00e4..04049a6 100644
--- a/src/nmt/countries.c
+++ b/src/nmt/countries.c
@@ -87,6 +87,13 @@ static struct nmt_frequency frq_450_cz_sk[] = {
{ 0, 0, 0.0, 0.0, 0.0, 0.0, 0 }
};
+/* channel allocation used in Hungary */
+static struct nmt_frequency frq_450_hu[] = {
+ { 132,239, 467.370, -0.020, 0.8, 10.0, 0 },
+ { 1, 72, 469.990, -0.020, 0.8, 10.0, 0 },
+ { 0, 0, 0.0, 0.0, 0.0, 0.0, 0 }
+};
+
/* channel allocation used in Turkey */
static struct nmt_frequency frq_900_tr[] = {
{ 1, 180, 461.500, 0.025, 1.0, 10.0, 0 },
@@ -142,6 +149,7 @@ static struct nmt_country {
{ 450, 1, 2, 1,9, "B", "Belgium", "Belgacom Mobile", frq_450_nl_l_b },
{ 450, 1, 7, 1,9, "CZ", "Czech Republic", "Eurotel Prague", frq_450_cz_sk },
{ 450, 1, 6, 1,9, "SK", "Slovakia", "Eurotel Bratislava", frq_450_cz_sk },
+ { 450, 1, 6, 1,15, "HU", "Hungary", "WESTEL 0660", frq_450_hu },
/* 900 */
{ 900, 1, 1, 1,9, "DK", "Denmark", "Tele Danmark Mobile", frq_900_scandinavia },
{ 900, 1, 2, 1,9, "SE", "Sweden", "Telia Mobitel", frq_900_scandinavia },
diff --git a/src/nmt/frame.c b/src/nmt/frame.c
index ad03ae3..17aa03f 100644
--- a/src/nmt/frame.c
+++ b/src/nmt/frame.c
@@ -450,7 +450,7 @@ static const char *param_country(uint64_t value, int __attribute__((unused)) ndi
case 5:
return "Denmark";
case 6:
- return "Sweden / Slovakia";
+ return "Sweden / Slovakia / Hungary";
case 7:
return "Norway / Czech";
case 8:
diff --git a/src/nmt/main.c b/src/nmt/main.c
index 056ec0e..f57a6b4 100644
--- a/src/nmt/main.c
+++ b/src/nmt/main.c
@@ -397,7 +397,7 @@ int main(int argc, char *argv[])
/* create transceiver instance */
for (i = 0; i < num_kanal; i++) {
- rc = nmt_create(nmt_system, country, kanal[i], chan_type[i], audiodev[i], use_sdr, samplerate, rx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, ms_power, traffic_area, area_no, compandor, supervisory[i], smsc_number, send_callerid, loopback);
+ rc = nmt_create(nmt_system, country, kanal[i], chan_type[i], audiodev[i], use_sdr, samplerate, rx_gain, tx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, ms_power, traffic_area, area_no, compandor, supervisory[i], smsc_number, send_callerid, loopback);
if (rc < 0) {
fprintf(stderr, "Failed to create transceiver instance. Quitting!\n");
goto fail;
diff --git a/src/nmt/nmt.c b/src/nmt/nmt.c
index 7b7ff73..591ec94 100644
--- a/src/nmt/nmt.c
+++ b/src/nmt/nmt.c
@@ -264,7 +264,7 @@ static inline int is_chan_class_tc(enum nmt_chan_type chan_type)
static void nmt_timeout(struct timer *timer);
/* Create transceiver instance and link to a list. */
-int nmt_create(int nmt_system, const char *country, const char *kanal, enum nmt_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, uint8_t ms_power, uint8_t traffic_area, uint8_t area_no, int compandor, int supervisory, const char *smsc_number, int send_callerid, int loopback)
+int nmt_create(int nmt_system, const char *country, const char *kanal, enum nmt_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, uint8_t ms_power, uint8_t traffic_area, uint8_t area_no, int compandor, int supervisory, const char *smsc_number, int send_callerid, int loopback)
{
nmt_t *nmt;
int rc;
@@ -303,7 +303,7 @@ int nmt_create(int nmt_system, const char *country, const char *kanal, enum nmt_
PDEBUG(DNMT, DEBUG_DEBUG, "Creating 'NMT' instance for channel = %s (sample rate %d).\n", kanal, samplerate);
/* init general part of transceiver */
- rc = sender_create(&nmt->sender, kanal, nmt_channel2freq(nmt_system, country, atoi(kanal), 0, NULL, NULL, NULL), nmt_channel2freq(nmt_system, country, atoi(kanal), 1, NULL, NULL, NULL), audiodev, use_sdr, samplerate, rx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
+ rc = sender_create(&nmt->sender, kanal, nmt_channel2freq(nmt_system, country, atoi(kanal), 0, NULL, NULL, NULL), nmt_channel2freq(nmt_system, country, atoi(kanal), 1, NULL, NULL, NULL), audiodev, use_sdr, samplerate, rx_gain, tx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DNMT, DEBUG_ERROR, "Failed to init transceiver process!\n");
goto error;
diff --git a/src/nmt/nmt.h b/src/nmt/nmt.h
index 34e668f..8c51c4a 100644
--- a/src/nmt/nmt.h
+++ b/src/nmt/nmt.h
@@ -143,7 +143,7 @@ void nmt_channel_list(int nmt_system);
int nmt_channel_by_short_name(int nmt_system, const char *short_name);
const char *chan_type_short_name(int nmt_system, enum nmt_chan_type chan_type);
const char *chan_type_long_name(int nmt_system, enum nmt_chan_type chan_type);
-int nmt_create(int nmt_system, const char *country, const char *kanal, enum nmt_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, uint8_t ms_power, uint8_t traffic_area, uint8_t area_no, int compandor, int supervisory, const char *smsc_number, int send_callerid, int loopback);
+int nmt_create(int nmt_system, const char *country, const char *kanal, enum nmt_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, uint8_t ms_power, uint8_t traffic_area, uint8_t area_no, int compandor, int supervisory, const char *smsc_number, int send_callerid, int loopback);
void nmt_check_channels(int nmt_system);
void nmt_destroy(sender_t *sender);
void nmt_go_idle(nmt_t *nmt);
diff --git a/src/r2000/main.c b/src/r2000/main.c
index 3b49fd9..8d1a891 100644
--- a/src/r2000/main.c
+++ b/src/r2000/main.c
@@ -352,7 +352,7 @@ int main(int argc, char *argv[])
/* create transceiver instance */
for (i = 0; i < num_kanal; i++) {
- rc = r2000_create(band, kanal[i], chan_type[i], audiodev[i], use_sdr, samplerate, rx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, relais, deport, agi, sm_power, taxe, crins, destruction, nconv, recall, loopback);
+ rc = r2000_create(band, kanal[i], chan_type[i], audiodev[i], use_sdr, samplerate, rx_gain, tx_gain, do_pre_emphasis, do_de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, relais, deport, agi, sm_power, taxe, crins, destruction, nconv, recall, loopback);
if (rc < 0) {
fprintf(stderr, "Failed to create transceiver instance. Quitting!\n");
goto fail;
diff --git a/src/r2000/r2000.c b/src/r2000/r2000.c
index d542dd6..e6f6718 100644
--- a/src/r2000/r2000.c
+++ b/src/r2000/r2000.c
@@ -412,7 +412,7 @@ uint8_t r2000_encode_super(r2000_t *r2000)
static void r2000_timeout(struct timer *timer);
/* Create transceiver instance and link to a list. */
-int r2000_create(int band, const char *kanal, enum r2000_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, uint16_t relais, uint8_t deport, uint8_t agi, uint8_t sm_power, uint8_t taxe, uint8_t crins, int destruction, uint8_t nconv, int recall, int loopback)
+int r2000_create(int band, const char *kanal, enum r2000_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, uint16_t relais, uint8_t deport, uint8_t agi, uint8_t sm_power, uint8_t taxe, uint8_t crins, int destruction, uint8_t nconv, int recall, int loopback)
{
sender_t *sender;
r2000_t *r2000 = NULL;
@@ -440,7 +440,7 @@ int r2000_create(int band, const char *kanal, enum r2000_chan_type chan_type, co
PDEBUG(DR2000, DEBUG_DEBUG, "Creating 'Radiocom 2000' instance for channel = %s (sample rate %d).\n", kanal, samplerate);
/* init general part of transceiver */
- rc = sender_create(&r2000->sender, kanal, r2000_channel2freq(band, atoi(kanal), 0), r2000_channel2freq(band, atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
+ rc = sender_create(&r2000->sender, kanal, r2000_channel2freq(band, atoi(kanal), 0), r2000_channel2freq(band, atoi(kanal), 1), audiodev, use_sdr, samplerate, rx_gain, tx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DR2000, DEBUG_ERROR, "Failed to init transceiver process!\n");
goto error;
diff --git a/src/r2000/r2000.h b/src/r2000/r2000.h
index edfdffe..dcf917b 100644
--- a/src/r2000/r2000.h
+++ b/src/r2000/r2000.h
@@ -123,7 +123,7 @@ void r2000_channel_list(void);
int r2000_channel_by_short_name(const char *short_name);
const char *chan_type_short_name(enum r2000_chan_type chan_type);
const char *chan_type_long_name(enum r2000_chan_type chan_type);
-int r2000_create(int band, const char *kanal, enum r2000_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, uint16_t relais, uint8_t deport, uint8_t agi, uint8_t sm_power, uint8_t taxe, uint8_t crins, int destruction, uint8_t nconv, int recall, int loopback);
+int r2000_create(int band, const char *kanal, enum r2000_chan_type chan_type, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double tx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, uint16_t relais, uint8_t deport, uint8_t agi, uint8_t sm_power, uint8_t taxe, uint8_t crins, int destruction, uint8_t nconv, int recall, int loopback);
void r2000_check_channels(void);
void r2000_destroy(sender_t *sender);
void r2000_go_idle(r2000_t *r2000);
diff --git a/src/sim/Makefile.am b/src/sim/Makefile.am
new file mode 100644
index 0000000..7d8d402
--- /dev/null
+++ b/src/sim/Makefile.am
@@ -0,0 +1,18 @@
+AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+
+bin_PROGRAMS = \
+ cnetz_sim
+
+cnetz_sim_SOURCES = \
+ sim.c \
+ sniffer.c \
+ image.c \
+ main.c
+
+cnetz_sim_LDADD = \
+ $(COMMON_LA) \
+ $(top_builddir)/src/libdebug/libdebug.a \
+ $(top_builddir)/src/liboptions/liboptions.a \
+ $(top_builddir)/src/libserial/libserial.a \
+ -lm
+
diff --git a/src/sim/eeprom.h b/src/sim/eeprom.h
new file mode 100644
index 0000000..b4c8637
--- /dev/null
+++ b/src/sim/eeprom.h
@@ -0,0 +1,33 @@
+
+enum eeprom_locations {
+ EEPROM_MAGIC = 0x00,
+ EEPROM_FUTLN_H = 0x02,
+ EEPROM_FUTLN_M = 0x0a,
+ EEPROM_FUTLN_L = 0x12,
+ EEPROM_SICH_H = 0x1a,
+ EEPROM_SICH_L = 0x22,
+ EEPROM_SONDER_H = 0x2a,
+ EEPROM_SONDER_L = 0x32,
+ EEPROM_WARTUNG_H = 0x3a,
+ EEPROM_WARTUNG_L = 0x42,
+ EEPROM_GEBZ_H = 0x4a,
+ EEPROM_GEBZ_M = 0x4b,
+ EEPROM_GEBZ_L = 0x4c,
+ EEPROM_FLAGS = 0x4d,
+ EEPROM_PIN_DATA = 0x50,
+ EEPROM_AUTH_DATA = 0x58,
+ EEPROM_RUFN = 0x60,
+};
+
+#define EEPROM_VERSION 1 /* version eeprom layout */
+
+#define EEPROM_FLAG_PIN_LEN 0 /* pin length */
+#define EEPROM_FLAG_PIN_TRY 4 /* pin retires left */
+#define EEPROM_FLAG_GEBZ 6 /* metering locked */
+#define EEPROM_FLAG_APP 7 /* application locked */
+
+uint8_t eeprom_read(enum eeprom_locations loc);
+void eeprom_write(enum eeprom_locations loc, uint8_t value);
+uint8_t *eeprom_memory(void);
+size_t eeprom_length();
+
diff --git a/src/sim/image.c b/src/sim/image.c
new file mode 100644
index 0000000..92060c4
--- /dev/null
+++ b/src/sim/image.c
@@ -0,0 +1,97 @@
+#ifndef ARDUINO
+
+#include <stdio.h>
+#include <string.h>
+#include "../libmobile/image.h"
+
+const char *image[] = {
+ "@w",
+ " ()",
+ " // _______________________________________________",
+ " // / \\",
+ " @WC-NETZ SIM@w // | |",
+ " __________//_ | @WJ o l l y ' s@w |",
+ " / o o /| | |",
+ " /__________ / | | @Y _ __ _ @w |",
+ " //_________// / | @bVCC@Y (_)__(_) @bGND@w |",
+ " /@B_@g()@B_/ /_@r()@B_@w/ / | @bRES@Y (_)__(_) @w |",
+ " /@B_@W1@B_/_@W2@B_/_@W3@B_@w/ / | @bCLK@Y (_)__(_) @bI/O@w |",
+ " /@B_@W4@B_/_@W5@B_/_@W6@B_@w/ / | |",
+ " /@B_@W7@B_/_@W8@B_/_@W9@B_@w/ / | |",
+ " /@B_@W*@B_/_@W0@B_/_@W#@B_@w/ / | @y/|_____@w |",
+ " /___________/ / | @y/ @w @WT e l e K a r t e@w |",
+ " | _ _ | / | @y\\ _____@w |",
+ " |____________|/ | @y\\| @w |",
+ " \\_______________________________________________/",
+
+ "",
+ NULL
+};
+
+void print_image(void)
+{
+ int i, j;
+
+ for (i = 0; image[i]; i++) {
+ for (j = 0; j < (int)strlen(image[i]); j++) {
+ if (image[i][j] == '@') {
+ j++;
+ switch(image[i][j]) {
+ case 'k': /* black */
+ printf("\033[0;30m");
+ break;
+ case 'r': /* red */
+ printf("\033[0;31m");
+ break;
+ case 'g': /* green */
+ printf("\033[0;32m");
+ break;
+ case 'y': /* yellow */
+ printf("\033[0;33m");
+ break;
+ case 'b': /* blue */
+ printf("\033[0;34m");
+ break;
+ case 'm': /* magenta */
+ printf("\033[0;35m");
+ break;
+ case 'c': /* cyan */
+ printf("\033[0;36m");
+ break;
+ case 'w': /* white */
+ printf("\033[0;37m");
+ break;
+ case 'K': /* bright black */
+ printf("\033[1;30m");
+ break;
+ case 'R': /* bright red */
+ printf("\033[1;31m");
+ break;
+ case 'G': /* bright green */
+ printf("\033[1;32m");
+ break;
+ case 'Y': /* bright yellow */
+ printf("\033[1;33m");
+ break;
+ case 'B': /* bright blue */
+ printf("\033[1;34m");
+ break;
+ case 'M': /* bright magenta */
+ printf("\033[1;35m");
+ break;
+ case 'C': /* bright cyan */
+ printf("\033[1;36m");
+ break;
+ case 'W': /* bright white */
+ printf("\033[1;37m");
+ break;
+ }
+ } else
+ printf("%c", image[i][j]);
+ }
+ printf("\n");
+ }
+ printf("\033[0;39m");
+}
+
+#endif /* ARDUINO */
diff --git a/src/sim/main.c b/src/sim/main.c
new file mode 100644
index 0000000..4a975b8
--- /dev/null
+++ b/src/sim/main.c
@@ -0,0 +1,497 @@
+/* main function
+ *
+ * (C) 2020 by Andreas Eversberg <jolly@eversberg.eu>
+ * All Rights Reserved
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ARDUINO
+
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <errno.h>
+#include <math.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <sys/time.h>
+#include "../libdebug/debug.h"
+#include "../liboptions/options.h"
+#include "../libserial/serial.h"
+#include "../libmobile/image.h"
+#include "sim.h"
+#include "sniffer.h"
+#include "eeprom.h"
+
+int num_kanal = 1;
+sim_sniffer_t sim_sniffer;
+sim_sim_t sim_sim;
+static int quit = 0;
+static const char *serialdev = "/dev/ttyUSB0";
+static int baudrate = 9600;
+
+static const char *eeprom_name = NULL;
+static const char *futln = NULL;
+static const char *sicherung = NULL;
+static const char *karten = NULL;
+static const char *sonder = NULL;
+static const char *wartung = NULL;
+static const char *pin = NULL;
+#define MAX_DIR_COUNT 64
+static int dir_count = 0;
+static int dir_location[MAX_DIR_COUNT];
+static const char *dir_number[MAX_DIR_COUNT];
+static const char *dir_name[MAX_DIR_COUNT];
+static const char *auth = NULL;
+
+#define TIMEOUT 0.2
+
+void print_help(const char *arg0)
+{
+ printf("Usage: %s [options] <command>\n", arg0);
+ /* - - */
+ printf("General options:\n");
+ printf(" -h --help\n");
+ printf(" This help\n");
+ printf(" -v --verbose <level> | <level>,<category>[,<category>[,...]] | list\n");
+ printf(" Use 'list' to get a list of all levels and categories\n");
+ printf(" Verbose level: digit of debug level (default = '%d')\n", debuglevel);
+ printf(" Verbose level+category: level digit followed by one or more categories\n");
+ printf(" -> If no category is specified, all categories are selected\n");
+ printf(" -s --serial-device <device>\n");
+ printf(" Serial device (default = '%s')\n", serialdev);
+ printf(" -b --baud-rate <baud>\n");
+ printf(" Serial baud rate (default = %d)\n", baudrate);
+ printf("\nSIM card simulator options:\n");
+ printf(" -E --eeprom <name>\n");
+ printf(" Stores and reads EEPROM data to/from file. The file is stored at\n");
+ printf(" \"~/osmocom/analog/sim_<name>.eeprom\". If the file dos not exit yet,\n");
+ printf(" the default values are used. Values are always overwritten with card\n");
+ printf(" data, if defined.\n");
+ printf(" -F --futln <phone number>\n");
+ printf(" Give 7 digits subsriber ID (default = '%s')\n", FUTLN_DEFAULT);
+ printf(" --sicherung <security code>\n");
+ printf(" Card's security code for simple authentication (default = '%s')\n", SICHERUNG_DEFAULT);
+ printf(" --kartenkennung <card ID>\n");
+ printf(" Card's ID. Not relevant! (default = '%s')\n", KARTEN_DEFAULT);
+ printf(" --sonder <special code>\n");
+ printf(" Special codes are used for service cards (default = '%s')\n", SONDER_DEFAULT);
+ printf(" --wartung <maitenance code>\n");
+ printf(" May define features of service cards (default = '%s')\n", WARTUNG_DEFAULT);
+ printf(" -P --pin <pin> | 0000\n");
+ printf(" Give 4 .. 8 digits of pin. Use '0000' to disable. (default = '%s')\n", PIN_DEFAULT);
+ printf(" This will also reset the PIN error counter and unlocks the card.\n");
+ printf(" -D --directory <location> <number> <name> [--directory ...]\n");
+ printf(" Give storage location '01' .. '%02d'. To erase give \"\" as number\n", directory_size() - 1);
+ printf(" and name. This option can be given multiple times for more entries.\n");
+ printf(" -A --authenticate 0x...\n");
+ printf(" Give 64 Bit value for authentication response. (default = all bits 1)\n");
+ printf("\nCommands are:\n");
+ printf(" sniff - To passively sniff SIM card communication\n");
+ printf(" sim - To simulate a SIM card\n");
+}
+
+#define OPT_SICHERUNG 256
+#define OPT_KARTEN 257
+#define OPT_SONDER 258
+#define OPT_WARTUNG 259
+
+void add_options(void)
+{
+ option_add('h', "help", 0);
+ option_add('v', "debug", 1);
+ option_add('s', "serial-device", 1);
+ option_add('b', "baud-rate", 1);
+ option_add('E', "eeprom", 1);
+ option_add('F', "futln", 1);
+ option_add(OPT_SICHERUNG, "sicherung", 1);
+ option_add(OPT_KARTEN, "kartenkennung", 1);
+ option_add(OPT_SONDER, "sonder", 1);
+ option_add(OPT_WARTUNG, "wartung", 1);
+ option_add('P', "pin", 1);
+ option_add('D', "directory", 3);
+ option_add('A', "auth", 1);
+};
+
+int handle_options(int short_option, int argi, char **argv)
+{
+ int rc;
+
+ switch (short_option) {
+ case 'h':
+ print_help(argv[0]);
+ return 0;
+ case 'v':
+ if (!strcasecmp(argv[argi], "list")) {
+ debug_list_cat();
+ return 0;
+ }
+ rc = parse_debug_opt(argv[argi]);
+ if (rc < 0) {
+ fprintf(stderr, "Failed to parse debug option, please use -h for help.\n");
+ return rc;
+ }
+ break;
+ case 's':
+ serialdev = strdup(argv[argi]);
+ break;
+ case 'b':
+ baudrate = atoi(argv[argi]);
+ break;
+ case 'E':
+ eeprom_name = strdup(argv[argi]);
+ break;
+ case 'F':
+ futln = strdup(argv[argi]);
+ break;
+ case OPT_SICHERUNG:
+ sicherung = strdup(argv[argi]);
+ break;
+ case OPT_KARTEN:
+ karten = strdup(argv[argi]);
+ break;
+ case OPT_SONDER:
+ sonder = strdup(argv[argi]);
+ break;
+ case OPT_WARTUNG:
+ wartung = strdup(argv[argi]);
+ break;
+ case 'P':
+ pin = strdup(argv[argi]);
+ break;
+ case 'D':
+ if (dir_count == MAX_DIR_COUNT)
+ break;
+ dir_location[dir_count] = atoi(argv[argi + 0]);
+ dir_number[dir_count] = strdup(argv[argi + 1]);
+ dir_name[dir_count] = strdup(argv[argi + 2]);
+ dir_count++;
+ break;
+ case 'A':
+ auth = strdup(argv[argi]);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 1;
+}
+
+/* EERPOM emulation */
+
+static uint8_t eeprom[2048];
+
+uint8_t eeprom_read(enum eeprom_locations loc)
+{
+ if (loc >= sizeof(eeprom))
+ abort();
+
+ return eeprom[loc];
+}
+
+void eeprom_write(enum eeprom_locations loc, uint8_t value)
+{
+ if (loc >= sizeof(eeprom))
+ abort();
+
+ eeprom[loc] = value;
+}
+
+uint8_t *eeprom_memory(void)
+{
+ return eeprom;
+}
+
+size_t eeprom_length(void)
+{
+ return sizeof(eeprom);
+}
+
+/* main loop for interfacing serial with sim / sniffer */
+
+int main_loop(serial_t *serial, int sniffer)
+{
+ int rc, cts = 0, last_cts = 0;
+ uint8_t byte;
+ int skip_bytes = 0;
+ int work = 0;
+
+ struct timeval tv;
+ double now, timer = 0;
+
+ quit = 0;
+
+ while (!quit) {
+ gettimeofday(&tv, NULL);
+ now = (double)tv.tv_usec * 0.000001 + tv.tv_sec;
+
+ /* only check CTS when no work was done
+ * this is because USB query may take some time
+ * and we don't want to block transfer
+ */
+ if (!work) {
+ cts = serial_cts(serial);
+ /* initally AND when CTS becomes 1 (pulled to low by reset line) */
+ if (last_cts != cts) {
+ if (sniffer == 1)
+ sniffer_reset(&sim_sniffer);
+ else
+ sim_reset(&sim_sim, cts);
+ timer = 0;
+ }
+ last_cts = cts;
+ }
+ work = 0;
+
+ if (sniffer == 0) {
+ rc = sim_tx(&sim_sim);
+ if (rc >= 0) {
+ byte = rc;
+ serial_write(serial, &byte, 1);
+ work = 1;
+ skip_bytes++;
+ }
+ }
+
+ rc = serial_read(serial, &byte, 1);
+ if (rc > 0)
+ work = 1;
+ /* ignore while reset is low */
+ if (cts)
+ continue;
+ if (rc == 1) {
+ timer = now;
+ /* count length, to remove echo from transmission */
+ if (!skip_bytes) {
+ if (sniffer == 1)
+ sniffer_rx(&sim_sniffer, byte);
+ else
+ sim_rx(&sim_sim, byte);
+ } else {
+ /* done eliminating TX data, so we reset timer */
+ if (--skip_bytes == 0)
+ timer = 0;
+ }
+ } else {
+ rc = -1;
+ if (timer && now - timer > 12.0 * 5.0 / (double)baudrate) {
+ if (sniffer == 1)
+ sniffer_timeout(&sim_sniffer);
+ else
+ sim_timeout(&sim_sim);
+ timer = 0;
+ skip_bytes = 0;
+ }
+ }
+
+ if (!work) {
+ /* sleep some time if nothing was received */
+ usleep(100);
+ }
+ }
+
+ return quit;
+}
+
+void sighandler(int sigset)
+{
+ if (sigset == SIGHUP)
+ return;
+ if (sigset == SIGPIPE)
+ return;
+
+ printf("Signal received: %d\n", sigset);
+
+ quit = -1;
+}
+
+int main(int argc, char *argv[])
+{
+ const char *home;
+ char eeprom_file[128];
+ FILE *fp;
+ serial_t *serial = NULL;
+ uint8_t ebdt_data[9];
+ int rc, argi;
+ int sniffer = 0;
+ int i;
+
+ debuglevel = DEBUG_INFO;
+
+ add_options();
+ rc = options_config_file("~/.osmocom/analog/sim.conf", handle_options);
+ if (rc < 0)
+ return 0;
+
+ rc = sim_init_eeprom();
+ if (rc < 0)
+ return rc;
+
+ /* parse command line */
+ argi = options_command_line(argc, argv, handle_options);
+ if (argi <= 0)
+ return argi;
+
+ /* read from eeprom file, if defined and exists */
+ if (eeprom_name) {
+ /* open config file */
+ home = getenv("HOME");
+ if (home == NULL)
+ return 1;
+ sprintf(eeprom_file, "%s/.osmocom/analog/sim_%s.eeprom", home, eeprom_name);
+
+ fp = fopen(eeprom_file, "r");
+ if (fp) {
+ rc = fread(eeprom_memory(), eeprom_length(), 1, fp);
+ fclose(fp);
+ } else
+ PDEBUG(DOPTIONS, DEBUG_INFO, "EEPROM file '%s' does not exist yet.\n", eeprom_file);
+
+ }
+
+ /* check version */
+ if (eeprom_read(EEPROM_MAGIC + 0) != 'C' || eeprom_read(EEPROM_MAGIC + 1) != '0' + EEPROM_VERSION) {
+ PDEBUG(DOPTIONS, DEBUG_ERROR, "EEPROM file '%s' is not compatible with this version of program, please remove it!\n", eeprom_file);
+ return 1;
+ }
+
+ /* apply config to eeprom, if defined */
+ ebdt_data[0] = eeprom_read(EEPROM_FUTLN_H);
+ ebdt_data[1] = eeprom_read(EEPROM_FUTLN_M);
+ ebdt_data[2] = eeprom_read(EEPROM_FUTLN_L);
+ ebdt_data[3] = eeprom_read(EEPROM_SICH_H);
+ ebdt_data[4] = eeprom_read(EEPROM_SICH_L);
+ ebdt_data[5] = eeprom_read(EEPROM_SONDER_H);
+ ebdt_data[6] = eeprom_read(EEPROM_SONDER_L);
+ ebdt_data[7] = eeprom_read(EEPROM_WARTUNG_H);
+ ebdt_data[8] = eeprom_read(EEPROM_WARTUNG_L);
+ rc = encode_ebdt(ebdt_data, futln, sicherung, karten, sonder, wartung);
+ if (rc < 0)
+ return 0;
+ eeprom_write(EEPROM_FUTLN_H, ebdt_data[0]);
+ eeprom_write(EEPROM_FUTLN_M, ebdt_data[1]);
+ eeprom_write(EEPROM_FUTLN_L, ebdt_data[2]);
+ eeprom_write(EEPROM_SICH_H, ebdt_data[3]);
+ eeprom_write(EEPROM_SICH_L, ebdt_data[4]);
+ eeprom_write(EEPROM_SONDER_H, ebdt_data[5]);
+ eeprom_write(EEPROM_SONDER_L, ebdt_data[6]);
+ eeprom_write(EEPROM_WARTUNG_H, ebdt_data[7]);
+ eeprom_write(EEPROM_WARTUNG_L, ebdt_data[8]);
+ if (pin) {
+ if (strlen(pin) < 4 || strlen(pin) > 8) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given PIN '%s' has invalid length. (Must be 4 .. 8)\n", pin);
+ return 0;
+ }
+ eeprom_write(EEPROM_FLAGS, (strlen(pin) << EEPROM_FLAG_PIN_LEN) | (MAX_PIN_TRY << EEPROM_FLAG_PIN_TRY));
+ for (i = 0; i < (int)strlen(pin); i++)
+ eeprom_write(EEPROM_PIN_DATA + i, pin[i]);
+ }
+ for (i = 0; i < dir_count; i++) {
+ uint8_t data[24];
+ rc = encode_directory(data, dir_number[i], dir_name[i]);
+ if (rc < 0)
+ return 0;
+ rc = save_directory(dir_location[i], data);
+ if (rc < 0)
+ return 0;
+ }
+ if (auth) {
+ uint64_t value = strtoull(auth, NULL, 0);
+ for (i = 0; i < 8; i++)
+ eeprom_write(EEPROM_AUTH_DATA, value >> (8 * (7 - i)));
+ }
+
+ if (argi >= argc) {
+ fprintf(stderr, "Expecting command, use '-h' for help!\n");
+ return 0;
+ } else if (!strcmp(argv[argi], "sniff")) {
+ sniffer = 1;
+ } else if (!strcmp(argv[argi], "sim")) {
+ sniffer = 0;
+ } else {
+ print_help(argv[0]);
+ return -EINVAL;
+ }
+
+ /* open serial device */
+ serial = serial_open(serialdev, baudrate, 8, 'e', 2, 'd', 'd', 0, 1.0, 0.0);
+ if (!serial) {
+ printf("Serial failed: %s\n", serial_errnostr);
+ goto error;
+ }
+
+ if (sniffer == 1)
+ printf("SIM analyzer ready, please start the phone!\n");
+ else {
+ char temp[5][16];
+ print_image();
+ decode_ebdt(ebdt_data, temp[0], temp[1], temp[2], temp[3], temp[4]);
+ printf("FUTLN=%s, Sicherungscode=%s, Kartekennung=%s, Sonderheitenschluessel=%s, Wartungsschluessel=%s\n", temp[0], temp[1], temp[2], temp[3], temp[4]);
+ for (i = 0; i < 8; i++)
+ temp[0][i] = eeprom_read(EEPROM_PIN_DATA + i);
+ temp[0][(eeprom_read(EEPROM_FLAGS) >> EEPROM_FLAG_PIN_LEN) & 0xf] = '\0';
+ uint64_t auth_value = 0;
+ for (i = 0; i < 8; i++)
+ auth_value |= eeprom_read(EEPROM_AUTH_DATA + i) << (8 * (7 - i));
+ printf("PIN=%s, auth response=0x%016" PRIx64 "\n", temp[0], auth_value);
+ printf("Telephone directory has %d entries.\n", directory_size() - 1);
+ for (i = 0; i < directory_size() - 1; i++) {
+ uint8_t data[24];
+ char number[32], name[32];
+ load_directory(i + 1, data);
+ decode_directory(data, number, name);
+ if (number[0])
+ printf(" -> %02d %16s %s\n", i + 1, number, name);
+ }
+ printf("SIM emulator ready, please start the phone!\n");
+ }
+
+ /* catch signals */
+ signal(SIGINT, sighandler);
+ signal(SIGHUP, sighandler);
+ signal(SIGTERM, sighandler);
+ signal(SIGPIPE, sighandler);
+
+ /* run main loop until terminated by user */
+ main_loop(serial, sniffer);
+
+ /* reset signals */
+ signal(SIGINT, SIG_DFL);
+ signal(SIGHUP, SIG_DFL);
+ signal(SIGTERM, SIG_DFL);
+ signal(SIGPIPE, SIG_DFL);
+
+ /* write to eeprom file, if defined */
+ if (eeprom_name) {
+ fp = fopen(eeprom_file, "w");
+ if (fp) {
+ fwrite(eeprom_memory(), eeprom_length(), 1, fp);
+ fclose(fp);
+ PDEBUG(DOPTIONS, DEBUG_INFO, "EEPROM file '%s' written.\n", eeprom_file);
+ } else
+ PDEBUG(DOPTIONS, DEBUG_INFO, "EEPROM file '%s' cannot be written. (errno = %d)\n", eeprom_file, errno);
+ }
+
+error:
+ if (serial)
+ serial_close(serial);
+
+ return 0;
+}
+
+#endif /* ARDUINO */
diff --git a/src/sim/sim.c b/src/sim/sim.c
new file mode 100644
index 0000000..890e37b
--- /dev/null
+++ b/src/sim/sim.c
@@ -0,0 +1,1444 @@
+/* SIM card emulator
+ *
+ * (C) 2020 by Andreas Eversberg <jolly@eversberg.eu>
+ * All Rights Reserved
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+#include <errno.h>
+#ifndef ARDUINO
+#include "../libdebug/debug.h"
+#endif
+#include "sim.h"
+#include "eeprom.h"
+
+#ifdef ARDUINO
+#define PDEBUG(cat, level, fmt, arg...) while(0)
+#define EINVAL 22
+static uint32_t my_strtoul(const char *nptr, char **endptr, int base)
+{
+ uint32_t number = 0;
+
+ while (*nptr >= '0' && *nptr <= '9')
+ number = number * 10 + (*nptr++ - '0');
+
+ return number;
+}
+#else
+#define my_strtoul strtoul
+#endif
+
+static void my_ultostr(char *nptr, uint32_t value, int zeros)
+{
+ int digits = 0;
+ uint32_t temp;
+
+ /* count digits */
+ temp = value;
+ while (temp) {
+ temp /= 10;
+ digits++;
+ }
+
+ /* minium digits to fill up with '0' */
+ if (digits < zeros)
+ digits = zeros;
+
+ /* go to end and terminate */
+ nptr += digits;
+ *nptr-- = '\0';
+
+ /* apply digits backwards */
+ while (digits--) {
+ *nptr-- = (value % 10) + '0';
+ value /= 10;
+ }
+}
+
+static void tx_sdu(sim_sim_t *sim, uint8_t ccrc, uint8_t *data, int length);
+static void tx_pdu(sim_sim_t *sim, uint8_t *data, int length);
+static void tx_block(sim_sim_t *sim, enum l2_cmd cmd, uint8_t *data, int length);
+
+/* read flags from eeprom */
+static void read_flags(sim_sim_t *sim)
+{
+ uint8_t flags;
+
+ flags = eeprom_read(EEPROM_FLAGS);
+ sim->pin_len = (flags >> EEPROM_FLAG_PIN_LEN) & 0xf;
+ sim->pin_try = (flags >> EEPROM_FLAG_PIN_TRY) & 0x3;
+ if ((flags >> EEPROM_FLAG_GEBZ) & 0x1)
+ sim->gebz_locked = 1;
+ if ((flags >> EEPROM_FLAG_APP) & 0x1)
+ sim->app_locked = 1;
+}
+
+/* write flags to eeprom */
+static void write_flags(sim_sim_t *sim)
+{
+ uint8_t flags = 0;
+
+ flags |= sim->pin_len << EEPROM_FLAG_PIN_LEN;
+ flags |= sim->pin_try << EEPROM_FLAG_PIN_TRY;
+ if (sim->gebz_locked)
+ flags |= (1 << EEPROM_FLAG_GEBZ);
+ if (sim->app_locked)
+ flags |= (1 << EEPROM_FLAG_APP);
+ eeprom_write(EEPROM_FLAGS, flags);
+}
+
+/* encode EBDT from strings */
+int encode_ebdt(uint8_t *data, const char *futln, const char *sicherung, const char *karten, const char *sonder, const char *wartung)
+{
+ uint32_t temp;
+ int i;
+
+ if (futln) {
+ temp = strlen(futln);
+ if (temp < 7 || temp > 8) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given FUTLN '%s' invalid length. (Must be 7 or 8 Digits)\n", futln);
+ return -EINVAL;
+ }
+ if (futln[0] < '0' || futln[0] > '7') {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given FUTLN '%s' has invalid first digit. (Must be '0' .. '7')\n", futln);
+ return -EINVAL;
+ }
+ data[0] = (futln[0] - '0') << 5;
+ futln++;
+ if (temp == 8) {
+ /* 8 digits */
+ temp = (futln[0] - '0') * 10 + (futln[1] - '0');
+ if (futln[0] < '0' || futln[0] > '9' || futln[1] < '0' || futln[1] > '9' || temp > 31) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given FUTLN '%s' has invalid second and third digit. (Must be '00' .. '31')\n", futln);
+ return -EINVAL;
+ }
+ data[0] |= temp;
+ futln += 2;
+ } else {
+ /* 7 digits */
+ if (futln[0] < '0' || futln[0] > '9') {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given FUTLN '%s' has invalid second digit. (Must be '0' .. '9')\n", futln);
+ return -EINVAL;
+ }
+ data[0] |= (futln[0] - '0');
+ futln++;
+ }
+ for (i = 0; i < 5; i++) {
+ if (futln[i] < '0' || futln[i] > '9')
+ break;
+ }
+ temp = my_strtoul(futln, NULL, 0);
+ if (i < 5 || temp > 65535) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given FUTLN '%s' has invalid last digits. (Must be '00000' .. '65535')\n", futln);
+ return -EINVAL;
+ }
+ data[1] = temp >> 8;
+ data[2] = temp;
+ }
+
+ if (sicherung) {
+ temp = my_strtoul(sicherung, NULL, 0);
+ if (temp > 65535) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given security code '%s' has invalid digits. (Must be '0' .. '65535')\n", sicherung);
+ return -EINVAL;
+ }
+ data[3] = temp >> 8;
+ data[4] = temp;
+ }
+
+ if (karten) {
+ temp = my_strtoul(karten, NULL, 0);
+ if (temp > 7) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given card number '%s' has invalid digit. (Must be '0' .. '7')\n", karten);
+ return -EINVAL;
+ }
+ data[5] = (data[5] & 0x1f) | ((karten[0] - '0') << 5);
+ }
+
+ if (sonder) {
+ temp = my_strtoul(sonder, NULL, 0);
+ if (temp > 8191) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given spacial code '%s' has invalid digits. (Must be '0' .. '8191')\n", sonder);
+ return -EINVAL;
+ }
+ data[5] = (data[5] & 0xe0) | (temp >> 8);
+ data[6] = temp;
+ }
+
+ if (wartung) {
+ temp = my_strtoul(wartung, NULL, 0);
+ if (temp > 65535) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given maintenance code '%s' has invalid digits. (Must be '0' .. '65535')\n", wartung);
+ return -EINVAL;
+ }
+ data[7] = temp >> 8;
+ data[8] = temp;
+ }
+
+ return 0;
+}
+
+/* convert EBDT to string */
+void decode_ebdt(uint8_t *data, char *futln, char *sicherung, char *karten, char *sonder, char *wartung)
+{
+ if (futln) {
+ /* second value becomes two digits automatically, if > 9 */
+ my_ultostr(futln++, data[0] >> 5, 1);
+ my_ultostr(futln++, data[0] & 0x1f, 1);
+ if (*futln)
+ futln++;
+ my_ultostr(futln, ((uint16_t)data[1] << 8) | (uint16_t)data[2], 5);
+ }
+
+ if (sicherung)
+ my_ultostr(sicherung, ((uint16_t)data[3] << 8) | (uint16_t)data[4], 1);
+
+ if (karten)
+ my_ultostr(karten, data[5] >> 5, 1);
+
+ if (sonder)
+ my_ultostr(sonder, ((uint16_t)(data[5] & 0x1f) << 8) | (uint16_t)data[6], 1);
+
+ if (wartung)
+ my_ultostr(wartung, ((uint16_t)data[7] << 8) | (uint16_t)data[8], 1);
+}
+
+/* get size of phone directory (including allocation map) */
+int directory_size(void)
+{
+ /* get size from space in eeprom */
+ int size = (eeprom_length() - EEPROM_RUFN) / 24;
+
+ /* may have 184 entries (23*8) plus allocation map (entry 0) */
+ if (size > 184 + 1)
+ size = 184 + 1;
+
+ return size;
+}
+
+/* store one phone number in the directory; also set allocation mask) */
+int save_directory(int location, uint8_t *data)
+{
+ int size, i, pos;
+ uint8_t mask;
+
+ size = directory_size();
+ if (location < 1 || location >= size) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given location for phone number '%d' is out of range. (Must be '01' .. '%02d')\n", location, size - 1);
+ return -EINVAL;
+ }
+
+ /* store entry */
+ for (i = 0; i < 24; i++)
+ eeprom_write(EEPROM_RUFN + 24 * location + i, data[i]);
+ /* set bit mask */
+ pos = EEPROM_RUFN + 1 + ((location - 1) >> 3);
+ mask = eeprom_read(pos);
+ if ((data[7] & 0xf) == 0xf)
+ mask |= (0x80 >> ((location - 1) & 7));
+ else
+ mask &= ~(0x80 >> ((location - 1) & 7));
+ eeprom_write(pos, mask);
+
+ return 0;
+}
+
+/* load one phone number from the directory; location 0 is the allocation mask) */
+void load_directory(int location, uint8_t *data)
+{
+ int i;
+
+ for (i = 0; i < 24; i++)
+ data[i] = eeprom_read(EEPROM_RUFN + 24 * location + i);
+ /* set directory size, on allocation map */
+ if (location == 0)
+ data[0] = directory_size() - 1;
+}
+
+/* encode number an name into directory data */
+int encode_directory(uint8_t *data, const char *number, const char *name)
+{
+ int len, pos, i;
+
+ len = strlen(number);
+ if (len > 16) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given phone number '%s' has too many digits. (Must be <= 16)\n", number);
+ return -EINVAL;
+ }
+
+ memset(data, 0xff, 8);
+ memset(data + 8, ' ', 16);
+ for (i = 0; i < len; i++) {
+ if (number[i] < '0' || number[i] > '9') {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Given phone number '%s' has illegal digits. (Must be '0' .. '9')\n", number);
+ return -EINVAL;
+ }
+ pos = 16 - len + i;
+ if ((pos & 1) == 0)
+ data[pos >> 1] += ((number[i] - '0') << 4) - 0xf0;
+ else
+ data[pos >> 1] += number[i] - '0' - 0xf;
+ }
+ len = strlen(name);
+ if (len > 16)
+ len = 16;
+ for (i = 0; i < len; i++) {
+ pos = 8 + i;
+ data[pos] = name[i];
+ }
+
+ return 0;
+}
+
+void decode_directory(uint8_t *data, char *number, char *name)
+{
+ int i, j;
+ char digit;
+
+ if (number) {
+ j = 0;
+ for (i = 0; i < 16; i++) {
+ if ((i & 1) == 0)
+ digit = (data[i >> 1] >> 4) + '0';
+ else
+ digit = (data[i >> 1] & 0xf) + '0';
+ if (digit <= '9')
+ number[j++] = digit;
+ /* stop if we have digit=0xf (end of line) */
+ if (digit == 0xf)
+ break;
+ }
+ number[j] = '\0';
+ }
+
+ if (name) {
+ memcpy(name, data + 8, 16);
+ name[16] = '\0';
+ /* remove spaces in the end of the string */
+ for (i = 16 - 1; i >= 0; i--) {
+ if (name[i] != ' ')
+ break;
+ name[i] = '\0';
+ }
+ }
+}
+
+/* get APRC of NETZ-C application */
+static uint8_t get_aprc(sim_sim_t *sim)
+{
+ uint8_t aprc = 0x00;
+
+ if (sim->pin_required)
+ aprc |= APRC_PIN_REQ;
+ if (sim->app_locked)
+ aprc |= APRC_APP_LOCKED;
+ if (sim->gebz_locked)
+ aprc |= APRC_GEBZ_LOCK;
+ if (sim->gebz_full)
+ aprc |= APRC_GEBZ_FULL;
+
+ return aprc;
+}
+
+/* validate PIN and change states */
+static int validate_pin(sim_sim_t *sim, uint8_t *data, int length)
+{
+ uint8_t valid = 0, program_mode = 0;
+ int i;
+
+ if (!sim->pin_required)
+ return 0;
+
+ /* no PIN mode */
+ if (length == 4 && data[0] == '0' && data[1] == '0' && data[2] == '0' && data[3] >= '0' && data[3] <= '0' + MAX_CARDS) {
+ valid = 1;
+ if (data[3] > '0')
+ sim->card = data[3] - '1';
+ PDEBUG(DSIM1, DEBUG_INFO, "System PIN '000%c' entered. Selecting card #%d.\n", data[3], sim->card + 1);
+ }
+
+ /* programming mode */
+ if (length == 4 && data[0] == '9' && data[1] == '9' && data[2] == '9' && data[3] >= '0' && data[3] <= '0' + MAX_CARDS) {
+ program_mode = 1;
+ valid = 1;
+ if (data[3] > '0')
+ sim->card = data[3] - '1';
+ PDEBUG(DSIM1, DEBUG_INFO, "Configuration PIN '999%c' entered. Selecting card #%d in configuration mode.\n", data[3], sim->card + 1);
+ }
+
+ /* if not 'program mode' and PIN matches EEPROM */
+ if (!valid && length == sim->pin_len) {
+ for (i = 0; i < length; i++) {
+ if (data[i] != eeprom_read(EEPROM_PIN_DATA + i))
+ break;
+ }
+ if (i == length) {
+ valid = 1;
+ PDEBUG(DSIM1, DEBUG_INFO, "Correct PIN was entered. Selecting card #%d.\n", sim->card + 1);
+ }
+ }
+
+ if (valid) {
+ /* prevent permanent write when not needed */
+ if (sim->pin_try != MAX_PIN_TRY) {
+ sim->pin_try = MAX_PIN_TRY;
+ write_flags(sim);
+ }
+ sim->pin_required = 0;
+ if (program_mode)
+ sim->program_mode = 1;
+ return 0;
+ } else {
+ PDEBUG(DSIM1, DEBUG_INFO, "Wrong PIN was entered.\n");
+#ifndef ARDUINO
+ /* decrement error counter */
+ if (sim->pin_try) {
+ sim->pin_try--;
+ write_flags(sim);
+ }
+#endif
+ return -EINVAL;
+ }
+}
+
+/* message buffer handling */
+
+/* get space for return message */
+uint8_t *alloc_msg(sim_sim_t *sim, int size)
+{
+ /* we add 4, because we push 4 bytes (ICL and L2 header later) */
+ if (size + 4 > (int)sizeof(sim->block_tx_data))
+ PDEBUG(DSIM1, DEBUG_NOTICE, "TX buffer overflow: size+4=%d > buffer size (%d)\n", size + 4, (int)sizeof(sim->block_tx_data));
+ return sim->block_tx_data;
+}
+
+/* push space in front of a message */
+uint8_t *push_msg(uint8_t *data, int length, int offset)
+{
+ int i;
+
+ for (i = length - 1; i >= 0; --i)
+ data[i + offset] = data[i];
+
+ return data;
+}
+
+/* Layer 7 */
+
+static void return_error(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, CCRC_ERROR, data, 0);
+}
+
+static void return_pin_not_ok(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, CCRC_PIN_NOK, data, 0);
+}
+
+/* command: open application */
+static void sl_appl(sim_sim_t *sim, uint8_t *data, int length)
+{
+ uint8_t app;
+
+ if (length < 11) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "SL-APPL too short\n");
+ return_error(sim);
+ return;
+ }
+
+ /* application number */
+ app = (data[6] - '0') * 100;
+ app += (data[7] - '0') * 10;
+ app += data[8] - '0';
+
+ PDEBUG(DSIM7, DEBUG_INFO, " SL-APPL app %d\n", app);
+
+ /* check and set application */
+ if (app != APP_NETZ_C && app != APP_RUFN_GEBZ) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "SL-APPL invalid app %d\n", sim->app);
+ return_error(sim);
+ return;
+ }
+ sim->app = app;
+
+ /* if PIN is required, we request it, but we've already selected the app */
+ if (sim->pin_required) {
+ return_pin_not_ok(sim);
+ return;
+ }
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: close application */
+static void cl_appl(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " CL-APPL\n");
+
+ /* remove app */
+ sim->app = 0;
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: show application */
+static void sh_appl(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " SH-APPL\n");
+
+ /* respond */
+ data = alloc_msg(sim, 33);
+ switch (sim->sh_appl_count) {
+ case 0: // first application is shown
+ /* L */
+ data[0] = 11;
+ /* APP-IDN */
+ data[1] = '8'; data[2] = '9';
+ data[3] = '4'; data[4] = '9';
+ data[5] = '0'; data[6] = '1';
+ data[7] = '0'; data[8] = '0'; data[9] = '3';
+ data[10] = '0'; data[11] = '1';
+ /* APP-TXT */
+ memcpy(data + 12, "Netz C ", 20);
+ /* APP-STS */
+ data[32] = get_aprc(sim);
+ tx_sdu(sim, 0, data, 33);
+ sim->sh_appl_count++;
+ break;
+ default: // no more application
+ tx_sdu(sim, 0, data, 0);
+ sim->sh_appl_count = 0;
+ }
+}
+
+/* command: show state of chip card */
+static void chk_kon(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " CHK-KON\n");
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: read subscriber data */
+static void rd_ebdt(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " RD-EBDT\n");
+
+ /* respond */
+ data = alloc_msg(sim, 9);
+ if (sim->program_mode) {
+ /* SERVICE MODE */
+ data[0] = 0;
+ data[1] = 0;
+ data[2] = sim->card + 1;
+ data[3] = 12345 >> 8;
+ data[4] = 12345 & 0xff;
+ data[5] = 3 << 5;
+ data[6] = 0;
+ data[7] = 0x0ff;
+ data[8] = 0x0ff;
+ } else {
+ data[0] = eeprom_read(EEPROM_FUTLN_H + sim->card);
+ data[1] = eeprom_read(EEPROM_FUTLN_M + sim->card);
+ data[2] = eeprom_read(EEPROM_FUTLN_L + sim->card);
+ data[3] = eeprom_read(EEPROM_SICH_H + sim->card);
+ data[4] = eeprom_read(EEPROM_SICH_L + sim->card);
+ data[5] = eeprom_read(EEPROM_SONDER_H + sim->card);
+ data[6] = eeprom_read(EEPROM_SONDER_L + sim->card);
+ data[7] = eeprom_read(EEPROM_WARTUNG_H + sim->card);
+ data[8] = eeprom_read(EEPROM_WARTUNG_L + sim->card);
+ }
+ tx_sdu(sim, 0, data, 9);
+}
+
+/* command: read phone directory */
+static void rd_rufn(sim_sim_t *sim, uint8_t *data, int length)
+{
+ uint8_t rufn = data[0];
+ int size;
+
+ if (length < 1) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "RD_RUFN too short\n");
+ return_error(sim);
+ return;
+ }
+
+ PDEBUG(DSIM7, DEBUG_INFO, " RD-RUFN (loc=%d)\n", rufn);
+
+ /* SERVICE MODE */
+ if (sim->program_mode) {
+ char number[16];
+
+ /* respond */
+ data = alloc_msg(sim, 24);
+ switch (rufn) {
+ case 0: /* send bitmap for service mode */
+ memset(data, 0xff, 24);
+ data[0] = 5; /* 5 entries */
+ data[1] = 0x07; /* upper 5 bits = 0 */
+ break;
+ case 1: /* FUTLN */
+ data[0] = eeprom_read(EEPROM_FUTLN_H + sim->card);
+ data[1] = eeprom_read(EEPROM_FUTLN_M + sim->card);
+ data[2] = eeprom_read(EEPROM_FUTLN_L + sim->card);
+ decode_ebdt(data, number, NULL, NULL, NULL, NULL);
+ encode_directory(data, number, "FUTLN");
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: FUTLN = %s\n", number);
+ break;
+ case 2: /* security code */
+ data[3] = eeprom_read(EEPROM_SICH_H + sim->card);
+ data[4] = eeprom_read(EEPROM_SICH_L + sim->card);
+ decode_ebdt(data, NULL, number, NULL, NULL, NULL);
+ encode_directory(data, number, "Sicherungscode");
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: security = %s\n", number);
+ break;
+ case 3: /* card ID */
+ data[5] = eeprom_read(EEPROM_SONDER_H + sim->card);
+ decode_ebdt(data, NULL, NULL, number, NULL, NULL);
+ encode_directory(data, number, "Kartenkennung");
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: card = %s\n", number);
+ break;
+ case 4: /* special key */
+ data[5] = eeprom_read(EEPROM_SONDER_H + sim->card);
+ data[6] = eeprom_read(EEPROM_SONDER_L + sim->card);
+ decode_ebdt(data, NULL, NULL, NULL, number, NULL);
+ encode_directory(data, number, "Sonderheitsschl.");
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: special = %s\n", number);
+ break;
+ case 5: /* maintenance key */
+ data[7] = eeprom_read(EEPROM_WARTUNG_H + sim->card);
+ data[8] = eeprom_read(EEPROM_WARTUNG_L + sim->card);
+ decode_ebdt(data, NULL, NULL, NULL, NULL, number);
+ encode_directory(data, number, "Wartungsschl.");
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: maintenance = %s\n", number);
+ break;
+ }
+ tx_sdu(sim, 0, data, 24);
+ return;
+ }
+
+ size = directory_size();
+ /* first entry (0) is used as allocation map */
+ PDEBUG(DSIM7, DEBUG_INFO, " %d numbers can be stored in EEPROM\n", size - 1);
+ if (rufn >= size) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "RD_RUFN entry #%d out of range\n", rufn);
+ return_error(sim);
+ return;
+ }
+
+ /* respond */
+ data = alloc_msg(sim, 24);
+ load_directory(rufn, data);
+ tx_sdu(sim, 0, data, 24);
+}
+
+/* command: write phone directory */
+static void wt_rufn(sim_sim_t *sim, uint8_t *data, int length)
+{
+ uint8_t rufn = data[0];
+
+ if (length < 25) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "WT_RUFN too short\n");
+ return_error(sim);
+ return;
+ }
+
+ PDEBUG(DSIM7, DEBUG_INFO, " WT-RUFN (loc=%d)\n", rufn);
+
+ /* SERVICE MODE */
+ if (sim->program_mode) {
+ int rc;
+ char number[17];
+
+ decode_directory(data + 1, number, NULL);
+ /* if number is cleared (no digits), we ignore that */
+ if (number[0] == '\0')
+ goto respond;
+ switch (rufn) {
+ case 1: /* FUTLN */
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: FUTLN = %s\n", number);
+ rc = encode_ebdt(data, number, NULL, NULL, NULL, NULL);
+ if (rc < 0)
+ break;
+ eeprom_write(EEPROM_FUTLN_H + sim->card, data[0]);
+ eeprom_write(EEPROM_FUTLN_M + sim->card, data[1]);
+ eeprom_write(EEPROM_FUTLN_L + sim->card, data[2]);
+ break;
+ case 2: /* security code */
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: security = %s\n", number);
+ rc = encode_ebdt(data, NULL, number, NULL, NULL, NULL);
+ if (rc < 0)
+ break;
+ eeprom_write(EEPROM_SICH_H + sim->card, data[3]);
+ eeprom_write(EEPROM_SICH_L + sim->card, data[4]);
+ break;
+ case 3: /* card ID */
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: card = %s\n", number);
+ data[5] = eeprom_read(EEPROM_SONDER_H + sim->card);
+ rc = encode_ebdt(data, NULL, NULL, number, NULL, NULL);
+ if (rc < 0)
+ break;
+ eeprom_write(EEPROM_SONDER_H + sim->card, data[5]);
+ break;
+ case 4: /* special key */
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: special = %s\n", number);
+ data[5] = eeprom_read(EEPROM_SONDER_H + sim->card);
+ rc = encode_ebdt(data, NULL, NULL, NULL, number, NULL);
+ if (rc < 0)
+ break;
+ eeprom_write(EEPROM_SONDER_H + sim->card, data[5]);
+ eeprom_write(EEPROM_SONDER_L + sim->card, data[6]);
+ break;
+ case 5: /* maintenance key */
+ PDEBUG(DSIM7, DEBUG_INFO, "service mode: maintenance = %s\n", number);
+ rc = encode_ebdt(data, NULL, NULL, NULL, NULL, number);
+ if (rc < 0)
+ break;
+ eeprom_write(EEPROM_WARTUNG_H + sim->card, data[7]);
+ eeprom_write(EEPROM_WARTUNG_L + sim->card, data[8]);
+ break;
+ }
+ /* respond */
+ goto respond;
+ }
+
+ if (rufn >= directory_size() || rufn < 1) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "WT_RUFN entry #%d out of range\n", rufn);
+ return_error(sim);
+ return;
+ }
+
+ save_directory(data[0], data + 1);
+
+ /* respond */
+respond:
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: check PIN (enter PIN and unlock) */
+static void chk_pin(sim_sim_t *sim, uint8_t *data, int length)
+{
+ int rc;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " CHK-PIN\n");
+
+ if (length < 4 || length > 8) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "SET-PIN wrong length: %d\n", length);
+ return_error(sim);
+ return;
+ }
+
+ /* validate PIN */
+ rc = validate_pin(sim, data, length);
+ if (rc) {
+ return_pin_not_ok(sim);
+ return;
+ }
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: set PIN */
+static void set_pin(sim_sim_t *sim, uint8_t *data, int length)
+{
+ uint8_t len_old, len_new;
+ uint8_t *pin_old, *pin_new;
+ int i;
+ int rc;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " SET-PIN\n");
+
+ if (length < 1) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "SET-PIN too short\n");
+ return_error(sim);
+ return;
+ }
+
+ len_old = data[0];
+ pin_old = data + 1;
+ len_new = length - len_old - 1;
+ pin_new = data + 1 + len_old;
+ if (len_new < 4 || len_new > 8) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "New PIN wrong length %d!\n", len_new);
+ return_error(sim);
+ return;
+ }
+
+ /* validate PIN */
+ rc = validate_pin(sim, pin_old, length);
+ if (rc) {
+ return_pin_not_ok(sim);
+ return;
+ }
+
+ /* write PIN */
+ sim->pin_len = len_new;
+ write_flags(sim);
+ for (i = 0; i < len_new; i++)
+ eeprom_write(EEPROM_PIN_DATA + i, pin_new[i]);
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: increment metering counter */
+static void eh_gebz(sim_sim_t *sim, uint8_t *data, int length)
+{
+ uint32_t gebz;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " EH-GEBZ\n");
+
+ if (length < 1) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "EH-GEBZ wrong length: %d\n", length);
+ return_error(sim);
+ return;
+ }
+
+ /* increment counter */
+ gebz = eeprom_read(EEPROM_GEBZ_H) << 16;
+ gebz |= eeprom_read(EEPROM_GEBZ_M) << 8;
+ gebz |= eeprom_read(EEPROM_GEBZ_L);
+ gebz += data[0];
+ eeprom_write(EEPROM_GEBZ_H, gebz >> 16);
+ eeprom_write(EEPROM_GEBZ_M, gebz >> 8);
+ eeprom_write(EEPROM_GEBZ_L, gebz);
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: clear metering counter */
+static void cl_gebz(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " CL-GEBZ\n");
+
+ /* clear counter */
+ eeprom_write(EEPROM_GEBZ_H, 0);
+ eeprom_write(EEPROM_GEBZ_M, 0);
+ eeprom_write(EEPROM_GEBZ_L, 0);
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: read metering counter */
+static void rd_gebz(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " RD-GEBZ\n");
+
+ /* respond */
+ data = alloc_msg(sim, 3);
+ data[0] = eeprom_read(EEPROM_GEBZ_H);
+ data[1] = eeprom_read(EEPROM_GEBZ_M);
+ data[2] = eeprom_read(EEPROM_GEBZ_L);
+ tx_sdu(sim, 0, data, 3);
+}
+
+/* command: lock metering counter and directory */
+static void sp_gzrv(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " SP-GZRV\n");
+
+ sim->gebz_locked = 1;
+ write_flags(sim);
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: unlock metering counter and directory */
+static void fr_gzrv(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " FR-GZRV\n");
+
+ sim->gebz_locked = 0;
+ write_flags(sim);
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: authenticate */
+static void aut_1(sim_sim_t *sim)
+{
+ uint8_t *data;
+ int i;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " AUTH-1\n");
+
+ /* respond */
+ data = alloc_msg(sim, 1);
+ for (i = 0; i < 8; i++)
+ data[i] = eeprom_read(EEPROM_AUTH_DATA + i);
+ tx_sdu(sim, 0, data, 8);
+}
+
+/* command: UNKNOWN */
+static void rd_f4(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " RD-F4\n");
+
+ /* respond */
+ data = alloc_msg(sim, 2);
+ data[0] = 0x00;
+ data[1] = 0x13;
+ tx_sdu(sim, 0, data, 2);
+}
+
+/* command: UNKNOWN */
+static void rd_f5(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " RD-F5\n");
+
+ /* respond */
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, 0, data, 0);
+}
+
+/* command: UNKNOWN */
+static void rd_04(sim_sim_t *sim)
+{
+ uint8_t *data;
+
+ PDEBUG(DSIM7, DEBUG_INFO, " RD-04\n");
+
+ /* respond */
+ data = alloc_msg(sim, 25);
+ data[0] = 0x63;
+ memset(data + 1, 0x00, 24);
+ tx_sdu(sim, 0, data, 25);
+}
+
+/* parse layer 7 header */
+static void rx_sdu(sim_sim_t *sim, uint8_t *data, int length)
+{
+ uint8_t cla, ins, dlng;
+
+ if (length < 3) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "SDU too short\n");
+ return;
+ }
+
+ /* skip all responses, because we don't send commands */
+ if (*data & CCRC_IDENT) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Skipping SDU with response\n");
+ return;
+ }
+
+ /* read application layer header */
+ cla = *data++ & 0x7f;
+ ins = *data++;
+ dlng = *data++;
+ length -= 3;
+
+ /* check length */
+ if (dlng != length) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Skipping SDU with invalid length\n");
+ return;
+ }
+
+ /* select command */
+ switch (cla) {
+ case CLA_CNTR:
+ switch (ins) {
+ case SL_APPL: sl_appl(sim, data, length); return;
+ case CL_APPL: cl_appl(sim); return;
+ case SH_APPL: sh_appl(sim); return;
+ }
+ break;
+ case CLA_STAT:
+ switch (ins) {
+ case CHK_KON: chk_kon(sim); return;
+ }
+ break;
+ case CLA_WRTE:
+ switch (ins) {
+ case WT_RUFN: wt_rufn(sim, data, length); return;
+ }
+ break;
+ case CLA_READ:
+ switch (ins) {
+ case RD_EBDT: rd_ebdt(sim); return;
+ case RD_RUFN: rd_rufn(sim, data, length); return;
+ case RD_GEBZ: rd_gebz(sim); return;
+ case 0xf4: rd_f4(sim); return;
+ case 0xf5: rd_f5(sim); return;
+ case 0x04: rd_04(sim); return;
+ }
+ break;
+ case CLA_EXEC:
+ switch (ins) {
+ case CHK_PIN: chk_pin(sim, data, length); return;
+ case SET_PIN: set_pin(sim, data, length); return;
+ }
+ if (sim->app == APP_NETZ_C) switch (ins) {
+ case EH_GEBZ: eh_gebz(sim, data, length); return;
+ case CL_GEBZ: cl_gebz(sim); return;
+ }
+ if (sim->app == APP_RUFN_GEBZ) switch (ins) {
+ case SP_GZRV: sp_gzrv(sim); return;
+ case FR_GZRV: fr_gzrv(sim); return;
+ }
+ break;
+ case CLA_AUTO:
+ switch (ins) {
+ case AUT_1: aut_1(sim); return;
+ }
+ break;
+ }
+
+ /* unsupported message */
+ PDEBUG(DSIM7, DEBUG_NOTICE, "CLA 0x%02x INS 0x%02x uknown\n", cla, ins);
+ data = alloc_msg(sim, 0);
+ tx_sdu(sim, CCRC_ERROR, data, 0);
+}
+
+/* create layer 7 message for ICL layer */
+static void tx_sdu(sim_sim_t *sim, uint8_t ccrc, uint8_t *data, int length)
+{
+ /* header */
+ data = push_msg(data, length, 3);
+ data[0] = CCRC_IDENT | ccrc | CCRC_APRC_VALID;
+ data[1] = 0;
+ if (sim->pin_try == 0)
+ data[0] |= CCRC_AFBZ_NULL;
+ data[1] = get_aprc(sim);
+ data[2] = length;
+ length += 3;
+
+ /* forward to ICL layer */
+ tx_pdu(sim, data, length);
+}
+
+/* ICL layer */
+
+/* parse ICL header */
+static void rx_pdu(sim_sim_t *sim, uint8_t *data, int length)
+{
+ uint8_t ext = 1;
+
+ if (length < 1) {
+too_short:
+ PDEBUG(DSIMI, DEBUG_NOTICE, "PDU too short\n");
+ return;
+ }
+
+ /* read ICB1 */
+ sim->icl_online = (*data & ICB1_ONLINE) != 0;
+ sim->icl_master = (*data & ICB1_MASTER) != 0;
+ sim->icl_error = (*data & ICB1_ERROR) != 0;
+ sim->icl_chaining = (*data & ICB1_CHAINING) != 0;
+
+ /* skip all ICBx (should only one exist) */
+ while (ext) {
+ if (length < 1)
+ goto too_short;
+ ext = (*data++ & ICB_EXT) != 0;
+ length--;
+ }
+
+ rx_sdu(sim, data, length);
+}
+
+/* create ICL layer message for layer 2 */
+static void tx_pdu(sim_sim_t *sim, uint8_t *data, int length)
+{
+ /* header */
+ data = push_msg(data, length, 1);
+ data[0] = 0;
+ if (sim->icl_online)
+ data[0] |= ICB1_ONLINE;
+ if (!sim->icl_master)
+ data[0] |= ICB1_MASTER;
+ if (sim->icl_error)
+ data[0] |= ICB1_ERROR | ICB1_CONFIRM;
+ if (sim->icl_chaining)
+ data[0] |= ICB1_CHAINING | ICB1_CONFIRM;
+ length++;
+
+ tx_block(sim, L2_I, data, length);
+}
+
+/* Layer 2 */
+
+/* process received L2 message */
+static void rx_block(sim_sim_t *sim)
+{
+ uint8_t ns, nr;
+ uint8_t *data;
+
+ /* NOTE: This procedure is simplified, it does not comply with the specs. */
+
+ PDEBUG(DSIM2, DEBUG_INFO, "RX message\n");
+ sim->addr_src = sim->block_address >> 4;
+ sim->addr_dst = sim->block_address & 0xf;
+ if (sim->block_checksum != 0) {
+ PDEBUG(DSIM2, DEBUG_NOTICE, "Checksum error!\n");
+ goto reject;
+ }
+ if ((sim->block_control & 0x11) == 0x00) {
+ ns = (sim->block_control >> 1) & 7;
+ nr = sim->block_control >> 5;
+ PDEBUG(DSIM2, DEBUG_INFO, " control I: N(S)=%d N(R)=%d\n", ns, nr);
+ if (ns == sim->vr && nr == sim->vs) {
+ /* receive data */
+ sim->vr = (sim->vr + 1) & 0x7;
+ rx_pdu(sim, sim->block_rx_data, sim->block_rx_length);
+ return;
+ } else {
+ PDEBUG(DSIM2, DEBUG_NOTICE, "Seqeuence error!\n");
+reject:
+ /* reject (or send resync after 3 times) */
+ data = alloc_msg(sim, 0);
+ if (1) { // if (sim->reject_count < 3) {
+ tx_block(sim, L2_REJ, data, 0);
+ sim->reject_count++;
+ } else {
+ tx_block(sim, L2_RES, data, 0);
+ }
+ return;
+ }
+ return;
+ }
+ if ((sim->block_control & 0x1f) == 0x09) {
+ nr = sim->block_control >> 5;
+ PDEBUG(DSIM2, DEBUG_INFO, " control REJ: N(R)=%d\n", nr);
+ /* repeat last message */
+ if (sim->block_tx_length) {
+ tx_block(sim, L2_I, sim->block_tx_data, sim->block_tx_length);
+ return;
+ }
+ /* no block sent yet, sending resync */
+ data = alloc_msg(sim, 0);
+ tx_block(sim, L2_RES, data, 0);
+ return;
+ }
+ if (sim->block_control == 0xef) {
+ PDEBUG(DSIM2, DEBUG_INFO, " control RES\n");
+ sim->vr = sim->vs = 0;
+ sim->reject_count = 0;
+ if (sim->resync_sent == 0) {
+ /* resync */
+ data = alloc_msg(sim, 0);
+ tx_block(sim, L2_RES, data, 0);
+ return;
+ }
+ return;
+ }
+}
+
+/* receive data from layer 1 and create layer 2 message */
+static int rx_char(sim_sim_t *sim, uint8_t c)
+{
+ sim->block_checksum ^= c;
+
+ switch (sim->block_state) {
+ case BLOCK_STATE_ADDRESS:
+ sim->block_address = c;
+ sim->block_state = BLOCK_STATE_CONTROL;
+ sim->block_checksum = c;
+ return 0;
+ case BLOCK_STATE_CONTROL:
+ sim->block_control = c;
+ sim->block_state = BLOCK_STATE_LENGTH;
+ return 0;
+ case BLOCK_STATE_LENGTH:
+ if (c > sizeof(sim->block_rx_data)) {
+ c = sizeof(sim->block_rx_data);
+ PDEBUG(DSIM1, DEBUG_NOTICE, "RX buffer overflow: length=%d > buffer size (%d)\n", c, (int)sizeof(sim->block_rx_data));
+ }
+ sim->block_rx_length = c;
+ sim->block_count = 0;
+ sim->block_state = BLOCK_STATE_DATA;
+ return 0;
+ case BLOCK_STATE_DATA:
+ if (sim->block_count < sim->block_rx_length) {
+ sim->block_rx_data[sim->block_count++] = c;
+ return 0;
+ }
+ sim->l1_state = L1_STATE_IDLE;
+ rx_block(sim);
+ }
+
+ return -1;
+}
+
+/* create layer 2 message for layer 1 */
+static void tx_block(sim_sim_t *sim, enum l2_cmd cmd, uint8_t __attribute__((unused)) *data, int length)
+{
+ PDEBUG(DSIM2, DEBUG_INFO, "TX resonse\n");
+
+ /* header */
+ sim->block_address = (sim->addr_dst << 4) | sim->addr_src;
+ switch (cmd) {
+ case L2_I:
+ PDEBUG(DSIM2, DEBUG_INFO, " control I: N(S)=%d N(R)=%d\n", sim->vs, sim->vr);
+ sim->block_control = (sim->vr << 5) | (sim->vs << 1);
+ sim->vs = (sim->vs + 1) & 0x7;
+ sim->resync_sent = 0;
+ break;
+ case L2_REJ:
+ PDEBUG(DSIM2, DEBUG_INFO, " control REJ: N(R)=%d\n", sim->vr);
+ sim->block_control = (sim->vr << 5) | 0x09;
+ sim->resync_sent = 0;
+ break;
+ case L2_RES:
+ PDEBUG(DSIM2, DEBUG_INFO, " control RES\n");
+ sim->block_control = 0xef;
+ sim->resync_sent = 1;
+ break;
+ }
+ sim->block_tx_length = length;
+
+ sim->l1_state = L1_STATE_SEND;
+ sim->block_state = BLOCK_STATE_ADDRESS;
+}
+
+/* transmit character of current message to layer 1 */
+static uint8_t tx_char(sim_sim_t *sim)
+{
+ uint8_t c = -1;
+
+ switch (sim->block_state) {
+ case BLOCK_STATE_ADDRESS:
+ c = sim->block_address;
+ sim->block_state = BLOCK_STATE_CONTROL;
+ sim->block_checksum = 0;
+ break;
+ case BLOCK_STATE_CONTROL:
+ c = sim->block_control;
+ sim->block_state = BLOCK_STATE_LENGTH;
+ break;
+ case BLOCK_STATE_LENGTH:
+ c = sim->block_tx_length;
+ sim->block_count = 0;
+ sim->block_state = BLOCK_STATE_DATA;
+ break;
+ case BLOCK_STATE_DATA:
+ if (sim->block_count < sim->block_tx_length) {
+ c = sim->block_tx_data[sim->block_count++];
+ break;
+ }
+ c = sim->block_checksum;
+ sim->l1_state = L1_STATE_IDLE;
+ break;
+ }
+
+ sim->block_checksum ^= c;
+
+ return c;
+}
+
+/* ATR */
+
+static uint8_t atr[] = {
+ 0x3b, 0x88, /* TS, T0 */
+ 0x8e,
+ 0xfe,
+ 0x53, 0x2a, 0x03, 0x1e,
+ 0x04,
+ 0x92, 0x80, 0x00, 0x41, 0x32, 0x36, 0x01, 0x11,
+ 0xe4, /* TCK */
+};
+
+static uint8_t tx_atr(sim_sim_t *sim)
+{
+ uint8_t c;
+
+ c = atr[sim->atr_count++];
+ if (sim->atr_count == sizeof(atr))
+ sim->l1_state = L1_STATE_IDLE;
+
+ return c;
+}
+
+/* Layer 1 */
+
+int sim_init_eeprom(void)
+{
+ uint8_t ebdt_data[9];
+ int i, rc;
+
+ /* init EEPROM with all bits '1' */
+ for (i = 0; i < (int)eeprom_length(); i++)
+ eeprom_write(i, 0xff);
+
+ /* set default values in eeprom */
+ rc = encode_ebdt(ebdt_data, FUTLN_DEFAULT, SICHERUNG_DEFAULT, KARTEN_DEFAULT, SONDER_DEFAULT, WARTUNG_DEFAULT);
+ if (rc < 0)
+ return rc;
+ for (i = 0; i < MAX_CARDS; i++) {
+ eeprom_write(EEPROM_FUTLN_H + i, ebdt_data[0]);
+ eeprom_write(EEPROM_FUTLN_M + i, ebdt_data[1]);
+ eeprom_write(EEPROM_FUTLN_L + i, ebdt_data[2] + i);
+ eeprom_write(EEPROM_SICH_H + i, ebdt_data[3]);
+ eeprom_write(EEPROM_SICH_L + i, ebdt_data[4]);
+ eeprom_write(EEPROM_SONDER_H + i, ebdt_data[5]);
+ eeprom_write(EEPROM_SONDER_L + i, ebdt_data[6]);
+ eeprom_write(EEPROM_WARTUNG_H + i, ebdt_data[7]);
+ eeprom_write(EEPROM_WARTUNG_L + i, ebdt_data[8]);
+ }
+ eeprom_write(EEPROM_GEBZ_H, 0);
+ eeprom_write(EEPROM_GEBZ_M, 0);
+ eeprom_write(EEPROM_GEBZ_L, 0);
+ eeprom_write(EEPROM_FLAGS, (strlen(PIN_DEFAULT) << EEPROM_FLAG_PIN_LEN) | (MAX_PIN_TRY << EEPROM_FLAG_PIN_TRY));
+ for (i = 0; i < (int)strlen(PIN_DEFAULT); i++)
+ eeprom_write(EEPROM_PIN_DATA + i, PIN_DEFAULT[i]);
+ for (i = 0; i < 8; i++)
+ eeprom_write(EEPROM_AUTH_DATA + i, AUTH_DEFAULT >> ((7 - i) * 8));
+
+ /* now write magic characters to identify virgin or initialized EEPROM */
+ eeprom_write(EEPROM_MAGIC + 0, 'C');
+ eeprom_write(EEPROM_MAGIC + 1, '0' + EEPROM_VERSION);
+
+ return 0;
+}
+
+void sim_reset(sim_sim_t *sim, int reset)
+{
+ int i;
+ char pin[8];
+
+ PDEBUG(DSIM1, DEBUG_INFO, "Reset singnal %s\n", (reset) ? "on (low)" : "off (high)");
+ memset(sim, 0, sizeof(*sim));
+
+ if (reset)
+ return;
+
+ /* read flags from EEPROM data */
+ read_flags(sim);
+
+ /* check PIN and set flags */
+ for (i = 0; i < sim->pin_len; i++)
+ pin[i] = eeprom_read(EEPROM_PIN_DATA + i);
+
+ sim->pin_required = 1;
+ /* 'system' PIN = 0000, 0001, 0002, ... */
+ if (sim->pin_len == 4 && pin[0] == '0' && pin[1] == '0' && pin[2] == '0' && pin[3] >= '0' && pin[3] <= '0' + MAX_CARDS) {
+ sim->pin_required = 0;
+ if (pin[3] > '0')
+ sim->card = pin[3] - '1';
+ PDEBUG(DSIM1, DEBUG_INFO, "Card has disabled PIN (system PIN '000%c') Selecting card #%d.\n", pin[3], sim->card + 1);
+ }
+
+ PDEBUG(DSIM1, DEBUG_INFO, "Sending ATR\n");
+ sim->l1_state = L1_STATE_ATR;
+}
+
+int sim_rx(sim_sim_t *sim, uint8_t c)
+{
+ int rc = -1;
+
+ PDEBUG(DSIM1, DEBUG_DEBUG, "Serial RX '0x%02x'\n", c);
+
+ switch (sim->l1_state) {
+ case L1_STATE_IDLE:
+ sim->l1_state = L1_STATE_RECEIVE;
+ sim->block_state = BLOCK_STATE_ADDRESS;
+ /* fall through */
+ case L1_STATE_RECEIVE:
+ rc = rx_char(sim, c);
+ break;
+ default:
+ break;
+ }
+
+ return rc;
+}
+
+int sim_tx(sim_sim_t *sim)
+{
+ int c = -1;
+
+ switch (sim->l1_state) {
+ case L1_STATE_ATR:
+ c = tx_atr(sim);
+ break;
+ case L1_STATE_SEND:
+ c = tx_char(sim);
+ break;
+ default:
+ break;
+ }
+
+ if (c >= 0)
+ PDEBUG(DSIM1, DEBUG_DEBUG, "Serial TX '0x%02x'\n", c);
+
+ return c;
+}
+
+void sim_timeout(sim_sim_t *sim)
+{
+ switch (sim->l1_state) {
+ case L1_STATE_ATR:
+ PDEBUG(DSIM1, DEBUG_NOTICE, "Timeout while transmitting ATR!\n");
+ sim->l1_state = L1_STATE_RESET;
+ break;
+ case L1_STATE_RECEIVE:
+ PDEBUG(DSIM1, DEBUG_NOTICE, "Timeout while receiving message!\n");
+ sim->block_state = BLOCK_STATE_ADDRESS;
+ break;
+ case L1_STATE_SEND:
+ PDEBUG(DSIM1, DEBUG_NOTICE, "Timeout while sending message!\n");
+ sim->l1_state = L1_STATE_IDLE;
+ break;
+ default:
+ break;
+ }
+}
diff --git a/src/sim/sim.h b/src/sim/sim.h
new file mode 100644
index 0000000..3b11552
--- /dev/null
+++ b/src/sim/sim.h
@@ -0,0 +1,148 @@
+
+#define FUTLN_DEFAULT "2222001"
+#define SICHERUNG_DEFAULT "3103"
+#define KARTEN_DEFAULT "3"
+#define SONDER_DEFAULT "0"
+#define WARTUNG_DEFAULT "65535"
+#define PIN_DEFAULT "0000"
+#define AUTH_DEFAULT ((uint64_t)0x000000000badefee)
+
+enum l1_state {
+ L1_STATE_RESET = 0, /* reset is held */
+ L1_STATE_ATR, /* answer to reset is sent */
+ L1_STATE_IDLE, /* waiting for message or reset */
+ L1_STATE_SEND, /* sending reply */
+ L1_STATE_RECEIVE, /* receiving message */
+};
+
+enum block_state {
+ BLOCK_STATE_ADDRESS = 0,
+ BLOCK_STATE_CONTROL,
+ BLOCK_STATE_LENGTH,
+ BLOCK_STATE_DATA,
+};
+
+#define MAX_PIN_TRY 3
+#define MAX_CARDS 8 /* must also be defined at eeprom.h */
+
+typedef struct sim_sim {
+ int card;
+ enum l1_state l1_state;
+
+ /* ATR states */
+ int atr_count;
+
+ /* layer 2 states */
+ enum block_state block_state;
+ uint8_t block_address;
+ uint8_t block_control;
+ uint8_t block_checksum;
+ uint8_t block_count;
+ uint8_t block_rx_data[64];
+ uint8_t block_rx_length;
+ uint8_t block_tx_data[64];
+ uint8_t block_tx_length;
+ uint8_t vs, vr;
+ int reject_count;
+ int resync_sent;
+
+ /* ICL layer states */
+ int icl_online;
+ int icl_master;
+ int icl_chaining;
+ int icl_error;
+
+ /* layer 7 states */
+ int addr_src;
+ int addr_dst;
+ int sh_appl_count; /* counts applications for SH_APPL */
+
+ /* CNETZ states */
+ int pin_required; /* pin required an not yet validated */
+ int program_mode; /* program mode active (special PIN entered) */
+ int pin_len; /* length of pin (4 .. 8) */
+ int pin_try; /* number of tries left (0 == card locked) */
+ int app; /* currently selected APP number */
+ int app_locked; /* application locked */
+ int gebz_locked; /* metering counter and phonebook locked */
+ int gebz_full; /* metering counter full (does this really happen?) */
+} sim_sim_t;
+
+/* layer 2 */
+enum l2_cmd {
+ L2_I,
+ L2_REJ,
+ L2_RES,
+};
+
+/* ICL */
+#define ICB1_ONLINE 0x01
+#define ICB1_CONFIRM 0x02
+#define ICB1_MASTER 0x04
+#define ICB1_WT_EXT 0x08
+#define ICB1_ABORT 0x10
+#define ICB1_ERROR 0x20
+#define ICB1_CHAINING 0x40
+#define ICB2_BUFFER 0x0f
+#define ICB2_DYNAMIC 0x10
+#define ICB2_ISO_L2 0x20
+#define ICB2_PRIVATE 0x40
+#define ICB_EXT 0x80
+
+/* command */
+#define CLA_CNTR 0x02
+#define SL_APPL 0xf1
+#define CL_APPL 0xf2
+#define SH_APPL 0xf3
+
+#define CLA_STAT 0x03
+#define CHK_KON 0xf1
+
+#define CLA_WRTE 0x04
+#define WT_RUFN 0x01
+
+#define CLA_READ 0x05
+#define RD_EBDT 0x01
+#define RD_RUFN 0x02
+#define RD_GEBZ 0x03
+
+#define CLA_EXEC 0x06
+#define CHK_PIN 0xf1
+#define SET_PIN 0xf2
+#define EH_GEBZ 0x01
+#define CL_GEBZ 0x02
+#define SP_GZRV 0x01
+#define FR_GZRV 0x02
+
+#define CLA_AUTO 0x07
+#define AUT_1 0x01
+
+/* response */
+#define CCRC_PIN_NOK 0x01
+#define CCRC_AFBZ_NULL 0x02
+#define CCRC_APRC_VALID 0x04
+#define CCRC_ERROR 0x40
+#define CCRC_IDENT 0x80
+
+#define APRC_PIN_REQ 0x02
+#define APRC_APP_LOCKED 0x04
+#define APRC_GEBZ_LOCK 0x10
+#define APRC_GEBZ_FULL 0x20
+
+/* apps */
+#define APP_NETZ_C 3
+#define APP_RUFN_GEBZ 4
+
+int encode_ebdt(uint8_t *data, const char *futln, const char *sicherung, const char *karten, const char *sonder, const char *wartung);
+void decode_ebdt(uint8_t *data, char *futln, char *sicherung, char *karten, char *sonder, char *wartung);
+int directory_size(void);
+int save_directory(int location, uint8_t *data);
+void load_directory(int location, uint8_t *data);
+int encode_directory(uint8_t *data, const char *number, const char *name);
+void decode_directory(uint8_t *data, char *number, char *name);
+
+int sim_init_eeprom(void);
+void sim_reset(sim_sim_t *sim, int reset);
+int sim_rx(sim_sim_t *sim, uint8_t c);
+int sim_tx(sim_sim_t *sim);
+void sim_timeout(sim_sim_t *sim);
diff --git a/src/sim/sim.ino b/src/sim/sim.ino
new file mode 100644
index 0000000..fb12269
--- /dev/null
+++ b/src/sim/sim.ino
@@ -0,0 +1,287 @@
+/* SIM card for ATMEL
+ *
+ * (C) 2020 by Andreas Eversberg <jolly@eversberg.eu>
+ * All Rights Reserved
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+extern "C"
+{
+ #include "sim.h"
+ #include "eeprom.h"
+}
+
+/* settings for ATTINY85 */
+#if defined(__AVR_ATtiny85__)
+#define SERIAL_DATA 4
+#define SERIAL_DELAY 124
+#define SERIAL_TIMEOUT 1200 /* > two bytes */
+#else
+/* settings for Arduino UNO with 16 MHz */
+#define STATUS_LED LED_BUILTIN
+#define RESET_PIN 6
+#define SERIAL_DATA 7
+#define SERIAL_DELAY 410
+#define SERIAL_TIMEOUT 2500 /* > two bytes */
+#endif
+/* to set fused for ATTINY85:
+ * avrdude -c usbasp-clone -p t85 -U lfuse:w:0xc0:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
+ */
+
+/* timing test TX (010101010011) */
+//#define TEST_TX
+/* timing test RX (000000000001) */
+//#define TEST_RX
+/* timing test timeout (pause + 000000000001) */
+//#define TEST_TO
+
+sim_sim_t sim;
+
+#include <avr/eeprom.h>
+#include <util/delay.h>
+
+uint8_t eeprom_read(enum eeprom_locations loc)
+{
+ return eeprom_read_byte((uint8_t *)loc);
+}
+
+void eeprom_write(enum eeprom_locations loc, uint8_t value)
+{
+ eeprom_write_byte((uint8_t *)loc, value);
+}
+
+size_t eeprom_length(void)
+{
+ return 512;
+}
+
+#ifdef RESET_PIN
+volatile uint8_t *reset_in;
+uint8_t reset_bit;
+
+/* init reset pin */
+void reset_init(uint8_t pin)
+{
+ uint8_t port;
+ volatile uint8_t *mode, *out;
+
+ reset_bit = digitalPinToBitMask(pin);
+ port = digitalPinToPort(pin);
+
+ mode = portModeRegister(port);
+ out = portOutputRegister(port);
+ reset_in = portInputRegister(port);
+
+ *mode &= ~reset_bit; /* intput */
+ *out |= reset_bit; /* pullup */
+}
+#endif
+
+volatile uint8_t *serial_mode, *serial_out, *serial_in;
+uint8_t serial_bit;
+uint16_t serial_delay;
+
+/* init serial pin */
+void serial_init(uint8_t pin, uint16_t delay)
+{
+ uint8_t port;
+
+ serial_delay = delay;
+ serial_bit = digitalPinToBitMask(pin);
+ port = digitalPinToPort(pin);
+
+ serial_mode = portModeRegister(port);
+ serial_out = portOutputRegister(port);
+ serial_in = portInputRegister(port);
+
+ *serial_mode &= ~serial_bit; /* input */
+ *serial_out |= serial_bit; /* pullup */
+}
+
+/* wait some time so the stop bits haven been elapsed before transmitting a block */
+void serial_start_tx(void)
+{
+ /* wait some time, so previous stop bits have been elapsed */
+ _delay_loop_2(serial_delay * 3); /* 2..3 bits of time */
+}
+
+/* transmit a byte */
+void serial_tx(uint8_t b)
+{
+ uint8_t i, c = 0;
+
+ /* start bit */
+ *serial_mode |= serial_bit; /* output */
+ *serial_out &= ~serial_bit; /* low */
+ _delay_loop_2(serial_delay);
+ /* 8 data bits */
+ for (i = 8; i > 0; --i) {
+ if (b & 1)
+ *serial_out |= serial_bit; /* high */
+ else
+ *serial_out &= ~serial_bit; /* low */
+ _delay_loop_2(serial_delay);
+ c ^= b;
+ b>>= 1;
+ }
+ /* even parity */
+ if (c & 1)
+ *serial_out |= serial_bit; /* high */
+ else
+ *serial_out &= ~serial_bit; /* low */
+ _delay_loop_2(serial_delay);
+ /* 2 stop bits */
+ *serial_out |= serial_bit; /* high */
+ _delay_loop_2(serial_delay);
+ _delay_loop_2(serial_delay);
+ *serial_mode &= ~serial_bit; /* input */
+}
+
+/* receive a byte */
+uint8_t serial_rx(void)
+{
+ uint8_t i, b = 0;
+
+ /* center read */
+ _delay_loop_2(serial_delay >> 1);
+ /* 8 data bits */
+ for (i = 8; i > 0; --i) {
+ _delay_loop_2(serial_delay);
+ b >>= 1;
+ if ((*serial_in & serial_bit))
+ b |= 0x80;
+ }
+ /* parity */
+ _delay_loop_2(serial_delay);
+ /* move into (first) stop bit */
+ _delay_loop_2(serial_delay);
+
+ return b;
+}
+
+void setup() {
+ uint8_t byte, ver;
+
+#ifdef STATUS_LED
+ pinMode(STATUS_LED, OUTPUT);
+#endif
+
+ /* intial eeprom init */
+ byte = eeprom_read(EEPROM_MAGIC + 0);
+ ver = eeprom_read(EEPROM_MAGIC + 1);
+ if (byte != 'C' || ver != '0' + EEPROM_VERSION)
+ sim_init_eeprom();
+
+#ifdef RESET_PIN
+ reset_init(RESET_PIN);
+#endif
+ serial_init(SERIAL_DATA, SERIAL_DELAY);
+#ifdef TEST_TX
+ while (true)
+ serial_tx(0x55);
+#endif
+#ifdef TEST_RX
+ *serial_mode |= serial_bit; /* output */
+ while (true) {
+ /* show low for start bit up to end of first stop bit */
+ *serial_out &= ~serial_bit; /* low */
+ serial_rx();
+ _delay_loop_2(serial_delay >> 1);
+ *serial_out |= serial_bit; /* high */
+ _delay_loop_2(serial_delay);
+ }
+#endif
+#ifdef TEST_TO
+ uint16_t to;
+ int rx;
+ rx_again:
+ rx = 1;
+ /* wait until start bit is received or timeout */
+ for (to = 0; to <= SERIAL_TIMEOUT;) {
+ if (!(*serial_in & serial_bit)) {
+ serial_tx(0x33);
+ goto rx_again;
+ }
+#ifdef RESET_PIN
+ if (!(*reset_in & reset_bit)) {
+ serial_tx(0xf0);
+ goto rx_again;
+ }
+#endif
+ if (rx)
+ to++;
+ }
+ serial_tx(0x55);
+ goto rx_again;
+#endif
+}
+
+void loop() {
+#if !defined(TEST_TX) && !defined(TEST_RX) && !defined (TEST_TO)
+ uint16_t to;
+ int c, rx;
+
+reset_again:
+#ifdef RESET_PIN
+ /* wait until reset is released */
+ while(!(*reset_in & reset_bit));
+#endif
+ sim_reset(&sim, 0);
+
+tx_again:
+#ifdef STATUS_LED
+ digitalWrite(STATUS_LED, LOW);
+#endif
+ /* send buffer until no more data to be transmitted */
+ serial_start_tx();
+ while ((c = sim_tx(&sim)) >= 0) {
+#ifdef RESET_PIN
+ /* perform reset, when low */
+ if (!(*reset_in & reset_bit))
+ goto reset_again;
+#endif
+ /* perform transmission of a byte */
+ serial_tx(c);
+ }
+ /* wait until start bit is received or timeout */
+ rx = 0;
+ for (to = 0; to <= SERIAL_TIMEOUT;) {
+ /* perform RX, when low (start bit) */
+ if (!(*serial_in & serial_bit)) {
+ c = serial_rx();
+ /* if block was completly received, go to tx_again */
+ if (sim_rx(&sim, c) < 0)
+ goto tx_again;
+ /* start counting timeout condition */
+ rx = 1;
+ to = 0;
+#ifdef STATUS_LED
+ digitalWrite(STATUS_LED, HIGH);
+#endif
+ }
+#ifdef RESET_PIN
+ /* perform reset, when low */
+ if (!(*reset_in & reset_bit))
+ goto reset_again;
+#endif
+ /* only if we have an ongoing reception, we count for the timeout condition */
+ if (rx)
+ to++;
+ }
+ /* perform timeout */
+ sim_timeout(&sim);
+ goto tx_again;
+#endif
+}
diff --git a/src/sim/sniffer.c b/src/sim/sniffer.c
new file mode 100644
index 0000000..56bc4a6
--- /dev/null
+++ b/src/sim/sniffer.c
@@ -0,0 +1,798 @@
+/* SIM card sniffer
+ *
+ * (C) 2020 by Andreas Eversberg <jolly@eversberg.eu>
+ * All Rights Reserved
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ARDUINO
+
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+#include "../libdebug/debug.h"
+#include "sim.h"
+#include "sniffer.h"
+
+/* Layer 7 */
+
+static void rx_icl_sdu(uint8_t *data, int length)
+{
+ uint8_t I, cla_ccrc, ins_aprc;
+ uint16_t dlng;
+ int i;
+
+ if (length < 3) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, "Message too short\n");
+ return;
+ }
+
+ I = *data >> 7;
+ cla_ccrc = (*data++ & 0x7f);
+ ins_aprc = *data++;
+ dlng = *data++;
+ length -= 3;
+
+ PDEBUG(DSIM7, DEBUG_INFO, "Layer 7:\n");
+ if (I == 0) {
+ PDEBUG(DSIM7, DEBUG_INFO, " I = Command\n");
+ PDEBUG(DSIM7, DEBUG_INFO, " CLA = 0x%02x\n", cla_ccrc);
+ switch (cla_ccrc) {
+ case CLA_CNTR:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> CNTR (Control Class)\n");
+ break;
+ case CLA_STAT:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> STAT (Status Class)\n");
+ break;
+ case CLA_WRTE:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> WRTE (Write Class)\n");
+ break;
+ case CLA_READ:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> READ (Read Class)\n");
+ break;
+ case CLA_EXEC:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> EXEC (Execute Class)\n");
+ break;
+ case CLA_AUTO:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> AUTO (Authentication Class)\n");
+ break;
+ default:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> unknown class\n");
+ break;
+ }
+ PDEBUG(DSIM7, DEBUG_INFO, " INS = 0x%02x\n", ins_aprc);
+ switch (cla_ccrc) {
+ case CLA_CNTR:
+ switch (ins_aprc) {
+ case SL_APPL:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> SL-APPL (Select Application)\n");
+ break;
+ case CL_APPL:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> CL-APPL (Close Application)\n");
+ break;
+ case SH_APPL:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> SH-APPL (Show Application)\n");
+ break;
+ }
+ break;
+ case CLA_STAT:
+ switch (ins_aprc) {
+ case CHK_KON:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> CHK-KCON (Consistency Check)\n");
+ break;
+ }
+ break;
+ case CLA_WRTE:
+ switch (ins_aprc) {
+ case WT_RUFN:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> WR-RUFN (Write Rufnummernsatz)\n");
+ break;
+ }
+ break;
+ case CLA_READ:
+ switch (ins_aprc) {
+ case RD_EBDT:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> RD-EBDT (Read Einbuchdaten)\n");
+ break;
+ case RD_RUFN:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> RD-RUFN (Read Rufnummernsatz)\n");
+ break;
+ case RD_GEBZ:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> RD-GEBZ (Read Gebuehrenzaehler)\n");
+ break;
+ }
+ break;
+ case CLA_EXEC:
+ switch (ins_aprc) {
+ case CHK_PIN:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> CHK-PIN (Check PIN)\n");
+ break;
+ case SET_PIN:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> SET-PIN (Set PIN)\n");
+ break;
+ case EH_GEBZ:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> EH-GEBZ (Increment Gebuehrenzaehler)\n");
+ break;
+ case CL_GEBZ:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> CL-GEBZ (Clear Gebuehrenzaehler)\n");
+ break;
+ }
+ break;
+ case CLA_AUTO:
+ switch (ins_aprc) {
+ case AUT_1:
+ PDEBUG(DSIM7, DEBUG_INFO, " -> AUTO-1 (Autorization)\n");
+ break;
+ }
+ break;
+ }
+ } else {
+ PDEBUG(DSIM7, DEBUG_INFO, " I = Response\n");
+ PDEBUG(DSIM7, DEBUG_INFO, " CCRC = 0x%02x\n", cla_ccrc);
+ if (cla_ccrc & CCRC_PIN_NOK)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> PIN-NOT-OK\n");
+ if (cla_ccrc & CCRC_AFBZ_NULL)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> AFBZ = NULL\n");
+ if (cla_ccrc & CCRC_APRC_VALID)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> APRC valid\n");
+ if (cla_ccrc & 0x08)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> reserved\n");
+ if (cla_ccrc & 0x10)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> reserved\n");
+ if (cla_ccrc & 0x20)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> reserved\n");
+ if (cla_ccrc & CCRC_ERROR)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> GENERAL ERROR\n");
+ PDEBUG(DSIM7, DEBUG_INFO, " APRC = 0x%02x\n", ins_aprc);
+ if (ins_aprc & APRC_PIN_REQ)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> Bit 2 = 1:PIN-Check required\n");
+ else
+ PDEBUG(DSIM7, DEBUG_INFO, " -> Bit 2 = 0:PIN-Check not required\n");
+ if (ins_aprc & APRC_APP_LOCKED)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> Bit 3 = 1:Application locked\n");
+ else
+ PDEBUG(DSIM7, DEBUG_INFO, " -> Bit 3 = 0:Application unlocked\n");
+ if (ins_aprc & APRC_GEBZ_LOCK)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> Bit 5 = 1:GEBZ/RUFN locked\n");
+ else
+ PDEBUG(DSIM7, DEBUG_INFO, " -> Bit 5 = 0:GEBZ/RUFN unlocked\n");
+ if (ins_aprc & APRC_GEBZ_FULL)
+ PDEBUG(DSIM7, DEBUG_INFO, " -> Bit 6 = 1:GEBZ full\n");
+ else
+ PDEBUG(DSIM7, DEBUG_INFO, " -> Bit 6 = 0:GEBZ not full\n");
+ }
+ if (dlng == 255) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, " Unsupported length 255!\n");
+ return;
+ }
+ PDEBUG(DSIM7, DEBUG_INFO, " DLNG = %d\n", dlng);
+ if (dlng != length) {
+ PDEBUG(DSIM7, DEBUG_NOTICE, " DLNG does not match message body!\n");
+ return;
+ }
+
+ for (i = 0; i < length; i++) {
+ PDEBUG(DSIM7, DEBUG_INFO, " DATA(%d) = 0x%02x '%c' %d\n", i, data[i], (data[i] >= 32 && data[i] <= 126) ? data[i] : '.', data[i]);
+ }
+}
+
+/* ICL layer */
+
+static void rx_icl_pdu(uint8_t *data, int length)
+{
+ int icb_count, ext = 1;
+
+ if (ext) {
+ if (length < 1) {
+ PDEBUG(DSIMI, DEBUG_NOTICE, "Message too short\n");
+ return;
+ }
+
+ PDEBUG(DSIMI, DEBUG_INFO, "Interface control layer ICB1:\n");
+ if (*data & ICB1_ONLINE)
+ PDEBUG(DSIMI, DEBUG_INFO, " ON-LINE-BIT: 1 = On-line data\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " ON-LINE-BIT: 0 = Off-line data\n");
+ if (*data & ICB1_CONFIRM)
+ PDEBUG(DSIMI, DEBUG_INFO, " CONFIRM-BIT: 1 = Confirmation\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " CONFIRM-BIT: 0 = No meaning\n");
+ if (*data & ICB1_MASTER)
+ PDEBUG(DSIMI, DEBUG_INFO, " MASTER/SLAVE-BIT: 1 = Sender is master\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " MASTER/SLAVE-BIT: 0 = Sender is slave\n");
+ if (*data & ICB1_WT_EXT)
+ PDEBUG(DSIMI, DEBUG_INFO, " WT-EXTENSION-BIT: 1 = Request for WT-Extension\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " WT-EXTENSION-BIT: 0 = No request for WT-Extension\n");
+ if (*data & ICB1_ABORT)
+ PDEBUG(DSIMI, DEBUG_INFO, " ABORT/TERMINATE-BIT: 1 = Abort/Terminate request\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " ABORT/TERMINATE-BIT: 0 = No meaning\n");
+ if (*data & ICB1_ERROR)
+ PDEBUG(DSIMI, DEBUG_INFO, " ERROR-BIT: 1 = Error\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " ERROR-BIT: 0 = No meaning\n");
+ if (*data & ICB1_CHAINING)
+ PDEBUG(DSIMI, DEBUG_INFO, " CHAINING-BIT: 1 = More ICL data follows\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " CHAINING-BIT: 0 = No more ICL data follows\n");
+ if (*data & ICB_EXT)
+ PDEBUG(DSIMI, DEBUG_INFO, " ICB-EXTENSION-BIT: 1 = ICB2 follows\n");
+ else {
+ PDEBUG(DSIMI, DEBUG_INFO, " ICB-EXTENSION-BIT: 0 = no ICB follows\n");
+ ext = 0;
+ }
+ data++;
+ length--;
+ }
+
+ if (ext) {
+ if (length < 1) {
+ PDEBUG(DSIMI, DEBUG_NOTICE, "Message too short\n");
+ return;
+ }
+
+ PDEBUG(DSIMI, DEBUG_INFO, "Interface control layer ICB2:\n");
+ if (*data & ICB2_DYNAMIC)
+ PDEBUG(DSIMI, DEBUG_INFO, " DYN-BUFFER-SIZE-BIT: 1 = Buffer size %d\n", (*data & ICB2_BUFFER) * 8);
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " DYN-BUFFER-SIZE-BIT: 0 = No meaning\n");
+ if (*data & ICB2_ISO_L2)
+ PDEBUG(DSIMI, DEBUG_INFO, " ISO-7816-BLOCK-BIT: 1 = Compatible\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " ISO-7816-BLOCK-BIT: 0 = Incompatible\n");
+ if (*data & ICB2_PRIVATE)
+ PDEBUG(DSIMI, DEBUG_INFO, " PRIVATE-USE-BIT: 1 = Private use layer 7 protocol\n");
+ else
+ PDEBUG(DSIMI, DEBUG_INFO, " PRIVATE-USE-BIT: 0 = No meaning\n");
+ if (*data & ICB_EXT)
+ PDEBUG(DSIMI, DEBUG_INFO, " ICB-EXTENSION-BIT: 1 = ICB3 follows\n");
+ else {
+ PDEBUG(DSIMI, DEBUG_INFO, " ICB-EXTENSION-BIT: 0 = no ICB follows\n");
+ ext = 0;
+ }
+ data++;
+ length--;
+ }
+
+ icb_count = 2;
+ while (ext) {
+ if (length < 1) {
+ PDEBUG(DSIMI, DEBUG_NOTICE, "Message too short\n");
+ return;
+ }
+
+ PDEBUG(DSIMI, DEBUG_INFO, "Interface control layer ICB%d:\n", ++icb_count);
+ PDEBUG(DSIMI, DEBUG_INFO, " Value: 0x%02x\n", *data);
+ if (!(*data & 0x80))
+ ext = 0;
+ data++;
+ length--;
+ }
+
+ rx_icl_sdu(data, length);
+}
+
+/* Layer 2 */
+
+static uint8_t flip(uint8_t c)
+{
+ c = ((c&0x55) << 1) | ((c&0xaa) >> 1); /* 67452301 */
+ c = ((c&0x33) << 2) | ((c&0xcc) >> 2); /* 45670123 */
+ c = (c << 4) | (c >> 4); /* 01234567 */
+
+ return c;
+}
+
+void sniffer_reset(sim_sniffer_t *sim)
+{
+ PDEBUG(DSIM1, DEBUG_INFO, "Resetting sniffer\n");
+ memset(sim, 0, sizeof(*sim));
+}
+
+static void decode_ta1(sim_sniffer_t __attribute__((unused)) *sim, uint8_t c, int count)
+{
+ int fi = -1, di = -1;
+ double fmax = 0.0;
+
+ switch (c >> 4) {
+ case 0:
+ fi = 372; fmax = 4.0;
+ break;
+ case 1:
+ fi = 372; fmax = 5.0;
+ break;
+ case 2:
+ fi = 558; fmax = 6.0;
+ break;
+ case 3:
+ fi = 744; fmax = 8.0;
+ break;
+ case 4:
+ fi = 1116; fmax = 12.0;
+ break;
+ case 5:
+ fi = 1488; fmax = 16.0;
+ break;
+ case 6:
+ fi = 1860; fmax = 20.0;
+ break;
+ case 9:
+ fi = 512; fmax = 5.0;
+ break;
+ case 10:
+ fi = 768; fmax = 7.5;
+ break;
+ case 11:
+ fi = 1014; fmax = 10.0;
+ break;
+ case 12:
+ fi = 1536; fmax = 15.0;
+ break;
+ case 13:
+ fi = 2048; fmax = 20.0;
+ break;
+ }
+
+ switch (c & 0xf) {
+ case 1:
+ di = 1;
+ break;
+ case 2:
+ di = 2;
+ break;
+ case 3:
+ di = 4;
+ break;
+ case 4:
+ di = 8;
+ break;
+ case 5:
+ di = 16;
+ break;
+ case 6:
+ di = 32;
+ break;
+ case 7:
+ di = 64;
+ break;
+ case 8:
+ di = 12;
+ break;
+ case 9:
+ di = 20;
+ break;
+ }
+
+ if (fi > 0)
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d Fi = %d, f(max.) = %.1f MHz\n", count, fi, fmax);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d Fi = RFU\n", count);
+ if (di > 0)
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d Di = %d\n", count, di);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d Di = RFU\n", count);
+}
+
+static void decode_ta2(sim_sniffer_t __attribute__((unused)) *sim, uint8_t c, int count)
+{
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d T = %d\n", count, c & 0xf);
+ if (!(c & 0x10))
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d : Fi and Di by TA1 shall apply.\n", count);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d : Implicit values (and not Di / Di by TA1) sall apply.\n", count);
+ if (!(c & 0x80))
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d : Capable to change negotiable/specific mode.\n", count);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d : Unable to change negotiable/specific mode.\n", count);
+}
+
+static void decode_tai(sim_sniffer_t *sim, uint8_t c, int count)
+{
+ if ((sim->atr_td & 0xf) != 14) {
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d Value = 0x%02x\n", count, c);
+ return;
+ }
+
+ if (count == 3) {
+ switch (c & 0xf) {
+ case 0:
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d fsmin = Default\n", count);
+ break;
+ case 1:
+ case 2:
+ case 3:
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d fsmin = %d MHz\n", count, c & 0xf);
+ break;
+ default:
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d fsmin = reserved\n", count);
+ break;
+ }
+
+ switch (c >> 4) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d fsmax = reserved\n", count);
+ break;
+ case 5:
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d fsmax = 5 MHz (Default)\n", count);
+ break;
+ default:
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d fsmax = %d MHz\n", count, c >> 4);
+ break;
+ }
+ } else {
+ PDEBUG(DSIM2, DEBUG_INFO, " TA%d Block Waiting Time = %d\n", count, c);
+ }
+}
+
+static void decode_tb1(sim_sniffer_t __attribute__((unused)) *sim, uint8_t c, int count)
+{
+ if ((c & 0x1f) == 0)
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d PI1=0: VPP not connected\n", count);
+ else if ((c & 0x1f) == 5)
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d PI1=5: VPP is 5 Volts (default)\n", count);
+ else if ((c & 0x1f) >= 6 && (c & 0x1f) <= 25)
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d PI1=%d: VPP is %d Volts\n", count, c & 0x1f, (c & 0x1f) - 1);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d PI1=%d: not defined\n", count, c & 0x1f);
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d II = %d\n", count, (c >> 5) & 0x3);
+}
+
+static void decode_tb2(sim_sniffer_t __attribute__((unused)) *sim, uint8_t c, int count)
+{
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d Value = 0x%02x\n", count, c);
+}
+
+static void decode_tbi(sim_sniffer_t *sim, uint8_t c, int count)
+{
+ if ((sim->atr_td & 0xf) != 14) {
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d Value = 0x%02x\n", count, c);
+ return;
+ }
+
+ if (count == 3) {
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d Maximum block size = %d\n", count, c);
+ } else {
+ if (!(c & 0x01))
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d XOR Checksum\n", count);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d CRC Checksum\n", count);
+ if (!(c & 0x02))
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d 12-etu frame\n", count);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d 11-etu frame\n", count);
+ if (!(c & 0x04))
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d No Chaining in ICL-Layer-Protocol\n", count);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d Chaining in ICL-Layer-Protocol\n", count);
+ if (!(c & 0x08))
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d Incompatible to ISO 7816 (Character Protocol)\n", count);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d Compatible to ISO 7816 (Character Protocol)\n", count);
+ if (!(c & 0x10))
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d No private in ICL-Layer-Protocol\n", count);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d Private in ICL-Layer-Protocol\n", count);
+ if (!(c & 0x20))
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d No ICB-Extension in ICL-Layer-Protocol\n", count);
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " TB%d ICB-Extension in ICL-Layer-Protocol\n", count);
+ }
+}
+
+static void decode_tc1(sim_sniffer_t __attribute__((unused)) *sim, uint8_t c, int count)
+{
+ PDEBUG(DSIM2, DEBUG_INFO, " TC%d N = %d\n", count, c);
+}
+
+static void decode_tc2(sim_sniffer_t __attribute__((unused)) *sim, uint8_t c, int count)
+{
+ PDEBUG(DSIM2, DEBUG_INFO, " TC%d Value = 0x%02x\n", count, c);
+}
+
+static void decode_tci(sim_sniffer_t *sim, uint8_t c, int count)
+{
+ if ((sim->atr_td & 0xf) != 14) {
+ PDEBUG(DSIM2, DEBUG_INFO, " TC%d Value = 0x%02x\n", count, c);
+ return;
+ }
+
+ PDEBUG(DSIM2, DEBUG_INFO, " TC%d Character Waiting Time = %d\n", count, c);
+}
+
+static void decode_td(sim_sniffer_t __attribute__((unused)) *sim, uint8_t c, int count)
+{
+ switch (c & 0xf) {
+ case 0:
+ PDEBUG(DSIM2, DEBUG_INFO, " TD%d T=1: Half-duplex transmission of characters (ISO 7816).\n", count);
+ break;
+ case 1:
+ PDEBUG(DSIM2, DEBUG_INFO, " TD%d T=1: Half-duplex transmission of blocks (ISO 7816).\n", count);
+ break;
+ case 2:
+ case 3:
+ PDEBUG(DSIM2, DEBUG_INFO, " TD%d T=%d: Reserved for future full-duplex operations.\n", count, c & 0xf);
+ break;
+ case 4:
+ PDEBUG(DSIM2, DEBUG_INFO, " TD%d T=4: Reserved for an enhanced half-duplex transmission of characters.\n", count);
+ break;
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ PDEBUG(DSIM2, DEBUG_INFO, " TD%d T=%d: Reserved for future use by ISO/IEC JTC 1/SC 17.\n", count, c & 0xf);
+ break;
+ case 14:
+ PDEBUG(DSIM2, DEBUG_INFO, " TD%d T=14: Refers to transmission protocols not standardized by ISO/IEC JTC 1/SC 17.\n", count);
+ break;
+ case 15:
+ PDEBUG(DSIM2, DEBUG_INFO, " TD%d T=15: Does not refer to a transmission protocol, but only qualifies global interface bytes.\n", count);
+ break;
+ }
+}
+
+static void decode_if(sim_sniffer_t *sim, int count)
+{
+ switch (count) {
+ case 1:
+ if (sim->atr_if_mask & 0x10)
+ decode_ta1(sim, sim->atr_ta, count);
+ if (sim->atr_if_mask & 0x20)
+ decode_tb1(sim, sim->atr_tb, count);
+ if (sim->atr_if_mask & 0x40)
+ decode_tc1(sim, sim->atr_tc, count);
+ if (sim->atr_if_mask & 0x80)
+ decode_td(sim, sim->atr_td, count);
+ break;
+ case 2:
+ if (sim->atr_if_mask & 0x10)
+ decode_ta2(sim, sim->atr_ta, count);
+ if (sim->atr_if_mask & 0x20)
+ decode_tb2(sim, sim->atr_tb, count);
+ if (sim->atr_if_mask & 0x40)
+ decode_tc2(sim, sim->atr_tc, count);
+ if (sim->atr_if_mask & 0x80)
+ decode_td(sim, sim->atr_td, count);
+ break;
+ default:
+ if (sim->atr_if_mask & 0x10)
+ decode_tai(sim, sim->atr_ta, count);
+ if (sim->atr_if_mask & 0x20)
+ decode_tbi(sim, sim->atr_tb, count);
+ if (sim->atr_if_mask & 0x40)
+ decode_tci(sim, sim->atr_tc, count);
+ if (sim->atr_if_mask & 0x80)
+ decode_td(sim, sim->atr_td, count);
+ }
+
+ if ((sim->atr_td >> 4))
+ PDEBUG(DSIM2, DEBUG_INFO, "----------------------------------------\n");
+}
+
+static void decode_hist(sim_sniffer_t __attribute__((unused)) *sim, uint8_t c, int count)
+{
+ PDEBUG(DSIM2, DEBUG_INFO, " History byte #%d: 0x%02x\n", count, c);
+}
+
+static void rx_atr(sim_sniffer_t *sim, uint8_t c)
+{
+ /* TS */
+ if (sim->atr_count == 0) {
+ PDEBUG(DSIM1, DEBUG_INFO, "----------------------------------------\n");
+ switch (c) {
+ case 0x3f:
+ PDEBUG(DSIM2, DEBUG_INFO, "Reading ATR inverse bit order:\n");
+ sim->inverse_order = 1;
+ break;
+ case 0x3b:
+ PDEBUG(DSIM2, DEBUG_INFO, "Reading ATR normal bit order:\n");
+ sim->inverse_order = 0;
+ break;
+ default:
+ sniffer_reset(sim);
+ return;
+ }
+ sim->atr_tck = c;
+ sim->atr_count++;
+ return;
+ }
+
+ if (sim->inverse_order)
+ c = flip (c);
+
+ sim->atr_tck ^= c;
+
+ if (sim->atr_count == 1) {
+ sim->atr_t0 = c;
+ sim->atr_if_mask = c;
+ sim->atr_count++;
+ return;
+ }
+
+ /* get TA, if included, or skip by inc. atr_count */
+ if (sim->atr_count == 2) {
+ if (sim->atr_if_mask & 0x10) {
+ sim->atr_ta = c;
+ sim->atr_count++;
+ return;
+ } else
+ sim->atr_count++;
+ }
+
+ /* get TB, if included, or skip by inc. atr_count */
+ if (sim->atr_count == 3) {
+ if (sim->atr_if_mask & 0x20) {
+ sim->atr_tb = c;
+ sim->atr_count++;
+ return;
+ } else
+ sim->atr_count++;
+ }
+
+ /* get TC, if included, or skip by inc. atr_count */
+ if (sim->atr_count == 4) {
+ if (sim->atr_if_mask & 0x40) {
+ sim->atr_tc = c;
+ sim->atr_count++;
+ return;
+ } else
+ sim->atr_count++;
+ }
+
+ /* get TD, if included, or skip by inc. atr_count */
+ if (sim->atr_count == 5) {
+ if (sim->atr_if_mask & 0x80) {
+ sim->atr_td = c;
+ /* decode content */
+ decode_if(sim, sim->atr_if_count + 1);
+ /* get new mask byte and start over */
+ sim->atr_count = 2;
+ sim->atr_if_mask = sim->atr_td;
+ sim->atr_if_count++;
+ return;
+ } else
+ sim->atr_count++;
+ }
+
+ /* decode content */
+ if (sim->atr_count == 6)
+ decode_if(sim, sim->atr_if_count + 1);
+
+ /* process historical character */
+ if (sim->atr_count < 6 + (sim->atr_t0 & 0xf)) {
+ decode_hist(sim, c, sim->atr_count - 6 + 1);
+ sim->atr_count++;
+ return;
+ }
+
+ if (sim->atr_tck == 0)
+ PDEBUG(DSIM2, DEBUG_INFO, " Checksum 0x%02x ok.\n", c);
+ else
+ PDEBUG(DSIM2, DEBUG_NOTICE, " Checksum 0x%02x error!\n", c);
+
+
+ sim->l1_state = L1_STATE_RECEIVE;
+ sim->block_state = BLOCK_STATE_ADDRESS;
+ PDEBUG(DSIM2, DEBUG_INFO, "ATR done!\n");
+}
+
+static void rx_char(sim_sniffer_t *sim, uint8_t c)
+{
+ if (sim->inverse_order)
+ c = flip(c);
+
+ sim->block_checksum ^= c;
+
+ switch (sim->block_state) {
+ case BLOCK_STATE_ADDRESS:
+ if ((c >> 4) != 1 && (c & 0xf) != 1) {
+ /* start over if we do not get a valid message start */
+ sniffer_reset(sim);
+ sniffer_rx(sim, c);
+ return;
+ }
+ PDEBUG(DSIM1, DEBUG_INFO, "----------------------------------------\n");
+ sim->block_address = c;
+ sim->block_state = BLOCK_STATE_CONTROL;
+ sim->block_checksum = c;
+ return;
+ case BLOCK_STATE_CONTROL:
+ sim->block_control = c;
+ sim->block_state = BLOCK_STATE_LENGTH;
+ return;
+ case BLOCK_STATE_LENGTH:
+ sim->block_length = c;
+ sim->block_count = 0;
+ sim->block_state = BLOCK_STATE_DATA;
+ return;
+ case BLOCK_STATE_DATA:
+ if (sim->block_count < sim->block_length) {
+ sim->block_data[sim->block_count++] = c;
+ return;
+ }
+ PDEBUG(DSIM2, DEBUG_INFO, "Layer 2:\n");
+ PDEBUG(DSIM2, DEBUG_INFO, " source %d -> to %d\n", sim->block_address >> 4, sim->block_address & 0xf);
+ if ((sim->block_control & 0x11) == 0x00)
+ PDEBUG(DSIM2, DEBUG_INFO, " control I: N(S)=%d N(R)=%d\n", (sim->block_control >> 1) & 7, sim->block_control >> 5);
+ else if ((sim->block_control & 0x1f) == 0x09)
+ PDEBUG(DSIM2, DEBUG_INFO, " control REJ: N(R)=%d\n", sim->block_control >> 5);
+ else if (sim->block_control == 0xef)
+ PDEBUG(DSIM2, DEBUG_INFO, " control RES");
+ else
+ PDEBUG(DSIM2, DEBUG_INFO, " control unknown 0x%02x\n", sim->block_control);
+ PDEBUG(DSIM2, DEBUG_INFO, " length %d\n", sim->block_length);
+ if (sim->block_checksum == 0)
+ rx_icl_pdu(sim->block_data, sim->block_length);
+ else
+ PDEBUG(DSIM2, DEBUG_NOTICE, "Received message with checksum error!\n");
+ sim->block_state = BLOCK_STATE_ADDRESS;
+ }
+}
+
+void sniffer_rx(sim_sniffer_t *sim, uint8_t c)
+{
+
+ PDEBUG(DSIM1, DEBUG_DEBUG, "Serial RX '0x%02x'\n", c);
+
+ switch (sim->l1_state) {
+ case L1_STATE_RESET:
+ if (c != 0x3f && c != 0x3b) {
+ PDEBUG(DSIM1, DEBUG_INFO, "Received garbage '0x%02x' while waiting for ATR\n", c);
+ break;
+ }
+ sim->l1_state = L1_STATE_ATR;
+ sim->atr_count = 0;
+ /* fall through */
+ case L1_STATE_ATR:
+ rx_atr(sim, c);
+ break;
+ case L1_STATE_RECEIVE:
+ rx_char(sim, c);
+ break;
+ default:
+ break;
+ }
+}
+
+void sniffer_timeout(sim_sniffer_t *sim)
+{
+ switch (sim->l1_state) {
+ case L1_STATE_RESET:
+ case L1_STATE_ATR:
+ if (sim->l1_state == L1_STATE_ATR && sim->atr_count)
+ PDEBUG(DSIM1, DEBUG_NOTICE, "Timeout while receiving ATR!\n");
+ sim->l1_state = L1_STATE_ATR;
+ sim->atr_count = 0;
+ break;
+ case L1_STATE_RECEIVE:
+ if (sim->block_state != BLOCK_STATE_ADDRESS)
+ PDEBUG(DSIM1, DEBUG_NOTICE, "Timeout while receiving message!\n");
+ sim->block_state = BLOCK_STATE_ADDRESS;
+ break;
+ default:
+ break;
+ }
+}
+
+#endif /* ARDUINO */
diff --git a/src/sim/sniffer.h b/src/sim/sniffer.h
new file mode 100644
index 0000000..be948d6
--- /dev/null
+++ b/src/sim/sniffer.h
@@ -0,0 +1,26 @@
+
+typedef struct sim_sniffer {
+ enum l1_state l1_state;
+ int inverse_order;
+ int atr_count;
+ int atr_if_count;
+ uint8_t atr_if_mask;
+ uint8_t atr_t0;
+ uint8_t atr_ta;
+ uint8_t atr_tb;
+ uint8_t atr_tc;
+ uint8_t atr_td;
+ uint8_t atr_tck;
+ enum block_state block_state;
+ uint8_t block_address;
+ uint8_t block_control;
+ uint8_t block_length;
+ uint8_t block_count;
+ uint8_t block_checksum;
+ uint8_t block_data[256];
+} sim_sniffer_t;
+
+void sniffer_reset(sim_sniffer_t *sim);
+void sniffer_rx(sim_sniffer_t *sim, uint8_t c);
+void sniffer_timeout(sim_sniffer_t *sim);
+
diff --git a/src/zeitansage/main.c b/src/zeitansage/main.c
index 779573b..da75f05 100644
--- a/src/zeitansage/main.c
+++ b/src/zeitansage/main.c
@@ -73,6 +73,8 @@ int main(int argc, char *argv[])
{
int rc, argi;
+ allow_sdr = 0;
+
/* init system specific tones */
init_samples();