1 / 19

Controllo remoto di dispositivi tecnologici via TCP/IP

Controllo remoto di dispositivi tecnologici via TCP/IP. FMod TCP. FMod TCP. FMod TCP. FMod TCP: applicazioni. Protocolli IP. TCP (Transmission Control Protocol ) affidabile, lento UDP (User Datagram Protocol ) poco affidabile, veloce. Indirizzo IP.

kesia
Télécharger la présentation

Controllo remoto di dispositivi tecnologici via TCP/IP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Controllo remoto di dispositivi tecnologici via TCP/IP

  2. FMod TCP

  3. FMod TCP

  4. FMod TCP

  5. FMod TCP: applicazioni

  6. Protocolli IP TCP(Transmission Control Protocol ) affidabile, lento UDP(User Datagram Protocol ) poco affidabile, veloce

  7. Indirizzo IP Un numero che identifica univocamente nell'ambito di una singola rete i dispositivi collegati con una rete informatica che utilizza lo standard IP (Internet Protocol) Es.: 66.249.93.104

  8. Indirizzo MAC Media Access Controldetto anche indirizzo fisico o indirizzo ethernet o indirizzo LAN, ed è un codice di 48 bit (6 byte) assegnato in modo univoco ad ogni scheda di rete ethernet prodotta al mondo Es.: 00-50-FC-A0-67-2C

  9. Porte Le porte sono numeri (in TCP e UDP sono a 16 bit) utilizzati per identificare una particolare connessione di trasporto tra quelle al momento attive su un calcolatore. I pacchetti appartenenti ad una connessione saranno quindi identificati dalla quadrupla [<indirizzo IP sorgente>, <indirizzo IP destinazione>, <porta sorgente>, <porta destinazione>].

  10. FMod TCP: applet Java

  11. Terminale A Terminale B Connessione TCP

  12. Connessioni con il modulo TCP Port #80 for HTTP communication. TCP Port #8000 for UART transceiver. TCP Port #8010 to access I/O registers and I2C bus. UDP Port #7010 to access I/O registers and I2C bus.

  13. valoreregistro PC FMod Connessioni con il modulo

  14. Registri

  15. Lettura via TCP/IP: richiesta • Read register(s) value command: • Byte# Number of bits Example • 0x00 Read (0x0021) 16 bits 0x0021 • 0x02 TransactionID 16 bits 0x1B34 • Number of registers to 0x04 read (X) 16 bits 0x0001 • X * Registers • 0x06 Addresses X * 8 bits 0x02 • 0x06+X Checksum 16 bits 0x…

  16. Lettura via TCP/IP: risposta The module answers with the following sequence: Byte# Number of bits Example 0x00 Read Answer (0x0023) 16 bits 0x0023 0x02 TransactionID (same as demand) 16 bits 0x1B34 0x04 Number of bytes in answer 16 bits 0x0019 0x06 Register address 8 bits 0x02 … Register value 8—128 bits (16B) 0x12345 The two previous entries are replicated for every register that has been asked for reading … Checksum 16 bits 0x…

  17. Scrittura via TCP/IP: richiesta • Write register(s) value command • Byte# Number of bits Example • 0x00 Write (0x0022) 16 bits 0x0022 • 0x02 TransactionID 16 bits 0x1B34 • Number of bytes in • 0x04 command 16 bits 0x0003 • 0x06 Register Addresses 8 bits 0x02 • 0x07 Register value 8 — 64 bits 0x1234 • The two previous entries are replicated for every register that has been asked for reading • … Checksum 16 bits 0x…

  18. Scrittura via TCP/IP: risposta The module answers with the following sequence: Byte# Number of bits Example 0x00 Write Answer (0x0024) 16 bits 0x0024 0x02 TransactionID (same as demand) 16 bits 0x1B34 0x04 0x0000 16 bits 0x0000 0x06 Checksum 16 bits 0x…

  19. Checksum • Example (in hexadecimal): • !0x0021 (0XFFDE)  0x0000FFDE (Read) • +!0x1234 (0xEDCB)  0x0001EDA9 (TransID) • +!0x0003 (0xFFFC)  0x0002EDA5 (3 reg to read) • +!0x0A10 (0XF5EF)  0x0003E394 (reg 0A,10,02) • +!0x02(00) (0XFDFF)  0x0004E193 • Note that in this case a last 00 is implicitly used. (02  02 00). • 0x0004 + 0xE193 = 0xE197, (carry=0) • 0xE197 + carry = 0xE197 • Checksum = 0xE197

More Related