Security Exercise 12 Asynchrnus Serial Digital Baseband Transmissin Discussin: In this chapter, yu learned that bits are transmitted ver a cpper wire as a series f vltage pulses (a prcess referred t as line cding). Yu als learned that there are a number f ways t represent nes and zers with vltage pulses (e.g., is a 1-bit represented by a vltage pulse and a 0-bit by n vltage pulse? Or is a 1-bit a psitive vltage pulse and a 0- bit a negative vltage pulse? Des the pulse last fr the entire bit? Etc.). Imprtant takeaways frm tday s lecture as they apply t this SX: Nrmal vltage n the wire is lw A 1-bit is a lw vltage pulse; s a 0-bit is high ASCII characters are transmitted in 8 data bits The data bits are transmitted in reverse rder, the least significant bit first T transmit an ASCII character, a start bit is transmitted first, and a stp bit is transmitted last (after the data bits) A start bit is a 0-bit; s a start bit is high A stp bit is a 1-bit; s a stp bit is lw Objective: T familiarize each Midshipman with hw ASCII characters are physically represented when transmitted ver a wire. That is, when we transmit an ASCII character, we dn t actually transmit 1s and 0s, but rather vltage wavefrms that represent the 1s and 0s. Part 1: Hardware Set Up Since yur cmputer des nt have the serial utput prt we need fr this security exercise, we will use an adapter that plugs int ne f yur USB prts and will cnvert the USB prt t the desired type f serial prt. An scillscpe (usually shrtened t - scpe) will be used t display what the signal lks like. Wiring will carry the signal frm yur laptp t the -scpe s it can be viewed. Carefully plug the serial prt adapter int ne f yur laptp s USB prts. This is shwn in the pht t the right. The rest f the wiring shuld already be prestaged s yu ONLY need t plug in this serial prt chip. On the -scpe, push the buttn that says SAVE/RECALL, then the buttn n the screen (a sft buttn) that says RECALL SETUP, then RECALL FROM SETUP, then SETUP 10. Once yu recall Setup 10, yur O-scpe display shuld lk similar t the figure t the right, which is anntated with sme useful infrmatin relative t the setup. Hardware set up is nw cmplete. On the fllwing page is an anntated picture f the O-scpe face, anntated with all the cntrls that yu may use in this SX and in fllwing SXs.
Part 2: Tera Term Sftware Set Up T set up the cmmunicatins, we ll use a prgram called Tera Term, which wrks like Telnet that yu used back in SY110, allwing yur cmputer t talk directly t anther cmputer. Tday, yu wn t be talking t anther cmputer, but yu re telling Tera Term that yu want it t send data t smewhere utside yur cmputer. This way, yu ll see the bits transmitted when yu press a keybard key using the pins n the utput f the serial prt chip. T be precise, tday yu ll be setting up and using asynchrnus serial data cmmunicatin. Create a flder n yur desktp called SX12, then dwnlad the file called teraterm-4.95.exe frm the U: drive in the U:/Cyber2/EC310/SX12 Physical Layer flder and mve it t yur SX12 flder. Duble-click the teraterm-4.95.exe file t install it n yur laptp. Accept the license agreement, accept all the default installatin ptins, and n the final windw ( Finish ), check the bx labeled Launch Tera Term and click n Finish. When Tera Term starts up, a dialg bx similar t the ne shwn belw will appear. The default type f cmmunicatin is TCP/IP, but chse Serial and the cmmunicatin prt used will be the serial prt assciated with the serial prt chip. Nte: if fr sme reasn the Serial chice is nt available, cntact the instructr r lab tech yu ll have t install an additinal piece f sftware t make it wrk.
Click OK and yu re ready t cmmunicate using the Tera Term VT windw shwn belw. When yu click in this windw and then press the keys n yur keybard, yu will be transmitting thse ASCII characters. The Tera Term windw is nw n yur desktp, and lks like the fllwing: Befre cmmunicating, ensure the cmmunicatin prtcl is set up crrectly. Frm the Setup drpdwn menu, chse Serial prt, and a dialg bx similar t the ne shwn belw will appear. All f the parameter values yu see in this dialg bx are the nes we will use tday. Other than the Prt number (yur prt number may be different than mine, but that s kay), these shuld be the default settings. Other than the Prt number, if yur settings dn t match the figure belw, change it t the fllwing selectins. These settings define the prtcl we will be using, and are described as: Prt Which prt number yur cmputer is using fr this serial cmmunicatin. Baud rate Hw fast symbls (vltage pulses that represent 1s and 0s) are transmitted, in symbls/sec. In ur case, each symbl (vltage pulse) represents a bit, s the bit rate in bits/sec is equal t the baud rate. Data The number f bits f data transmitted in each burst. Parity Used fr errr detectin. An extra bit culd be sent t help the receiver determine if a bit has been received in errr. We will nt be using parity. Stp The number f stp bits we will use. This culd be 1, 1.5 r 2. Nte that 1.5 stp bits is basically a stp bit that lasts a bit and a half in duratin. Flw cntrl This helps cntrl the flw f data if the ne cmputer is nt as fast as the ther. Transmit delay If needed, there will be a delay in between transmissins. Click n OK. Finally, set up a lcal ech f the keys yu type. Frm the Setup drpdwn menu, chse Terminal and check the bx labeled Lcal ech as shwn belw, then OK. This will allw yu t see the keys yu type in the Tera Term VT windw.
We are nw ready t begin cmmunicating! Part 3: Asynchrnus Serial Digital Baseband Transmissin Hw many bits d yu expect t see n the -scpe when yu press a key n yur keybard? Let s lk clsely at what was displayed n the picture f the -scpe face shwn earlier. Push the SINGLE SEQ buttn n the O-scpe, then in the Tera Term windw press the lwercase m key. The fllwing figure shws what yu shuld see n the -scpe when yu press the m key (lwer-case m). It is imprtant t get a sense fr hw wide a single bit is (that is, hw much time it takes t transmit ne bit) s yu can lk at cnsecutive nes r zers and tell hw many there are. The figure is anntated t describe what is seen and hw t take that and determine which ASCII character has been sent. We cunt 8 bits fr the ASCII character, ne START bit, and we re using ne STOP bit, s transmitting a single key n the keybard crrespnds t 8+1+1 = 10 bits. We dn t actually see the STOP bit, because it is a 1-bit (lw), and the vltage n the wire is nrmally lw but it is there. It wuld be apparent had transmitted mre than ne character in the same transmissin (mre n this later).
Since we want t cmpare what was seen n the -scpe t what we seen in an ASCII table, pen a brwser and refer t the ASCII table at: https://www.sciencebuddies.rg/science-fair-prjects/prject_ideas/cmpsci_ascii_table.shtml This table cnveniently shws the 8-bit representatin fr ASCII characters (as bits, nt hex values) that yu ll need t answer questins in this security exercise. NOTE: When n transmissin ccurs, vltage is lw, and nly ges high when the start bit appears. Als, if yu lk up m in the ASCII table, yu d see (in binary) 0110 1101, which seems t be the reverse f what is transmitted! It lks like bits are sent in smething like a little-endian frmat! This means that after determining what the data bits are, they must be reversed t match what is in the ASCII table. ALSO NOTE: Cmparing the display abve and the ASCII table, yu can als see that fr this cmmunicatin link, START bits are 0-bits, s a 0-bit is high vltage, and a 1-bit is lw vltage. This is but ne way t represent transmitted 1s and 0s with vltage pulses. IMPORTANT: In between transmissins, push the SINGLE SEQ buttn n the O-scpe s that the O-scpe is ready t trigger n the next character. Push the SINGLE SEQ buttn n the O-scpe s that the O-scpe is ready t trigger n (capture) the next keystrke, then type the u (lwer case u) character. The vltage signal representing the character that yu typed in the Tera Term windw shuld nw appear n the -scpe (after yu prperly made all the adjustments abve). Hw many bits d yu see? Questin 1: Fr the u character, draw a rugh sketch f the wavefrm yu transmitted n yur answer sheet, and specify the crrespnding bits yu believe them t be (1s r 0s). Indicate which bits are data bits and which are start/stp bits. Questin 2: Cmpare the bits yu ve seen n the O-scpe with the ASCII table frm the website pinted ut earlier in this security exercise, and determine if they match. D they match? Push the SINGLE SEQ buttn n the -scpe, then press the U (uppercase U) character. Questin 3: Fr the U character, draw a rugh sketch f the wavefrm yu transmitted n yur answer sheet, and specify the crrespnding bits yu believe them t be (1s r 0s). Indicate which bits are data bits and which are start/stp bits. Again, cmpare the bits yu see t the ASCII table t ensure they match. If they dn t, cntact the lab tech r instructr. Push the SINGLE SEQ buttn n the -scpe, then press the ~ (tilde) character. Questin 4: Fr the ~ character, draw a rugh sketch f the wavefrm yu transmitted n yur answer sheet, and specify the crrespnding bits yu believe them t be (1s r 0s). Which bits are data bits and which are start/stp bits? And fr the last time: cmpare the bits yu see t the ASCII table t ensure they match. If they dn t, cntact the lab tech r instructr. Questin 5: The hrizntal axis (time) shuld be set t 250 μsec/div (micrsecnds), that is, each f the blcks n the display is 250 μsec wide. Fr the ~ (tilde) character wavefrm which shuld still be n the -scpe, estimate what the duratin f ne bit is fr this transmissin (that is, hw wide in secnds is ne bit)? Questin 6: Yur answer t Questin 5 is hw lng a bit lasts in secnds. Bit rate is hw many bits per secnd (bps) are being transmitted. Calculate the bit rate fr this transmissin using yur answer t Questin 5. What shuld the bit rate be (that is, what did the settings fr the serial cnnectin in Tera Term say it shuld be)? Nw let s transmit a small text file. Dwnlad the file called Us.txt frm the U: drive and mve it t yur SX12 flder. In rder t be able t see all the bits, using the HORIZONTAL POSITION knb, mve the small arrw n the tp f the display in the left directin s that it is clse t the left edge f the screen (this adjusts time = 0 t clse t the left edge f the display).
Push the SINGLE SEQ buttn n the -scpe In the Tera Term windw, chse Send file frm the drpdwn menu, and navigate t yur SX12 flder and chse Us.txt. Questin 7: Fr sending this file, hw many bits were transmitted? Write ut the stream f bits transmitted, including start and stp bits. In yur stream f bits indicate the ASCII characters. Questin 8: What type f line cding is used in this SX? Questin 9 (bnus): Using ONLY the transmitted vltage pulses in the screen capture shwn in the figure belw, determine the ASCII character(s) that have been transmitted. Security Exercise 12 Answer Sheet Name:
Questin 1: Character u (lwercase u) Questin 2: Questin 3: Character U (uppercase U) Questin 4: Character ~ (tilde) Questin 5: Questin 6: Questin 7:
Questin 8: Questin 9 (bnus): What is (are) the ASCII character(s)?