SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Os Segredos dos dispositivos
Wi-Fi e Stack TCP/IP para
Microcontroladores
Training Partner Microchip
www.microgenios.com.br
Professor : Fernando Simplicio
PROFESSOR: FERNANDO SIMPLICIO Slide 2
Agenda
Falando um pouco sobre Stack TCP/IP Microchip
Navegando em um projeto com Stack TCP/IP no MPLAB X
Módulo Wi-Fi MRF24WB/G
Módulo Wi-Fi RN171
Falando um pouco sobre:
Stack TCP/IP Microchip
www.microgenios.com.br
Training Partner Microchip
www.microgenios.com.br
PROFESSOR: FERNANDO SIMPLICIO Slide 4
Stack TCP/IP Microchip
• A Microchip oferece gratuitamente as pilhas TCP / IP otimizada para
todos os MCU famílias 8-/16-/32-bit Microchip.
• A pilha é um conjunto de programas que prestam serviços ao TCP / IP
baseada em todas as aplicações.
• Os usuários não precisam conhecer todos as tarefas e especificações
da pilha TCP / IP para usá-la.
• A pilha é dividida em várias camadas, onde cada camada acessa os
serviços de uma ou mais camadas e subcamadas.
• Aplicação em “Real Time”
• A pilha é um projeto modular e foi escrito em Linguagem de
programação C.
• Compatível com os compiladores xC18, xC30, xC32
• Supported Protocols: ARP, IP, ICMP, UDP, TCP, DHCP, SNMP, HTTP,
FTP, TFTP
• Camadas de transporte TCP (socket Server e Client) e UDP
• Sockets Layer (SSL)
PROFESSOR: FERNANDO SIMPLICIO Slide 5
Stack TCP/IP Microchip
Faça download do Stack em:
www.microchip.com/mal
PROFESSOR: FERNANDO SIMPLICIO Slide 6
Stack TCP/IP Microchip
Ethernet com ENC28J60 (10Mbit)
Ethernet com ENC624J600 (10Mbit)
PROFESSOR: FERNANDO SIMPLICIO Slide 7
Exemplo de Ligação do ENC
Ethernet com ENC28J60 (10Mbit)
PROFESSOR: FERNANDO SIMPLICIO Slide 8
Microcontrolador com ETHERNET
PROFESSOR: FERNANDO SIMPLICIO Slide 9
Benefícios do uso da ETHERNET
Controle e monitoramento de equipamentos
Automação residencial
Automação comercial
Automação Industrial
PROFESSOR: FERNANDO SIMPLICIO Slide 10
O QUE É PRECISO?
+ +
+
=
+
Stack TCP/IP MPLAB X Compilador XC32
EasyPIC Fusion com
ETH MCUcard with PIC32MX795F512L
PROFESSOR: FERNANDO SIMPLICIO Slide 11
Etapas no Desenvolvimento
IP: 169.254.1.1
PROFESSOR: FERNANDO SIMPLICIO Slide 12
Um pouco mais sobre Binarização das
páginas de Internet
Convertendo em Binário (MPFS)
as páginas de internet e
salvando na memória EEPROM
Externa ou Interna do MCU.
Navegando em um projeto com
Stack TCP/IP no MPLAB X
Training Partner Microchip
www.microgenios.com.br
Módulo Wi-Fi MRF24WB/G
Training Partner Microchip
www.microgenios.com.br
PROFESSOR: FERNANDO SIMPLICIO Slide 15
Wi-Fi - MRF24WB/G
Training Partner Microchip
www.microgenios.com.br
IEEE 802.11 b/g Wi-Fi Transceiver Module
Wi-Fi Direct, SoftAP
Data Rate: 1, 2, 5.5, 11 Mbps 802.11b; 6, 9, 12,18, 24, 36, 48, 54 Mbps 802.11g
Compatible with IEEE 802.11b/g/n networks
Small size: 21 mm x 31 mm 36-pin surface mount module
Wi-Fi Protected Setup (WPS)
Supports low-power, low data-rate Wi-Fi
FCC (USA), IC (Canada), ETSI (Europe) Certified
Integrated PCB Antenna with simple four-wire SPI interface to PIC®
microcontroller
WEP, WPA-PSK, WPA2-PSK Security
PROFESSOR: FERNANDO SIMPLICIO Slide 16
Para usar o MRF24WB/G no Stack
Devemos adicionar a camada Wi-Fi ao Stack TCP/IP
Módulo Wi-Fi RN171
Training Partner Microchip
www.microgenios.com.br
PROFESSOR: FERNANDO SIMPLICIO Slide 18
RN171
FCC / CE/ IC certified 2.4GHz IEEE 802.11b/g
Small form factor: 1050 x 700 x 130 mil
Configurable transmit power: 0dBm to 10 dBm
RF pad connector for antennas
Certified antennas: Chip antenna, 4” Dipole,
PCB trace and wire antenna
Ultra-low power - 4uA sleep, 38mA Rx, 120 mA Tx at 0dBm
High throughput - 921Kbps TX, 500Kbps RX
Secure WiFi authentication WEP-128, WPA-PSK (TKIP), WPA2-
PSK (AES)
10 general purpose digital I/O
8 analog sensor interfaces
Built in networking applications DHCP, UDP, DNS, ARP, ICMP, TCP,
HTML client Accepts 3.3V regulated power supply or 3V battery
Supports Adhoc and infrastructure networks
On board complete TCP/IP networking stack
Training Partner Microchip
www.microgenios.com.br
PROFESSOR: FERNANDO SIMPLICIO Slide 19
Tipos de Topologia de Rede
Infraestrutura:
Clientes se comunicam através de um
AP
Mais comum, como conexão entre PC
e rede doméstica
Adhoc:
Conexão Ponto-a-Ponto
Cada nó conectado com um outro
Android não suportado
Soft AP:
Módulo comporta-se como um Access
Point
Módulo AP é o coordenador
Gerenciamento básico da redeDHCP,
routing, gateway redirection
PROFESSOR: FERNANDO SIMPLICIO Slide 20
RN Series: Características
Pilha integrada
API ASCII
Radio 802.11 b/g
Segurança
WEP
WAP1
WAP2-Personal
Topologia de rede
Infraestrutura
Soft AP-Mode
Ad-hoc
Serviços
TCP, UDP, WPS, DNS,
DHCP, FTP, HTTP,
Configuration Web
Server, etc.
Teste Prático com o
Módulo Wi-Fi RN171
Training Partner Microchip
www.microgenios.com.br
PROFESSOR: FERNANDO SIMPLICIO Slide 22
Teste Prático
O objetivo desse laboratório é apresentar como
conectar o módulo RN-171 em uma rede
Wi-Fi.
1. Escanear e verificar as redes existentes.
2. Configurar RN-171 para conectar a esta rede.
PROFESSOR: FERNANDO SIMPLICIO Slide 23
Teste Prático
O objetivo desse laboratório é apresentar como
conectar o módulo RN-171 em uma rede
Wi-Fi.
Comandos a serem usados:
• scan 500
• set wlan ssid <NOME_REDE>
• set wlan phrase <SENHA>
• set wlan join 1
• save
• reboot
Training Partner Microchip
www.microgenios.com.br
PROFESSOR: FERNANDO SIMPLICIO Slide 24
Conclusão
Dependendo do seu conhecimento,tempo e custo do
seu equipamento, o uso do Stack TCP Embarcado é
o ideal (ethernet Cabeada) . Se for usar Wi-Fi com
MRF24, só vale a pena se o projeto já tenha sido
iniciado usando a pilha TCP, pois o custo do módulo
é quase o mesmo que o RN171.
Caso pretenda usar Wi-Fi use os dispositivos
prontos, já com stack integrado! É mais fácil de usar,
porém o programador deverá saber como
desenvolver o software, a fim de tratar os retornos
do módulo.
Training Partner Microchip
www.microgenios.com.br
Duvidas?!
Training Partner Microchip
www.microgenios.com.br
É muito mais fácil com a Microgenios!
Facebook | www.facebook.com/microgenios.microcontroladores
Youtube | www.youtube.com.br/microgenios
Obrigado!

Contenu connexe

En vedette

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

En vedette (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Slides do WebSeminário: Os segredos sobre Dispositivos Wi-Fi e Stack TCP IP para Microcontroladores

  • 1. Os Segredos dos dispositivos Wi-Fi e Stack TCP/IP para Microcontroladores Training Partner Microchip www.microgenios.com.br Professor : Fernando Simplicio
  • 2. PROFESSOR: FERNANDO SIMPLICIO Slide 2 Agenda Falando um pouco sobre Stack TCP/IP Microchip Navegando em um projeto com Stack TCP/IP no MPLAB X Módulo Wi-Fi MRF24WB/G Módulo Wi-Fi RN171
  • 3. Falando um pouco sobre: Stack TCP/IP Microchip www.microgenios.com.br Training Partner Microchip www.microgenios.com.br
  • 4. PROFESSOR: FERNANDO SIMPLICIO Slide 4 Stack TCP/IP Microchip • A Microchip oferece gratuitamente as pilhas TCP / IP otimizada para todos os MCU famílias 8-/16-/32-bit Microchip. • A pilha é um conjunto de programas que prestam serviços ao TCP / IP baseada em todas as aplicações. • Os usuários não precisam conhecer todos as tarefas e especificações da pilha TCP / IP para usá-la. • A pilha é dividida em várias camadas, onde cada camada acessa os serviços de uma ou mais camadas e subcamadas. • Aplicação em “Real Time” • A pilha é um projeto modular e foi escrito em Linguagem de programação C. • Compatível com os compiladores xC18, xC30, xC32 • Supported Protocols: ARP, IP, ICMP, UDP, TCP, DHCP, SNMP, HTTP, FTP, TFTP • Camadas de transporte TCP (socket Server e Client) e UDP • Sockets Layer (SSL)
  • 5. PROFESSOR: FERNANDO SIMPLICIO Slide 5 Stack TCP/IP Microchip Faça download do Stack em: www.microchip.com/mal
  • 6. PROFESSOR: FERNANDO SIMPLICIO Slide 6 Stack TCP/IP Microchip Ethernet com ENC28J60 (10Mbit) Ethernet com ENC624J600 (10Mbit)
  • 7. PROFESSOR: FERNANDO SIMPLICIO Slide 7 Exemplo de Ligação do ENC Ethernet com ENC28J60 (10Mbit)
  • 8. PROFESSOR: FERNANDO SIMPLICIO Slide 8 Microcontrolador com ETHERNET
  • 9. PROFESSOR: FERNANDO SIMPLICIO Slide 9 Benefícios do uso da ETHERNET Controle e monitoramento de equipamentos Automação residencial Automação comercial Automação Industrial
  • 10. PROFESSOR: FERNANDO SIMPLICIO Slide 10 O QUE É PRECISO? + + + = + Stack TCP/IP MPLAB X Compilador XC32 EasyPIC Fusion com ETH MCUcard with PIC32MX795F512L
  • 11. PROFESSOR: FERNANDO SIMPLICIO Slide 11 Etapas no Desenvolvimento IP: 169.254.1.1
  • 12. PROFESSOR: FERNANDO SIMPLICIO Slide 12 Um pouco mais sobre Binarização das páginas de Internet Convertendo em Binário (MPFS) as páginas de internet e salvando na memória EEPROM Externa ou Interna do MCU.
  • 13. Navegando em um projeto com Stack TCP/IP no MPLAB X Training Partner Microchip www.microgenios.com.br
  • 14. Módulo Wi-Fi MRF24WB/G Training Partner Microchip www.microgenios.com.br
  • 15. PROFESSOR: FERNANDO SIMPLICIO Slide 15 Wi-Fi - MRF24WB/G Training Partner Microchip www.microgenios.com.br IEEE 802.11 b/g Wi-Fi Transceiver Module Wi-Fi Direct, SoftAP Data Rate: 1, 2, 5.5, 11 Mbps 802.11b; 6, 9, 12,18, 24, 36, 48, 54 Mbps 802.11g Compatible with IEEE 802.11b/g/n networks Small size: 21 mm x 31 mm 36-pin surface mount module Wi-Fi Protected Setup (WPS) Supports low-power, low data-rate Wi-Fi FCC (USA), IC (Canada), ETSI (Europe) Certified Integrated PCB Antenna with simple four-wire SPI interface to PIC® microcontroller WEP, WPA-PSK, WPA2-PSK Security
  • 16. PROFESSOR: FERNANDO SIMPLICIO Slide 16 Para usar o MRF24WB/G no Stack Devemos adicionar a camada Wi-Fi ao Stack TCP/IP
  • 17. Módulo Wi-Fi RN171 Training Partner Microchip www.microgenios.com.br
  • 18. PROFESSOR: FERNANDO SIMPLICIO Slide 18 RN171 FCC / CE/ IC certified 2.4GHz IEEE 802.11b/g Small form factor: 1050 x 700 x 130 mil Configurable transmit power: 0dBm to 10 dBm RF pad connector for antennas Certified antennas: Chip antenna, 4” Dipole, PCB trace and wire antenna Ultra-low power - 4uA sleep, 38mA Rx, 120 mA Tx at 0dBm High throughput - 921Kbps TX, 500Kbps RX Secure WiFi authentication WEP-128, WPA-PSK (TKIP), WPA2- PSK (AES) 10 general purpose digital I/O 8 analog sensor interfaces Built in networking applications DHCP, UDP, DNS, ARP, ICMP, TCP, HTML client Accepts 3.3V regulated power supply or 3V battery Supports Adhoc and infrastructure networks On board complete TCP/IP networking stack Training Partner Microchip www.microgenios.com.br
  • 19. PROFESSOR: FERNANDO SIMPLICIO Slide 19 Tipos de Topologia de Rede Infraestrutura: Clientes se comunicam através de um AP Mais comum, como conexão entre PC e rede doméstica Adhoc: Conexão Ponto-a-Ponto Cada nó conectado com um outro Android não suportado Soft AP: Módulo comporta-se como um Access Point Módulo AP é o coordenador Gerenciamento básico da redeDHCP, routing, gateway redirection
  • 20. PROFESSOR: FERNANDO SIMPLICIO Slide 20 RN Series: Características Pilha integrada API ASCII Radio 802.11 b/g Segurança WEP WAP1 WAP2-Personal Topologia de rede Infraestrutura Soft AP-Mode Ad-hoc Serviços TCP, UDP, WPS, DNS, DHCP, FTP, HTTP, Configuration Web Server, etc.
  • 21. Teste Prático com o Módulo Wi-Fi RN171 Training Partner Microchip www.microgenios.com.br
  • 22. PROFESSOR: FERNANDO SIMPLICIO Slide 22 Teste Prático O objetivo desse laboratório é apresentar como conectar o módulo RN-171 em uma rede Wi-Fi. 1. Escanear e verificar as redes existentes. 2. Configurar RN-171 para conectar a esta rede.
  • 23. PROFESSOR: FERNANDO SIMPLICIO Slide 23 Teste Prático O objetivo desse laboratório é apresentar como conectar o módulo RN-171 em uma rede Wi-Fi. Comandos a serem usados: • scan 500 • set wlan ssid <NOME_REDE> • set wlan phrase <SENHA> • set wlan join 1 • save • reboot Training Partner Microchip www.microgenios.com.br
  • 24. PROFESSOR: FERNANDO SIMPLICIO Slide 24 Conclusão Dependendo do seu conhecimento,tempo e custo do seu equipamento, o uso do Stack TCP Embarcado é o ideal (ethernet Cabeada) . Se for usar Wi-Fi com MRF24, só vale a pena se o projeto já tenha sido iniciado usando a pilha TCP, pois o custo do módulo é quase o mesmo que o RN171. Caso pretenda usar Wi-Fi use os dispositivos prontos, já com stack integrado! É mais fácil de usar, porém o programador deverá saber como desenvolver o software, a fim de tratar os retornos do módulo. Training Partner Microchip www.microgenios.com.br
  • 26. É muito mais fácil com a Microgenios! Facebook | www.facebook.com/microgenios.microcontroladores Youtube | www.youtube.com.br/microgenios Obrigado!