Modifications

Sauter à la navigation Sauter à la recherche
6 001 octets ajoutés ,  25 décembre 2012 à 14:25
Ligne 34 : Ligne 34 :     
With the switch in the USB position, the DOUT pin the wireless module is connected to the RX pin of the USB-to-serial converter, and DIN on the wireless module is connected to the TX pin of the USB-to-serial converter. This means that the module can communicate directly with the computer. The microcontroller on the board will be bypassed. '''To use the shield in this mode, you must program the microcontroller with an empty sketch (shown below), or remove it from the board'''.
 
With the switch in the USB position, the DOUT pin the wireless module is connected to the RX pin of the USB-to-serial converter, and DIN on the wireless module is connected to the TX pin of the USB-to-serial converter. This means that the module can communicate directly with the computer. The microcontroller on the board will be bypassed. '''To use the shield in this mode, you must program the microcontroller with an empty sketch (shown below), or remove it from the board'''.
 +
 +
== Mise en réseau ==
 +
The Wireless Proto shield can be used with different modules with the same footprint as the XBee modules. The instructions below are for the '''XBee 802.15.4 modules''' (sometimes called "Series 1" to distinguish them from the Series 2 modules, although "Series 1" doesn't appear in the official name or product description) and also for the '''XBee ZNet 2.5''' or '''XBee ZB modules''', both known as "Series 2" modules. All the modules, basically have the same type of configuration parameters, but differ by the function that they implement and the topologies of networks that they can create. Can communicate with each other only modules of the same family.
 +
 +
== Adressage ==
 +
 +
There are multiple parameters that need to be configured correctly for two modules to talk to each other (although with the default settings, all modules should be able to talk to each other). They need to be on the same network, as set by the '''ID''' parameter (see "Configuration" below for more details on the parameters). The modules need to be on the same channel, as set by the '''CH''' parameter. Finally, a module's destination address ('''DH''' and '''DL''' parameters) determine which modules on its network and channel will receive the data it transmits. This can happen in a few ways:
 +
 +
* If a module's '''DH''' is 0 and its '''DL is less than 0xFFFF''' (i.e. 16 bits), data transmitted by that module will be received by any module whose 16-bit address '''MY''' parameter equals '''DL'''.
 +
* If '''DH''' is 0 and '''DL equals 0xFFFF''', the module's transmissions will be received by all modules.
 +
* If '''DH is non-zero''' or '''DL is greater than 0xFFFF''', the transmission will only be received by the module whose serial number equals the transmitting module's destination address (i.e. whose '''SH''' equals the transmitting module's '''DH''' and whose '''SL''' equals its '''DL''').
 +
 +
Again, this address matching will only happen between modules on the same network and channel. If two modules are on different networks or channels, they can't communicate regardless of their addresses.
 +
 +
For the "Series 2" modules you must chose which firmware put on the module to give it Coordinator, Router or End Device functionality. Series 2 use only serial low (SL) and serial high (SH) for addressing.
 +
 +
== Configuration ==
 +
Here are some of the more useful parameters for configuring your Xbee module. For step-by-step instructions on reading and writing them using AT commands, see the:
 +
 +
* [[Arduino Wireless Shield XBee 802.15.4|Arduino Wireless Shield avec module XBee 802.15.4]] traduction Française.
 +
* [http://arduino.cc/en/Guide/ArduinoWirelessShield guide to the Wireless shield with the 802.15.4 modules] (Arduino.CC, ''en anglais'').
 +
* [http://arduino.cc/en/Guide/ArduinoWirelessShieldS2 guide to the Wireless shield with the ZNet 2.5 modules].
 +
 +
Make sure to prepend AT to the parameter name when sending a command to the module (e.g. to read the ID parameter, you should send the command ATID).
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
| align="center" | Command
 +
| align="center" | Description
 +
| align="center" | Valeurs valides
 +
| align="center" | Valeur par défaut
 +
|- style="font-size: 90%"
 +
| align="left" | ID
 +
| align="left" | The network ID of the XBee module.
 +
| align="left" | 0 - 0xFFFF
 +
| align="left" | 3332
 +
|- style="font-size: 90%"
 +
| align="left" | CH
 +
| align="left" | The channel of the XBee module.
 +
| align="left" | 0x0B - 0x1A
 +
| align="left" | 0X0C
 +
|- style="font-size: 90%"
 +
| align="left" | SH and SL
 +
| align="left" | The serial number of the XBee module (SH gives the high 32 bits, SL the low 32 bits).Read-only.
 +
| align="left" | 0 - 0xFFFFFFFF (for both SH and SL)
 +
| align="left" | different for each module
 +
|- style="font-size: 90%"
 +
| align="left" | MY
 +
| align="left" | The 16-bit address of the module.
 +
| align="left" | 0 - 0xFFFF
 +
| align="left" | 0
 +
|- style="font-size: 90%"
 +
| align="left" | DH and DL
 +
| align="left" | The destination address for wireless communication (DH is the high 32 bits, DL the low 32).
 +
| align="left" | 0 - 0xFFFFFFFF (for both DH and DL)
 +
| align="left" | 0 (for both DH and DL)
 +
|- style="font-size: 90%"
 +
| align="left" | BD
 +
| align="left" | The baud rate used for serial communication with the Arduino board or computer.
 +
| align="left" | 0 (1200 bps)<br />1 (2400 bps)<br />2 (4800 bps)<br />3 (9600 bps)<br />4 (19200 bps)<br />5 (38400 bps)<br />6 (57600 bps)<br />7 (115200 bps)
 +
| align="left" | 3 (9600 baud)
 +
|}
 +
 +
Note: although the valid and default values in the table above are written with a prefix of "0x" (to indicate that they are hexadecimal numbers), the module will not include the "0x" when reporting the value of a parameter, and you should omit it when setting values.
 +
 +
Here are a couple more useful commands for configuring the XBee module (you'll need to prepend AT to these too).
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
| align="center" | Command
 +
| align="center" | Description
 +
|- style="font-size: 90%"
 +
| align="left" | RE
 +
| align="left" | Restore factory default settings (note that like parameter changes, this is not permanent unless followed by the WR command).
 +
|- style="font-size: 90%"
 +
| align="left" | WR
 +
| align="left" | Write newly configured parameter values to non-volatile (long-term) storage. Otherwise, they will only last until the module loses power.
 +
|- style="font-size: 90%"
 +
| align="left" | CN
 +
| align="left" | Exit command mode now. (If you don't send any commands to the module for a few seconds, command mode will timeout and exit even without a CN command.)
 +
|}
 +
 +
For more details on configuring the XBee module, see the [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/zigbee-mesh-module/xbee-zb-module#docs 802.15.4 modules product manual] or the [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/zigbee-mesh-module/xbee-zb-module#docs ZB modules product manual] from Digi International.
    
== xxx ==
 
== xxx ==
29 917

modifications

Menu de navigation