Modemler Hakknda Pratik Bilgiler

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Modemler Hakknda Pratik Bilgiler as PDF for free.

More details

  • Words: 7,813
  • Pages: 17
Modemler hakkında pratik bilgiler.

Modemler Hakkında Pratik Bilgiler. Bu dökümanda modemlerin tüm detay bilgileri anlatılmayacaktır; anlaşılabilir ve basit olabilmesi için bazı teknik bilgilerin detayları atlanmıştır. Bu döküman da anlaşılabilir bir şekilde bilgisayarların birbirleri ile nasıl konuştuklarına gözatacağız. Modem kelimesi iki kelimeden oluşan bir kısaltmadır. Modem = Modulator / Demodulator. Esasında bu iki kelime modemlerin işlevlerini nasıl gerçekleştirdiği konusunda fikir vermektedir. Modemler bilgisayarın temel birimlerinden biri değildir. Basit telefon hatları üzerinden dijital bilgi akışını sağlamak için tasarlanmıştır. Analog / Dijital. Analog, dijital ne demektir.?, Birinin diğerine üstünlüğü nedir.? Prensibi anlamak için bir elektrik ampulünün ışığına bakalım. Parlaklığını gözönünde bulunduralım. Parlaklığı kontrol etmek için ayrı ayrı dimmer denen gerilimi kontrol eden bir cihaz ve bir de düğme kullanalım. Dimmer ile gerilimi ayarlayarak ışığın parlaklığını kontrol edebiliriz. Parlak veya daha az parlak. Düğme ile lambayı kontrol ettiğinizde, ya düğmeye basarsınız lamba yanar veya düğmeden elinizi çekersiniz, lamba söner. Yani ara bir değer yoktur. Dimmer ile kontrol ettiğimizde lambayı analog olarak kontrol etmiş oluyoruz. Burada ışığın şiddeti maksimum şiddet ile minmum şiddet arasında sonsuz değer alabilir: Parlak, az parlak, daha az parlak, veya çok parlak. Oysa düğme kullandığımızda lamba ya yanıyordur veya sönüktür. Yani iki durum söz konusudur. Ara bir değer yoktur. Bilgisayarkar dijital; Telefon hatları analog. Bilgisayarlar içeride dijital olarak çalışırlar. Bu şekilde çok yoğun veri işlenmesi ve transferi mevzu bahistir. Bir taraftan telefon hatları ses aktarımı için tasarlandığı için analogtur. Mikrofondan gelen sinyal analog olduğundan bunu transfer edecek hatlarında analog olması gerekmektedir. Analog bir hat üzerinden dijital bilginin transferi için bir şey yapılması gerekiyor. Örnekle, dijital sinyal akımın geçmesi veya geçmemesi şeklinde düşünülebilir. Ama telefon hatları üzerinde bu yapılamaz. Bir şekilde bu akımı eğer ses tonu haline getirirseniz dijital bilgiyi analog hale getirmiş olursunuz. Telefon hatlarıda ses tonlarını taşımak üzere tasarlandığına göre veriyi bu şekilde iletebilirsiniz. Dijitalden analoğa: Modem. Gerçekte modemlerin yaptığı iş budur. Bilgisayardan gelen 'dijital' sinyaller okunur ve ses tonu haline getirilir. Bu ses tonları telefon hatları üzerinden gönderilir. Hattın diğer ucundaki modem ise gelen tonları dinleyerek bunları gerisin geriye dijital bilgiye çevirir. Bu fonksiyonlar Dijitalden Analoğa 'D/A' ve Analogtan dijitale 'A/D' çevrimleri şeklinde adlandırılırlar. Basit bir modemin pratik tanımı

İlkin modemin nasıl çalıştığına bir bakalım. Diyelimki bir bilgisayar diğeriyle haberleşmek istiyor. Bir uçtaki modem diğer tarafın telefon numarasını çevirir. Diğer telefonun zili çalar. modem bunu duyar ve telefona cevap verir. Şimdi, modemler nasıl hattın açık ve çalışıyor olduğunu bilirler. Açan tarafta, modem açtıktan hemen sonra bir ses tonu gönderir. Bu tonun frekansı bellidir. Diğer taraf bunu dinler ve çevirdiği telefona cevap verenin bir modem olduğunu anlar. Bir insan bu tonu üretemeyeceğine göre, modem karşı tarafta açanın modemmi yoksa insanmı olduğunu anlar. Bu başlangıç sinyalinden hemen sonra bir transmisyon cevap veren modemden gönderilir. Buna Unmodulated Carrier veya Module edilmemiş taşıyıcı sinyal de diyebiliriz. Bu yine sürekli ve belli bir frekansta sinyaldir. Bu modemin maximum bağlantı hızına bağlı olarak değişir. Karşı tarafla uyuşabilecekleri ortak bir frekans bulmaya çalışırlar. Çeviren taraf sinyali dinleyerek anlaşabildiği bir frekans seçer. Eğer uygun bir tane bulursa, bulduğu frekansta karşı tarafa cevap yollar. Bu frekansta iletişim kurulabileceği tespit edildikten sonra modem bağlantısı sürdüğü sürece bu taşıma sinyali devam eder. Eğer taşıyıcı sinyal kesilirse bağlantı da kopmuş olur. Eğer harici modemleri incelediyseniz, üzerinde Carrier Detect veya CD (Taşıyıcı sinyal var.) ledi vardır. Bu bağlantı olduğu müddetçe yanar. Değişik iki taşıma sinyali vardır. Bunların sıklığı ve frekansları farklıdır. Gönderme ve Alma taşıma sinyallerinin her ikiside herhangi bir zaman aralığında bağlantı olduğu sürece mevcuttur. En azından günümüz modemleri için durum böyle. Şimdi bu tamamlanmış varsayalım, modemler birbirleriyle haberleştikten hemen sonra, CD (Carrier Detect) taşıyıcı algılama sinyali lambası yanar. Bu iki modemin bir frekans çiftinde anlaştıkları ve konuşmaya hazır oldukları anlamına gelir. Şimdi, modemler, bağlı oldukları bilgisayardan dijital veri almaya başlayabilirler. Bu veri bir ve sıfırlardan oluşan bir akıştır. Modem bunları alır, ve frekans değişimlerine çevirir. Bu değişmeler hat üzerinden aktarılır. Her nasılsa, dinleyen modem sadece bunları filtreleyerek verileri çözümleyebilir. Örneğin, eğer biz hepsini 0 gönderirsek sinyalin tonunda bir değişme olmayacaktır. Tüm seri iletişimler bu mantıkla, herhangi bir saat sinyaline ihtiyaç duymaksızın, UART denen çip sayesinde yapılır. Bu cip sinyali göndermeden evvel bir start biti gönderir. Karşı taraf bilginin geleceğini anlar. Bilgi gönderilir. karşı taraf bilgiyi alır. Arkasından stop bit denen bilgi gönderilir. Karşı taraf bilgi gönderme işinin tamamlandığını anlar ve aldığı bilgiyi bilgisayara aktarır. Teknik olarak konuşmak gerekirse eğer herşey yolunda giderse dijital bilgilerin analog hatlar üzerinden taşındığı korkunç bir sisteme sahibiz demektir. Ancak bilinen o ki, her zaman herşey yolunda gitmez. Hatalar... Eğer bu konuda düşünürseniz, modem hattı bilgi üzerinden aktarılırken sonu gelmeyen tonu az çok değişen bipler şeklinde gitmektedir.Tabiki, her bit bir bip gerektirir. Doğal olarak hızlı bipler sizin bilginizi daha hızlı taşıyacaktır.

Herkes telefon görüşmesi yaparken bir takım gürültüler veya bir başkasının konuşmasını kendi hattından duymuştur. Kısaca başka hatlardan sizin hattınıza geçen gürültü ve bozulmalar. Peki modemler bunları duyduğunda ne olur.Modemler sadece bip sinyalleri göndermektedir. Ne olabilir.mesala bir iki biti kaybettiğinizi varsayın. veya start stop bitlerininde data biti olarak geldiğini düşünün. Eski telefon hatlarında bu tür problemler halen mevcuttur. Bu ise gerçekten büyük problemdir. Gönderilen bilgide start ve stop bitleri arasında kaç bit gönderildiğini veya ne hızda geldiğini anlayamayız. Ve daha pek çok şey. Telefon hattı üzerinden aktarılan bilginin sonuçta rakamlar olduğunu biliyoruz. Örneğin, 7 bitlik ascii text dosyanın modem üzerinden gönderelim. Bunlar data biti olarak gidecektir. Şimdi basit bir hata kontrol mekanizması yerleştirelim ve adına parity check diyelim. Parity Check. Parity check bize basit bir ipucu vermektedir. Parity, tüm bitlerin toplamını tanımlar. Data paketi içinde yer alan bitlerin toplamlarının çift veya tek olma durumuna göre gönderilen bilgiye ek bir parity biti eklenir. Örneğin gönderilen paket. 1111110 olsun. Toplamları 6 yapmaktadır. Bu ise çift sayıdır. Oysa 1111111 7 yapar tek sayıdır. Eğer siz tek kontrolü yapıyorsanız parity biti 1 olacaktır. Çift kontrolü yapıyorsanız parity biti 0 olacaktır. Böylece eğer gönderilen bilgide değişiklik olursa parity ile uyuşmayacağından parity error oluşacaktır. Elbetteki, bilginin bit toplamı tek veya çift olacaktır. Fakat bir ihtimal bir iki bitin birden değişmiş olması. bu durumda hatalı bir şekilde size bilgi gelecektir. Fakat hatalı olduğunu nasıl anlayacağız.? İletişim kurulmadan evvel modemler parity bitinin tekmi çiftmi olacağına karar verilir. Bu şekilde sinyal gittiğinde neyi kontrol edeceklerini veya neyi göndereceklerini bilirler. Bu bilginin 1 veya 0 olmasına göre bilgi kontrol edilecektir. Eğer hatalı ise Out of Sync sinyali gelir.Normalde taşıyıcı sinyal geliyorsa hat sağlam demektir. Putting it all together: Line Parameters. So, the four parameters we described above really define the essence of the mode link. How Fast, How Many Data bits, What Parity, how many stop bits. This is usually described in a cryptic way; for example to say 300 bits per second, 7 databits, even party, one stop bit we usually just say 300 bps, 7E1. We agree we will always send one start bit. The technique described above will work pretty well on clean lines at 300 bps or 300 baud. But what if we go faster? Well, simple: Just make the tones shorter! This works pretty good up to about 2400 tones per second or Baud. And then, you run into a new problem: The changes in frequency would happen faster than you could hear them on the line! So you could not hear individual tones anymore, simply since the audio quality of the phone line is not good enough!

What we are already doing though, is sending more than one tone at once; we have one tone for each of the two modems. So, what would happen if we fit more than one tone going in each direction on the line? The speed at which the tones keep changing will be the same, but there will be more than one tone at the line going in each direction at any given time. Baud vs. Bits Per Second. This technique will allow for every time unit on the line to carry more than just one piece of data, and that is where the difference between Baud and bps comes in. The Baud rate on a line indicates how many changes in tones per second there are; for example, on a 300 baud line there are 300 changes per second. On a 2400 baud line there are 2400. The bits per Second rate explains how many bits can go over the line. For example, on a 300 bps modem connection, there is a 300 baud link, so there are only two sets of frequencies in use. On a 2400 bps line, there's 2400 baud speed, and one bit per baud unit. Jumping from 2400 to 9600. So why did modems go from 2400 to 9600 bps? Well.. they started putting more than one Bit in a Baud. On a 2400 bit line, there are 4 frequencies in use: Originate 0, originate 1, Receive 0, Receive 1. Each may change up to 2400 times a second. On a 9600 bps line, the number of changes is the same; there are, however, more originate and send channels, 4 to be exact, which are all used simultaneously. Of course, this means there are more different frequencies on the line at each time, and that means the line needs to be 'cleaner.' And 14400? Does it amaze you that this is 6*2400? And 28.8? 12*2400? So how far can we go?? Well.. it all depends on how many beeps we can send on a line simultaneously. Frequency Response. A way to measure this is Frequency Response on a line; this number defines the lowest and highest sounds a line will reproduce. There are standards for this, and about 150 Hertz to 6 Kilohertz is what a phone line will handle, with the peak performance in the 1500-300 Hertz range. Most distortions are clicks, pops and hums (low frequencies) and hisses, whistles and static (high frequencies). So the cleanest part of a line is 'in the middle,' which is where 9600 bps and lower speed modems have all their frequencies mapped. As a matter of fact, 9600 bps is guaranteed to work over all phone lines that adhere to the Bellcore Standard. The higher you try to get your speed, the more you will get into the range of the noise on your line. 14,400 is more or less sensitive to this. 28.8, since it uses most of the frequencies available, most certainly is. These things did, of course, not go unnoticed: more speed on the lines caused more errors sooner. And not every error can be caught by Parity checks at higher speeds. Think about it: if a POP causes one bit to be

lost at a 300 bps/Baud connection, it will cause 4 bits to be lost on a 1200 bps and 8 bits to be lost on a 2400 bps connection! Error Correction. So, smart as humans are, we thought up a way to work around this. We defined a protocol that makes agreements between modems on how to handle data. It will take a block of data and calculate a checksum on it. This is a mathematical trick to describe the data in the block. This checksum will reflect changes in the block fairly accurately. What a modem will do with this Error Correction is calculate the data checksums as the data flows. Every so often it will pass on the Checksum numbers to the other side. This can, for example, be done every 128 bytes or less. The other side also keeps a checksum and compares the two checksums when the block of data is complete. If there is an error, it will kindly ask the other side to resend the block of data. Of course, it takes some time to do this, and if a block needs to be re-sent, this will be noticeable as a delay. But the data going from one side to the other will be correct, almost 100% guaranteed. This Error Correction technology started out under the name MNP, it evolved all the way to MNP-4. Mainly performance improvements were made up to this point. Then the technique was adopted into the V.42 national standard. In more modern error correction protocols, such as MNP-4 and V.42, the data is sent over the line Synchronously. The Error Correction Protocol puts little Synchronization Bits on the line, which the other end receives. Since they now have a Synchronized Clock that they agree on, they can just send data in-between those Clock pulses. Then, they do their own Error Correction, so why send the Parity Bits over the line? In other words, in modern modems with Error Correction, the actual transfer over the line is Synchronous. The modem on either end, and the computer on either end, use UART chips to translate from Synchronous to Asynchronous data. Line Equalization. And of course, with more demands on the phone lines, people started looking for ways to better adapt a modem to a phone line. One of the things used in home stereos to better adopt the speaker sound to your room is an Equalizer; a thing that can add or remove low or high tones, to respond to your room. Well, modem manufacturers did the same with the phone line. They designed circuitry in the modem that will measure on a phone line how it responds to certain frequencies; some may need to be sent a little louder, some a little less loud. And on some lines, there may be frequencies that can not be used at all. So modems can then decide to not use certain frequencies and to use others. Compression. And then Compression Technology came along. If you look at a stream of data, you can sometimes find patterns in it. For example instead of saying 0101 0101 0101 0101 0101 0101 0101 0101 You could say 8 times 0101, which may be shorter. This would

mean that the slowest determining factor on a modem line - The actual line speed would no longer be an issue. So modem manufacturers got together and upgraded MNP-4 to MNP-5, and V.42 to V.42Bis. These protocols do the following two things: They still do all the error correction that we talked about before, but in addition they attempt to compress the data. But to do so, they will need some time and a little data to play with, so they need to be talking to the computer at higher speeds than they are on the line, assuming that they can compress the data and no errors occur. The data is then compressed at one side, before it goes over the line, it is sent over the line at the good old speed of 2400 BAUD and 2400, 9600, 14400 or 28800 bps, and on the other side it is decompressed and fed to the receiving computer at the higher speed. Once again: Making a connection. Now that there are more things that can be done whilst making a connection, more speeds, line equalization, error correction and compression, things are becoming a bit more complicated when we make a connection.. Let's look at the steps again: The Caller (The side we call the Originate) calls out, the other side (the Answer side) rings and picks up. Answer will send the Modem tone, then it will send an unmodulated carrier. The Originate modem will listen, and wait until it hears a carrier it knows. When it does so, it will also send out a carrier, which is slightly lower in pitch. To us, we have so far: Dialing, Ringing, High tone with Dips in it, higher continuous tone, static. Now, the Answer will do the same, and we have two carriers. Next, the modems will query each other about their capabilities. This is done by adding carriers. The Answer will add all carriers it can; in the case of a 9600 modem 3, in the case of a 28,800 modem 11. Originate will hear this and answer with all carriers it knows. In some protocols, this is heard as a series of beeps going from low to high, in some others it just appears there is another burst of static. Carriers that remain unanswered will be dropped. A 14.4 modem for example, dialing into a 28.8 modem, will only recognize and answer the 14.4 carriers. The 28.8 modem will drop the rest and they will start talking at 14.4. Depending on the line quality, some carriers may not be heard, this is how strange speeds like 21600 bps come to be. Now that the modems are talking, they will go through the Adoptive Equalization stage. You hear this as a short low buzz, followed by a lower Hiss, then another beep and a higher Hiss, then another beep and the 'normal sounding hiss.' During these stages, the modems have measured the quality of the line. They will change how they transmit and listen to compensate for line imperfections. If all goes well, the speaker will now shutup, and the CD light will come on. The modems have now successfully managed to talk to each other. Next, they start 'talking' over the carriers. The conversation goes in the form of questions and

answers. The Answerer will ask whether it is okay to do MNP-2, MNP-3, MNP-4, MNP-5, V.42, V.42Bis, etc. etc. The two modems will shortly arrive at a mutual conclusion, and now they are ready to start sending and receiving data. Some modems wait until this point to turn on Carrier Detect. This entire process the modems go through to build up a connection is referred to as Handshaking. At this point, the traffic on the line will most likely be Synchronous, that between the modem and computer will be Asynchronous. The modems will now talk until the connection is broken, or until things go wrong... Retrain, Fall Back and Fall Forward. The modems continuously monitor the status of the line; the quality of the signals they get, the number of errors corrected, the validity of data on each of the carriers. When the modems see excessive problems, they can ask for a re-evaluation of the line. This is done by interrupting the carriers, and sending a low burst tone on the line. Now, the modems will again go through the process of sending out carriers, and doing the adoptive line equalization. This process is called retraining, and may occur at any time. You will hear that your speaker comes on, and your modem starts hissing again. Usually, the initial re-train will result in a 2400 bps connection. This uses only a limited number (2) carriers, and thus will most likely work. This process is called Automatic Fall Back. After a while, if we see few errors, we will again try to re-train. This time, more carriers will be used. Hopefully, if a connection with multiple carriers is indeed successful, our speed will come back up. This process is called Fall Forward. Both Fall back and Fall Forward sequences are controlled by the modems; both sides of the line must support this feature for it to work. On modems that do not support this feature, or that do not support retrains, the connection will often seem to 'drop' on poor lines. The amount of time allowed without a carrier can be configured; it is a good idea to set this to a longer time, such as 20 seconds, and to set the retrain period to a longer period, such as 10 seconds. This way, if someone picks up a telephone, or a callwaiting tone is received, modems may retrain and stay online, instead of loosing a connection. Problems in Handshaking, Retraining, Fall Forward and Fall Back. It should be obvious that the way a modem handles the training, handshaking, Fall Forward and Fall Back procedures will play a large role in the performance of the modem. This is one of the places were manufacturers try to make their mark, by adding and/or removing features. The most problems happen with Error Correction and Compression. A lot of manufacturers make their own non-standard protocols. These are built to not interact with standard protocols.. But they are not always able to avoid interaction with non-standard protocols! This is why sometimes modems of one brand have trouble dialing into, or dialing in on, modems from another brand.

U.S. Robotics is a prime example; when driving the negotiation (i.e. being the Answer modem) things go fine, when Originating (i.e. listening to other people's questions) things sometimes go wrong. Especially when negotiating Data Compression and Error Correction, or when determining Carrier Frequencies, things tend to go wrong. A good way to prevent this from happening is to turn the specific feature that causes the problem off, for example: U.S. Robotics in Originate mode works a lot better without Compression enabled. Data Communication Equipment and Data Terminal Equipment. At this point, when we talk about compression, the difference between DCE (Data Communications Equipment, the modem itself) and DTE (Data Terminal Equipment; the computer) becomes essential. The computer to computer connection looks like this: As was explained in the compression paragraph, the DTE speed is now higher than the DCE speed, in order to facilitate compression and error correction. The part of the modem that does this used to be called an Interspeeder, but has now become so standard that it is hardly ever mentioned anymore. More important, the DTE typically adds Start Bit, Parity Bit, and Stop Bit to the data it sends out. It needs to take care of the signaling etc., and for this it uses a chip called a UART. (Universal Asynchronous Receiver and Transmitter). You simply feed this chip data, it will ad start and stop bits, computer parity, and send things out at the right speed. The higher the speed, the more is asked from the UART. Flow Control With the DCE speed typically lower than the DTE speed, and oftentimes the two DTE speeds being different, we need a way to make the data start and stop at the right moment: Flow Control. The standard technique of flow control, left over from the old and slow days of the teletype, uses what is called the Xon/Xoff protocol. Both Xon and Xoff are normal ASCII characters; Control-Q, ASCII value 17, is Xon. This is read as: Start Sending, I am ready! Control-S, ASCII value 19, is Xoff. It is seen as: Stop Sending! I cannot read anymore! So with Xon/Xoff flow control, a computer will start sending information to a modem. If DCE and DTE speed are equal and there is no compression, it will simply pass all data on to the other end. It will get the data, and send it to the computer, who should have the same DTE and DCE speed. The computer will process the data, and everything will work fine. And if the receiving computer needs a moment to do something? It simply sends an Xoff character down the line. The sending computer will get it and stop sending, waiting for an Xon so it can start sending again. The same happens the other way around.

When modems got smarter and got buffers, the Xon/Xoff characters were actually used by the modems themselves. Rather than going across the DCE channel, they controlled data flow on the DTE channels. The modems themselves used the same protocol on the DCE channel, but this control is usually out of the users' hands. Obviously, the flow control is done as a part of the data stream; you need to insert special things in your data to make it flow or stop. This technique is called inband signaling. The two biggest disadvantages of inband signaling are that you continuously need to monitor the data stream, at high speed, to find the signals, and if one of the DTE's happens to send an Inband Signal as part of the data, unpredictable things may happen! Hardware Flow control and other Out of Band signaling. With higher DTE speeds, and faster computers, modems and computers are not always able to get the Inband Signaling on time; and with the way we send data nowadays, there is a good chance we will use the Inband Signaling Characters in our data stream! So, instead of trying to cram everything into the data stream, we have defined a set of electrical signals that can go to and from the modem and computer to let the other know what is happening. These signals are used for Flow Control and Call Control. We will discuss each one shortly. Remember when you read this: DCE means Modem, DTE means computer, and the functions mentioned can all be changed by software! This is 'standard operating procedure.' We will later look at variations. Data Set Ready, DSR. This signal is controlled by the DCE. It tells the DTE that the Equipment (Modem) is available and functioning to receive data. Ready To Send, RTS. This signal is also controlled by the DCE. It tells the DCE that the Equipment is ready to accept data for transmission over the line, or to the command processor. Carrier Detect, CD. This signal, controlled by the DCE, tells the DTE that there is a carrier, which means there is a DCE-DCE connection. Ring indicator, RI. The DTE will use this signal to let the DCE know that it hears a RING on the line, i.e. there is an incoming call. Data Terminal Ready, DTR. This signal is controlled by the DTE. It tells the DCE that the Equipment (Computer) is available and functioning to receive data. Clear to Send, CTS. This signal is also controlled by the DTE. It tells the DCE that the equipment is ready to accept data for reception from the DCE. All these signals, as well as the standard way of sending and receiving data, are grouped together in a protocol which we know as RS-232. The computers we use today, use all RS-232 signaling with a slightly different voltage level for Signals. Their interfaces are referred to as RS-232C. All these signals are electrical levels on a set of Pins. The RS-232C interface has three more: Signal Ground, GND. This is the electrical Zero for all signals on the serial port.

Transmit Data, TX. This is where a device transmits data to the other device. Receive Data, RX. This is where all data comes in from the other side. And now, we have a total of 8 signals that will let us do Serial Communications with Out -Of-Band signaling. The Chip that does it all: The UART. In most equipment, data flow is Synchronous. This means: There is a clock, and everything happens in rhythm with this clock. On serial lines, this is not the case. The data start and stop bits make the clock. We say this is not Synchronized, or Asynchronous. The UART is the chip in the computer that does the conversion between Synchronous and Asynchronous data. It will take a byte of data from the computer, add start, parity and stop bits, and spell it out on the Serial lines. It will also control all out of band signaling. A UART will however NOT deal with In-Band signaling, that is the task of the software! With Error correction and data compression, the links between two modems are synchronous, so we will need a UART in the modem as well, to translate the Asynchronous data from the computer into Synchronous data on the line, and vice versa. It is needless to say that the faster data moves, the more we will demand from these UARTs. A commonly used UART in PC's is Intel's 8250. According to the specifications, it will work up to asynchronous speeds of 19200 bps. Trying to run faster is not supported by the chip! Although it will work most of the time, it will also often fail. The major problem is that the 8250 only has a one-byte buffer. So when it has received a byte, it needs to get rid of it before the next byte comes. If the software or modem is not fast enough to facilitate this, data loss will occur. Intel solved this by making the 8450 UART, which has a larger buffer and higher speed. it is rated up to 57600 bps. In order for things to work right, we should allow the UARTs to take care of all the signaling (Which means we must use Hardware Flow Control), and we should use UARTs that are fast enough to do the job. So, both the modem and the computer should use 8450 UARTs, or their 16 bit brothers, the Intel 16450 or the 16550, which has a top speed of 115,200 bps. UARTs have an internal clock that they use to make the speed at which serial data flows. This clock is derived from an oscillator, which oscillates at a set frequency, by using a programmable divider. The divider can only divide in steps of two and four. The frequencies it can create directly are: 76800, 38400, 19200, 9600, 4800, 2400, 1200, 600, 300 150 bps. The highest two are only available in the 8450. By multiplication, it can also derive odd numbers such as 57600 (38400 * 1.5) and 115200 (38.4*3). These are, however, not totally precise. Choosing any other frequency will ask the 8240/8450 to 'create' it. It will do so, but the result is NOT guaranteed. The timing will not be precise, and this may cause some serious trouble.

Remember: RS-232C is only guaranteed to work up to 19200 bps! Higher than 38400 is usually more trouble than pleasure. The DCE serial Interface and the DTE Serial Interface So now, let's look at tying a modem and a computer together. RS-232C interfaces come in two flavors: DTE for the computer (A Male, 25-pin, Dtype connector, a.k.a. a DB-25M), and DCE for the modem (A Female, 25-pin, Dtype connector, a.k.a. DB25F). Male means: Pins stick out of the connector. Female means: The connector has holes, no pins. The diagram below shows the Pin assignment: All it takes is a straight-through cable that has a DB-25F on one end, and a DB-25M on the other. Count and you see only 9 pins in use. This is why some smart people decided to use a DB-9M for the DTE instead of a DB-25M. The signals stay the same. They are, however, (of course) mapped to completely different pins. The arrows indicate the direction in which the data flows. You will see that on the DCE side of the interface everything is in Reverse. We say this interface is viewed from the perspective of the DTE side. It should be obvious that a connection with UART controlled Hardware Flow Control will not work unless all lines (Except RI) are connected. Software and settings... And now we get to the fun part: Variations to a theme! Not every computer may support all signals in the standard, not every modem may do so either. Sometimes you may need to make some changes, sometimes you may not wish to use Out Of Band signaling.... You guessed it: The behavior of the computer and modem with regard to every set of signals is fully programmable on both ends. Obviously, there are no signals to have one tell the other what it is doing, nor is there an agreement on what to do over the data channel. In other words, it is humans with programs to the rescue! Hayes, one of the modem pioneers, designed the Hayes modem Command Language. It uses simple inband commands in ASCII form to control the modem. The modem has a command mode in which it resides when it is not connected to another modem. In command mode, it will read every line that asks for its attention. This is done by prefacing a line with the letter AT, from ATtention! Then, numerous commands can be given that will tell the modem what to do. Everyone in the industry has copied these commands. Hayes was stupid enough to forget to copyright or patent them. This was of course good, since it created an open standard... ...and it was also bad, since everyone started making extensions to the command set! There is, however, still a group of core commands that works on nearly every modem. An overview with the exact explanation of what it means follows. In the list, the first column gives the command, the second column gives the recommended setting, and the third column gives the explanation. A

Answer Incoming Call

When a call RINGS, the word RING will appear on the screen. Giving the ATA command will tell the modem to pickup and start a connection. This takes the modem out of command mode. D

Ex

Dial a telephone number. This is followed by the number to call. Some special things that may be used in a number are: T Dial Tone dial P Dial with Pulse dial , Wait a few seconds w Wait for a second dialtone 0-9,* and # are just sent out as you'd expect. On most modems, entering letter instead of numbers will not work, and may produce some very weird results! E1

Hx

Echo Characters in Command Mode. When set to 0, you will not see an echo of commands you type. Should in almost any case be set to 1. Hook Switch Control. Sending the ATH0 command hangs up the phone line if it was Off Hook. Sending ATH1 will force the line off-hook, but not start the handshaking process. Useful for busying out a line.

Kx

K1

Break during Error Control Allows or Prevents retrain breaks during Error Control situations. This should always be left in the K1 setting, which should be the default.

Mx

M1

Speaker Mode. Controls when the sound on the phone line is passed through in the internal modem speaker: M0 Speaker always off M1 Speaker On until Carrier Detect M2 Speaker Always On

Qx

Q0

Quiet Mode When set to Quiet mode, a modem does not return responses to commands given to it. This is not useful for normal use, and should be left in the default Q0 setting. Q1 enables Quiet mode.

Vx

V1

Verbose Mode. When set to 1, all responses to commands will be sent as verbal messages, such as OK and ERROR. When set to V0, only a number will be returned. This setting should generally be left V1.

Xn

X5

Response and Dialing Mode This command controls what responses will be given when dialing other modems, and what checks will be performed whilst dialing and connecting. These are the options: X0 Basic Response, do not check for Dialtone or Busy X1 Extended response, do not check for Dialtone or Busy X2 Extended response, check Dialtone, do not

check Busy X3 Extended response, do not check Dialtone, do check Busy X4 Extended response, Dialtone and Busy detection X5 Basic Response, Dialtone and Busy detection If you are behind a PBX and can't dial out, using No Dialtone Detection usually fixes the problem. Using No Busy Detection can be useful when a modem sees a RING as a Busy (Sometimes happens in PBX's). I suggest using Basic Responses, since it will not tell the user all the scuzzy details about the line speed... Z

&Bx

Reset modem to NVRAM defaults. Stay away from this command.. you NEVER know what you will get into! Rather, use AT&F and create your configuration. In some cases, when all else fails, ATZ does miracles though. &B0

DSR Behavior. This is an important one! It controls how DSR behaves on your modem, and that is of course one of the Hardware Flow Control lines! Settings are: &B0 &B1 &B2

DSR always ON DSR does what DTR does DSR signals normal RS-232C behavior

Due to software legacy, you should ALWAYS use &B1!! This says: The modem equipment is Ready. Without this signal, and with Hardware Flow Control, you will not be able to talk to the modem AT ALL, since your computer will refuse to talk to something that is not ready to listen!! CD and CTS will take care of online detection and flow control issues. &Cx

&C1

Carrier Detect behavior. This should always be set to &C1 in normal situations! It will tell the software whether there is a carrier or not, so the software can redial if no carrier is present anymore (We lost the line.) This is often used to detect whether a connection is Up or Down, so setting this one wrong may cause some real confusion! &C0 DCD Always ON &C1 DCD follows RS-232C standards &C2 DCD Wink; always on but 'winks' off when carrier lost

&Dx

&D2

Response to DTR This setting controls what the modem does when DTR is toggled. In most applications, this should be set to &D2. This will cause the modem to disconnect as soon as the DTR line is dropped. Most software drops DTR to break a connection. Setting this to &D0 may cause connections to not drop when

you attempt to close a connection. Setting it to &D3 will cause an ATZ to happen every time the modem hangs up.. Depending on the settings in your NVRAM, this is NOT a good idea! Safest option is &D2. &D0 &D1 &D2 &D3 settings &F

Ignore DTR Go to Command mode after DTR drop Drop connection after DTR drop Drop connection and reset to NVRAM after DTR drop

Reset to Factory Settings. Will load the modem's factory setting from the ROM on the modem. Factory Settings are usually Full Flow Control, All Error Correction, Most Flexibility and Reliability. This is a good setting to try, without anything else! On most modems there is more than one AT&F option nowadays. AT&F1 through 8 have been seen on a lot; it may be a good idea to walk through several AT&Fx options until you find one that works, rather than trying to work out all the right parameters by yourself.

S0=x

0

Numbers of Rings to Auto Answer Should be set to 0; this is the number of rings after which the modem will automatically try to answer a call.

S7=n

60

Wait time for remote carrier. Should be set fairly high; this is the time the modem will take to wait for a carrier after it dials, and also after a retrain is initiated for whatever reason. It will really not hurt anything to set this high!

S9-n

5

Carrier Detect Time required for Recognition. After a carrier has been heard for this long, we say it is really a carrier. Increasing this value sometimes helps on noisy lines.. Do not make higher than about 10!

S10=n

60

Wait on Loss of Carrier Time waited after a loss of remote carrier before we stop attempting to retrain; again this should be set high, 60 would be a good value!

Where are the Hardware Flow Control Commands? Note that the table has no Enable or Disable Hardware Flow Control commands?? That is because those happen to not be standardized! Here are a few: U.S. Robotics &H1&R2 ZyXELL &H3 LineLink &K3 or \Q3 A lot of modems use Rockwell Chips. Here are two common types and the Hardware Flow Control Enablers:

RC144AC &K3 RC144DP \Q3 All of these set up Bi-Directional Out of band (or hardware) Flow Control. Note that by far not all modems are listed here. You will need to look in the manual to enable Hardware Flow Control, RTS/CTS Flow Control, or Out-Of-Band Flow Control. Most modems can offer Xon/Xoff on top of Hardware Flow Control. This is not a good idea! Avoid using this setting at all cost! Some common problems. The modem will not dial, it says no dialtone, but I can hear it! To you it may sound like a dialtone, to the modem it does not. It may be either a wrong pitch, not loud enough or too loud. Try giving the ATX0 command before you dial. You may also want to look at your phone cord; is it "straight through" or are the wires crossed? You may also want to try unplugging some other equipment plugged into the modem or into the same line. The modem dials; when the other end rings it says BUSY and hangs up, but I hear it ringing! The modem does not recognize the ringing signal as a ring. This happens often when you're dialing from a PBX or Keys System, or dialing long distance or international. Try giving the ATX0 command. Also, check to make sure your phone cord does not have wires crossed, and make sure there are not many other things plugged into your line like answering machines. My modem dials, the other answers, and they negotiate forever! Usually, this is caused by poor line conditions. Try calling again, or calling a different number. If you are calling long distance, try using a line without Echo Cancellation; your long distance carrier should be able to tell you what prefix to dial to do this. This may also point to interference of other equipment on your line. Alarm systems, fax machines, answering machines and other things that use modems (Such as Credit Card machines!) are suspect. Try unplugging these. Another cause can be an incompatibility between your modem and that at the other end; try turning of Data Compression, dial again. If that does not work try turning off error correction, and try again. If that does not work, try forcing your modem to dial at a lower speed (For example, 9600 instead of 14400). The connection continuously retrains. You probably have a noisy line from you to the other modem. This problem can literally be anywhere. Make sure you have a healthy phone cord, make sure there is not too much equipment on your phone line such as answering machines, faxes etc. etc. Try dialing in at a lower speed, to a different number, too. Try what happens when you turn of Retrain, Fallback or Data Compression / Error Correction. The connection just drops with a No Carrier message. You lost the other side. Look at the S switches that set the time you will try to retrain, make sure there is no one picking up the phone on the line you are using. Make sure

call waiting is disabled, make sure there are no devices such as Fax Machines or Answering Machines or Alarm Systems trying to use the line. Whenever it rains,, my connections fail. Congratulations, you are the proud owner of a dirty line! You can check your inside wiring, to make sure it is correct, and all your connections to the line. Also check that your phone connection, if outside, is absolutely dry. The Phone company can usually come out and attempt to fix this (mostly without success) for a hefty fee. You should notice your line also hisses when it rains. Sometimes I am unable to connect. Well... This is not an Exact Science! Numerous conditions can cause this, including the way calls are routed in the switch, the traffic on other lines, etc. etc. Try to find a pattern in this problem. Whenever I receive a lot of data, I lose pieces of it. Check your Flow Control, make SURE both Computer and Modem are set for Hardware Flow Control, and Hardware Flow Control ONLY! Whenever I receive a lot of data, my modem hangs up after a while. Make sure your software uses RTS/CTS Flow Control, and NOT DSR/DTR flow control! What will happen when your buffer is full is that your computer will drop DTR to signal the modem to stop sending.. but the modem reads this as: Hang up the line, which it promptly does! I can type lowercase letters, but the return key does not work! Check to make 100% sure you have your software set for 8 Databits, No Parity, and One Stop Bit. Usually, this problem is caused by 7 databits, Even parity, One Stop bit setting. When Xmodem sends me a file, it always hangs at block 19. When Zmodem sends me a file, it stops at about 19 Kilobytes! Make sure Computer and modem are both set for Hardware Flow Control (Or RTS/CTS flow control). If so, make sure your modem is set for Xon/Xoff pass through. Xmodem and Zmodem both send block counters.. The block counter for block 19 is ASCII Value 19, which is the same as Control-S, which is the same as Xoff, and will stop the data flow! My connection dies when I send or receive a lot of data, but the modem stays online, and I can see the RD and SD lights flash.. You probably had a buffer overflow. Here are a few things to try: Make sure you use hardware Flow Control, and Hardware Flow Control ONLY! make sure you use a correct serial port speed that is not too high for your port. Try 38400 or lower (19200, 9600 etc.) Make sure the modem is setup for hardware flow control. I am set for hardware flow control, but the problems continue! Make sure you have a full cable, that holds all 8 active pins! Radio Shack sells Gizmo's you can plug in your modem to verify all lines are working. If you have an internal modem, you're out of luck.

Suddenly, in the middle of a connection, I get nothing but garbage. Probably, you lost Sync on the Synchronous part of your connection (The DCE-DCE part) and error correction is not yet aware of this, or unable to correct it. Hang up and dial again. If this keeps on happening, turn of error correction and/or compression. I get nothing but garbage, my commands are not recognized! Make sure you are set for 8 databits, No Parity, One Stop bit. Make sure you use one of the supported bps rates (38400, 19200, 9600, 2400, 1200, 300). My speed is 19,200. I can dial, but then I only get garbage! Probably your modem is not properly set for Interspeeding or Speed Adoption. Try dialing at 9600 and see what happens. Especially if you have a slow (say.. 2400 bps modems) try this! In general, modems will not talk faster than 4 times their top speed in Modem mode. Modems without compression often do not talk faster than their top speed, or the next 'notch' over it (i.e. 19200 for a 14400 modem). Some modems that are 14400 will not talk faster or slower than 14400. This is not a speed the UART deals with very well; you will probably run into a lot of trouble. I have a sound board that doubles as a modem, and it doesn't work too good. That is right. A sound board was not created with this purpose in mind! It uses its Digital Signal Processing or DSP chips to try to emulate a modem. This would work fine, if it weren't for all sorts of little things that the sound board people left out, such as special Filters and Adaptive Equalization. Best bet is getting a real modem.

Related Documents

Pratik Bilgiler
October 2019 22
Teknik Bilgiler
June 2020 25
Iskorpitx Bilgiler
November 2019 17
Pratik Resume
June 2020 10
Quality Control Pratik
November 2019 10