<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://tala-informatique.fr/index.php?action=history&amp;feed=atom&amp;title=Arduino_W5100_OSI3</id>
	<title>Arduino W5100 OSI3 - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://tala-informatique.fr/index.php?action=history&amp;feed=atom&amp;title=Arduino_W5100_OSI3"/>
	<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Arduino_W5100_OSI3&amp;action=history"/>
	<updated>2026-06-13T16:45:08Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://tala-informatique.fr/index.php?title=Arduino_W5100_OSI3&amp;diff=2391&amp;oldid=prev</id>
		<title>Jc.forton : /* Adressage au choix ! */</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Arduino_W5100_OSI3&amp;diff=2391&amp;oldid=prev"/>
		<updated>2017-01-11T08:46:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Adressage au choix !&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 janvier 2017 à 10:46&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l90&quot;&gt;Ligne 90 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 90 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Adressage au choix ! =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Adressage au choix ! =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le &#039;&#039;&#039;must&#039;&#039;&#039;, c&#039;est de pouvoir choisir en fonction du réseau où on va placer notre montage ! Le code ci-dessous utilise la compilation conditionnelle pour faire cohabiter les deux codes précédents. Le choix se fera en fonction de la variable &#039;&#039;DHCP&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;positionner &lt;/del&gt;au tout début du sketch.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le &#039;&#039;&#039;must&#039;&#039;&#039;, c&#039;est de pouvoir choisir en fonction du réseau où on va placer notre montage ! Le code ci-dessous utilise la compilation conditionnelle pour faire cohabiter les deux codes précédents. Le choix se fera en fonction de la variable &#039;&#039;DHCP&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;positionnée &lt;/ins&gt;au tout début du sketch.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#include &amp;lt;SPI.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#include &amp;lt;SPI.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki-mediawiki-:diff:1.41:old-2390:rev-2391:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
	<entry>
		<id>https://tala-informatique.fr/index.php?title=Arduino_W5100_OSI3&amp;diff=2390&amp;oldid=prev</id>
		<title>Jc.forton le 11 janvier 2017 à 08:46</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Arduino_W5100_OSI3&amp;diff=2390&amp;oldid=prev"/>
		<updated>2017-01-11T08:46:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 janvier 2017 à 10:46&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Introduction&lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Ethernet : attribution d&#039;une adresse IP &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Il faut prendre connaissance du [[Arduino_W5100_intro | module W5100]] avant de continuez.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/del&gt;= Adressage IP dynamique &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Adressage IP dynamique =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le plus simple, si votre réseau possède un serveur DHCP (normalement votre box est dotée de cette fonctionnalité...), est de demander la configuration OSI de niveau 3. Les seuls paramètres qui nous intéresserons vraiment sont l&amp;#039;adresse IP et le masque. La passerelle ne sera pas utile dans notre cas...&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le plus simple, si votre réseau possède un serveur DHCP (normalement votre box est dotée de cette fonctionnalité...), est de demander la configuration OSI de niveau 3. Les seuls paramètres qui nous intéresserons vraiment sont l&amp;#039;adresse IP et le masque. La passerelle ne sera pas utile dans notre cas...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot;&gt;Ligne 47 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 47 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/del&gt;= Adressage IP statique &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Adressage IP statique =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On peut très bien spécifier une configuration OSI de niveau 3 de manière statique. Deux avantages : pas d&amp;#039;adresse IP qui change et c&amp;#039;est plus rapide !&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On peut très bien spécifier une configuration OSI de niveau 3 de manière statique. Deux avantages : pas d&amp;#039;adresse IP qui change et c&amp;#039;est plus rapide !&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l89&quot;&gt;Ligne 89 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 89 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le même résultat que précédement devrait s&amp;#039;afficher dans le terminal série.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le même résultat que précédement devrait s&amp;#039;afficher dans le terminal série.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/del&gt;= Adressage au choix ! &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Adressage au choix ! =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039;, c&amp;#039;est de pouvoir choisir en fonction du réseau où on va placer notre montage ! Le code ci-dessous utilise la compilation conditionnelle pour faire cohabiter les deux codes précédents. Le choix se fera en fonction de la variable &amp;#039;&amp;#039;DHCP&amp;#039;&amp;#039; positionner au tout début du sketch.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039;, c&amp;#039;est de pouvoir choisir en fonction du réseau où on va placer notre montage ! Le code ci-dessous utilise la compilation conditionnelle pour faire cohabiter les deux codes précédents. Le choix se fera en fonction de la variable &amp;#039;&amp;#039;DHCP&amp;#039;&amp;#039; positionner au tout début du sketch.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki-mediawiki-:diff:1.41:old-2388:rev-2390:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
	<entry>
		<id>https://tala-informatique.fr/index.php?title=Arduino_W5100_OSI3&amp;diff=2388&amp;oldid=prev</id>
		<title>Jc.forton : Page créée avec «  == Ethernet : attribution d&#039;une adresse IP == === Adressage IP dynamique === Le plus simple, si votre réseau possède un serveur DHCP (normalement votre box est dotée d... »</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Arduino_W5100_OSI3&amp;diff=2388&amp;oldid=prev"/>
		<updated>2017-01-11T08:39:45Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec «  == Ethernet : attribution d&amp;#039;une adresse IP == === Adressage IP dynamique === Le plus simple, si votre réseau possède un serveur DHCP (normalement votre box est dotée d... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Ethernet : attribution d&amp;#039;une adresse IP ==&lt;br /&gt;
=== Adressage IP dynamique ===&lt;br /&gt;
Le plus simple, si votre réseau possède un serveur DHCP (normalement votre box est dotée de cette fonctionnalité...), est de demander la configuration OSI de niveau 3. Les seuls paramètres qui nous intéresserons vraiment sont l&amp;#039;adresse IP et le masque. La passerelle ne sera pas utile dans notre cas...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;SPI.h&amp;gt;&lt;br /&gt;
#include &amp;lt;Ethernet.h&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
   Adresse MAC du module, doit être unique sur le réseau !&lt;br /&gt;
   Ici 00:01:02:03:04:05&lt;br /&gt;
*/&lt;br /&gt;
byte mac[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  // Démarrage du port série&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  Serial.println(F(&amp;quot;Requesting ip...&amp;quot;));&lt;br /&gt;
  /**&lt;br /&gt;
     Démarrage du shield Ethernet sans spécifier d&amp;#039;adresse IP&lt;br /&gt;
     Cela oblige le contrôleur Ethernet à demander une configuration OSI 3&lt;br /&gt;
  */&lt;br /&gt;
  if (Ethernet.begin(mac) == 0) {&lt;br /&gt;
    // Si c&amp;#039;est un échec, pas la peine de pousuivre...&lt;br /&gt;
    Serial.println(F(&amp;quot;DHCP failure !&amp;quot;));&lt;br /&gt;
    while (true);&lt;br /&gt;
  }&lt;br /&gt;
  // Affichage des informations obtenues&lt;br /&gt;
  Serial.print(F(&amp;quot;IP : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.localIP());&lt;br /&gt;
  Serial.print(F(&amp;quot;Mask : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.subnetMask());&lt;br /&gt;
  Serial.print(F(&amp;quot;Gateway : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.gatewayIP());&lt;br /&gt;
  Serial.print(F(&amp;quot;DNS : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.dnsServerIP());&lt;br /&gt;
}&lt;br /&gt;
void loop() {&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Si vous avez une réponse de votre serveur DHCP, vous devriez obtenir, dans le terminal série, le résultat suivant:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Requesting ip...&lt;br /&gt;
IP : 192.168.1.26&lt;br /&gt;
Mask : 255.255.255.0&lt;br /&gt;
Gateway : 192.168.1.254&lt;br /&gt;
DNS : 192.168.1.254&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adressage IP statique ===&lt;br /&gt;
On peut très bien spécifier une configuration OSI de niveau 3 de manière statique. Deux avantages : pas d&amp;#039;adresse IP qui change et c&amp;#039;est plus rapide !&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;SPI.h&amp;gt;&lt;br /&gt;
#include &amp;lt;Ethernet.h&amp;gt;&lt;br /&gt;
// Adresse IP&lt;br /&gt;
IPAddress ip = { 192, 168, 1, 26 };&lt;br /&gt;
// Masque de sous-réseau&lt;br /&gt;
IPAddress mask = { 255, 255, 255, 0 };&lt;br /&gt;
// Passerelle&lt;br /&gt;
IPAddress gateway = { 192, 168, 1, 254 };&lt;br /&gt;
// DNS&lt;br /&gt;
IPAddress server_dns = { 192, 168, 1, 254 };&lt;br /&gt;
/**&lt;br /&gt;
   Adresse MAC du module, doit être unique sur le réseau !&lt;br /&gt;
   Ici 00:01:02:03:04:05&lt;br /&gt;
*/&lt;br /&gt;
byte mac[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  // Démarrage du port série&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  Serial.println(F(&amp;quot;Setting ip...&amp;quot;));&lt;br /&gt;
  /**&lt;br /&gt;
    Démarrage du shield Ethernet en spécifiant la configuration OSI 3&lt;br /&gt;
  */&lt;br /&gt;
  Ethernet.begin(mac, ip, server_dns, gateway, mask);&lt;br /&gt;
  // Affichage des informations&lt;br /&gt;
  Serial.print(F(&amp;quot;IP : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.localIP());&lt;br /&gt;
  Serial.print(F(&amp;quot;Mask : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.subnetMask());&lt;br /&gt;
  Serial.print(F(&amp;quot;Gateway : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.gatewayIP());&lt;br /&gt;
  Serial.print(F(&amp;quot;DNS : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.dnsServerIP());&lt;br /&gt;
}&lt;br /&gt;
void loop() {&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Le même résultat que précédement devrait s&amp;#039;afficher dans le terminal série.&lt;br /&gt;
&lt;br /&gt;
=== Adressage au choix ! ===&lt;br /&gt;
Le &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039;, c&amp;#039;est de pouvoir choisir en fonction du réseau où on va placer notre montage ! Le code ci-dessous utilise la compilation conditionnelle pour faire cohabiter les deux codes précédents. Le choix se fera en fonction de la variable &amp;#039;&amp;#039;DHCP&amp;#039;&amp;#039; positionner au tout début du sketch.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;SPI.h&amp;gt;&lt;br /&gt;
#include &amp;lt;Ethernet.h&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
   Variable permettant de choisir entre une assignation&lt;br /&gt;
   fixe ou dynamique du niveau 3 OSI&lt;br /&gt;
   &amp;#039;0&amp;#039; --&amp;gt; configuration statique&lt;br /&gt;
   &amp;#039;1&amp;#039; --&amp;gt; configuration dynamique&lt;br /&gt;
*/&lt;br /&gt;
#define DHCP 0&lt;br /&gt;
/**&lt;br /&gt;
   Adresse MAC du module, doit être unique sur le réseau !&lt;br /&gt;
   Ici 00:01:02:03:04:05&lt;br /&gt;
*/&lt;br /&gt;
byte mac[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };&lt;br /&gt;
#if DHCP == 0&lt;br /&gt;
// Adresse IP&lt;br /&gt;
IPAddress ip = { 192, 168, 1, 26 };&lt;br /&gt;
// Masque de sous-réseau&lt;br /&gt;
IPAddress mask = { 255, 255, 255, 0 };&lt;br /&gt;
// Passerelle&lt;br /&gt;
IPAddress gateway = { 192, 168, 1, 254 };&lt;br /&gt;
// DNS&lt;br /&gt;
IPAddress server_dns = { 192, 168, 1, 254 };&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  // Démarrage du port série&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  /**&lt;br /&gt;
     Démarrage du shield Ethernet sans spécifier d&amp;#039;adresse IP&lt;br /&gt;
     Cela oblige le contrôleur Ethernet à demander une configuration OSI 3&lt;br /&gt;
  */&lt;br /&gt;
#if DHCP == 0&lt;br /&gt;
  Serial.println(F(&amp;quot;Setting ip...&amp;quot;));&lt;br /&gt;
  Ethernet.begin(mac, ip, server_dns, gateway, mask);&lt;br /&gt;
#else&lt;br /&gt;
  Serial.println(F(&amp;quot;Requesting ip...&amp;quot;));&lt;br /&gt;
  if (Ethernet.begin(mac) == 0) {&lt;br /&gt;
    // Si c&amp;#039;est un échec, pas la peine de pousuivre...&lt;br /&gt;
    Serial.println(F(&amp;quot;DHCP failure !&amp;quot;));&lt;br /&gt;
    while (true);&lt;br /&gt;
  }&lt;br /&gt;
#endif&lt;br /&gt;
  // Affichage des informations obtenues&lt;br /&gt;
  Serial.print(F(&amp;quot;IP : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.localIP());&lt;br /&gt;
  Serial.print(F(&amp;quot;Mask : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.subnetMask());&lt;br /&gt;
  Serial.print(F(&amp;quot;Gateway : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.gatewayIP());&lt;br /&gt;
  Serial.print(F(&amp;quot;DNS : &amp;quot;));&lt;br /&gt;
  Serial.println(Ethernet.dnsServerIP());&lt;br /&gt;
}&lt;br /&gt;
void loop() {&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Lorsque vous avez plusieurs possibilités n&amp;#039;hésitez pas à user de la compilation conditionnelle car, la mémoire réduite de l&amp;#039;ATMega ne permet pas d&amp;#039;embarquer beaucoup de code...&lt;/div&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
</feed>