Différences entre versions de « Bluefruit-LE-Shield-Beacon »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 12 : Ligne 12 :
 
== AT+BLEBEACON ==
 
== AT+BLEBEACON ==
 
* Codebase Revision: 0.3.0
 
* Codebase Revision: 0.3.0
* Parameters: The following comma-separated parameters are required to enable beacon mode:
+
* Paramètres: The following comma-separated Paramètres are required to enable beacon mode:
 
** Bluetooth Manufacturer ID (uint16_t)
 
** Bluetooth Manufacturer ID (uint16_t)
 
** 128-bit UUID
 
** 128-bit UUID
Ligne 18 : Ligne 18 :
 
** Minor Value (uint16_t)
 
** Minor Value (uint16_t)
 
** RSSI @ 1m (int8_t)
 
** RSSI @ 1m (int8_t)
* Output: None
+
* Sortie: None
  
 
  <nowiki># Enable Apple iBeacon emulation
 
  <nowiki># Enable Apple iBeacon emulation
Ligne 51 : Ligne 51 :
  
 
* Codebase Revision: 0.4.7
 
* Codebase Revision: 0.4.7
* Parameters: The URI to encode (ex. http://www.adafruit.com/blog)
+
* Paramètres: The URI to encode (ex. http://www.adafruit.com/blog)
* Output: None of a valid URI was entered (length is acceptable, etc.).
+
* Sortie: None of a valid URI was entered (length is acceptable, etc.).
  
 
  <nowiki>AT+BLEURIBEACON=http://www.adafruit.com/blog
 
  <nowiki>AT+BLEURIBEACON=http://www.adafruit.com/blog
Ligne 61 : Ligne 61 :
 
OK</nowiki>
 
OK</nowiki>
  
If the supplied URI is too long you will get the following output:
+
If the supplied URI is too long you will get the following Sortie:
  
 
  <nowiki>AT+BLEURIBEACON=http://www.adafruit.com/this/uri/is/too/long
 
  <nowiki>AT+BLEURIBEACON=http://www.adafruit.com/this/uri/is/too/long
Ligne 73 : Ligne 73 :
 
This command will enable Eddystone support on the Bluefruit LE module. Eddystone support must be enabled before the other related commands can be used.
 
This command will enable Eddystone support on the Bluefruit LE module. Eddystone support must be enabled before the other related commands can be used.
 
* Codebase Revision: 0.6.6
 
* Codebase Revision: 0.6.6
* Parameters: 1 or 0 (1 = enable, 0 = disable)
+
* Paramètres: 1 or 0 (1 = enable, 0 = disable)
* Output: The current state of Eddystone support if no parameters are provided (1 = enabled, 0 = disabled)
+
* Sortie: The current state of Eddystone support if no Paramètres are provided (1 = enabled, 0 = disabled)
  
 
{{ambox-stop|text=This command was removed in firmware 0.7.0 to avoid confusion. Use AT+EDDYSTONESERVICEEN in 0.7.0 and higher.}}
 
{{ambox-stop|text=This command was removed in firmware 0.7.0 to avoid confusion. Use AT+EDDYSTONESERVICEEN in 0.7.0 and higher.}}
Ligne 90 : Ligne 90 :
 
This command will set the URL for the Eddystone-URL protocol.
 
This command will set the URL for the Eddystone-URL protocol.
 
* Codebase Revision: 0.6.6
 
* Codebase Revision: 0.6.6
* Parameters:  
+
* Paramètres:  
 
** The URL to encode (mandatory)
 
** The URL to encode (mandatory)
 
** An optional second parameter indicates whether to continue advertising the Eddystone URL even when the peripheral is connected to a central device
 
** An optional second parameter indicates whether to continue advertising the Eddystone URL even when the peripheral is connected to a central device
 
** Firmware '''0.6.7''' added an optional third parameter for the RSSI at 0 meters value. This should be measured by the end user by checking the RSSI value on the receiving device at 1m and then adding 41 to that value (to compensate for the signal strength loss over 1m), so an RSSI of -62 at 1m would mean that you should enter -21 as the RSSI at 0m.  Default value is -18dBm.
 
** Firmware '''0.6.7''' added an optional third parameter for the RSSI at 0 meters value. This should be measured by the end user by checking the RSSI value on the receiving device at 1m and then adding 41 to that value (to compensate for the signal strength loss over 1m), so an RSSI of -62 at 1m would mean that you should enter -21 as the RSSI at 0m.  Default value is -18dBm.
* Output: Firmware <= 0.6.6: none.  With firmware >= '''0.6.7''' running this command with no parameters will return the current URL.
+
* Sortie: Firmware <= 0.6.6: none.  With firmware >= '''0.6.7''' running this command with no Paramètres will return the current URL.
  
 
  <nowiki># Set the Eddystone URL to adafruit
 
  <nowiki># Set the Eddystone URL to adafruit
Ligne 110 : Ligne 110 :
  
 
* Codebase Revision: 0.6.6
 
* Codebase Revision: 0.6.6
* Parameters: The number of seconds to advertised the config service UUID
+
* Paramètres: The number of seconds to advertised the config service UUID
* Output: None
+
* Sortie: None
  
 
  <nowiki># Start advertising the Eddystone config service for 5 minutes (300s)
 
  <nowiki># Start advertising the Eddystone config service for 5 minutes (300s)
Ligne 121 : Ligne 121 :
  
 
* Codebase Revision: 0.7.0
 
* Codebase Revision: 0.7.0
* Parameters: Whether or not the Eddystone service should be enabled or not, using on of the following values:
+
* Paramètres: Whether or not the Eddystone service should be enabled or not, using on of the following values:
 
** on
 
** on
 
** off
 
** off
 
** 1
 
** 1
 
** 0
 
** 0
* Output: If the command is executed with no parameters it will disable a numeric value indicating whether the service is enabled (1) or disabled (0).
+
* Sortie: If the command is executed with no Paramètres it will disable a numeric value indicating whether the service is enabled (1) or disabled (0).
  
 
{{ambox|text=You must perform a system reset for this command to take effect.}}
 
{{ambox|text=You must perform a system reset for this command to take effect.}}
Ligne 148 : Ligne 148 :
  
 
* Codebase Revision: 0.7.0
 
* Codebase Revision: 0.7.0
* Parameters: Whether or not the payload should be broadcast, using one of the following values:
+
* Paramètres: Whether or not the payload should be broadcast, using one of the following values:
 
** on
 
** on
 
** off
 
** off
 
** 1
 
** 1
 
** 0
 
** 0
* Output: If executed with no parameters, the current broadcast state will be displayed as a numeric value.
+
* Sortie: If executed with no Paramètres, the current broadcast state will be displayed as a numeric value.
  
 
  <nowiki># Enable broadcasting current setting of EddyStone (stored previously on nvm)
 
  <nowiki># Enable broadcasting current setting of EddyStone (stored previously on nvm)

Version du 3 juin 2017 à 15:31


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Beacon

Adafruit's Bluefruit LE modules currently support the following 'Beacon' technologies:

  • Beacon (Apple) via AT+BLEBEACON
  • UriBeacon (Google) via AT+BLEURIBEACON (deprecated)
  • Eddystone (Google) via AT+EDDYSTONE*

Modules can be configured to act as 'Beacons' using the following commands:

AT+BLEBEACON

  • Codebase Revision: 0.3.0
  • Paramètres: The following comma-separated Paramètres are required to enable beacon mode:
    • Bluetooth Manufacturer ID (uint16_t)
    • 128-bit UUID
    • Major Value (uint16_t)
    • Minor Value (uint16_t)
    • RSSI @ 1m (int8_t)
  • Sortie: None
# Enable Apple iBeacon emulation
# Manufacturer ID = 0x004C
AT+BLEBEACON=0x004C,01-12-23-34-45-56-67-78-89-9A-AB-BC-CD-DE-EF-F0,0x0000,0x0000,-59
OK
# Reset to change the advertising data
ATZ
OK
  
# Enable Nordic Beacon emulation
# Manufacturer ID = 0x0059
AT+BLEBEACON=0x0059,01-12-23-34-45-56-67-78-89-9A-AB-BC-CD-DE-EF-F0,0x0000,0x0000,-59
OK
# Reset to change the advertising data
ATZ
OK

Entering Nordic Beacon emulation using the sample code above, you can see the simulated beacon in Nordic's 'Beacon Config' tool below:

Bluefruit-LE-Shield-Beacon-00.png
Crédit: AdaFruit Industries www.adafruit.com

AT+BLEURIBEACON

Converts the specified URI into a UriBeacon advertising packet, and configures the module to advertise as a UriBeacon (part of Google's Physical Web project).

To view the UriBeacon URIs you can use one of the following mobile applications:

  • Android 4.3+: Physical Web on the Google Play Store
  • iOS: Physical Web in Apple's App Store


  • Codebase Revision: 0.4.7
  • Paramètres: The URI to encode (ex. http://www.adafruit.com/blog)
  • Sortie: None of a valid URI was entered (length is acceptable, etc.).
AT+BLEURIBEACON=http://www.adafruit.com/blog
OK

# Reset to change the advertising data
ATZ
OK

If the supplied URI is too long you will get the following Sortie:

AT+BLEURIBEACON=http://www.adafruit.com/this/uri/is/too/long
URL is too long
ERROR

AT+EDDYSTONEENABLE (commande dépréciée)

This command will enable Eddystone support on the Bluefruit LE module. Eddystone support must be enabled before the other related commands can be used.

  • Codebase Revision: 0.6.6
  • Paramètres: 1 or 0 (1 = enable, 0 = disable)
  • Sortie: The current state of Eddystone support if no Paramètres are provided (1 = enabled, 0 = disabled)
# Enable Eddystone support
AT+EDDYSTONEENABLE=1
OK

# Check the current Eddystone status on the module
AT+EDDYSTONEENABLE
1
OK

AT+EDDYSTONEURL

This command will set the URL for the Eddystone-URL protocol.

  • Codebase Revision: 0.6.6
  • Paramètres:
    • The URL to encode (mandatory)
    • An optional second parameter indicates whether to continue advertising the Eddystone URL even when the peripheral is connected to a central device
    • Firmware 0.6.7 added an optional third parameter for the RSSI at 0 meters value. This should be measured by the end user by checking the RSSI value on the receiving device at 1m and then adding 41 to that value (to compensate for the signal strength loss over 1m), so an RSSI of -62 at 1m would mean that you should enter -21 as the RSSI at 0m. Default value is -18dBm.
  • Sortie: Firmware <= 0.6.6: none. With firmware >= 0.6.7 running this command with no Paramètres will return the current URL.
# Set the Eddystone URL to adafruit
AT+EDDYSTONEURL=http://www.adafruit.com
OK
  
# Set the Eddystone URL to adafruit and advertise it even when connected
AT+EDDYSTONEURL=http://www.adafruit.com,1
OK

AT+EDDYSTONECONFIGEN

This command causes the Bluefruit LE module to enable the Eddystone URL config service for the specified number of seconds.

This command should be used in combination with the Physical Web application from Google, available for Android or iOS. Run this command then select the 'Edit URL' option from the app to change the destination URL over the air.

  • Codebase Revision: 0.6.6
  • Paramètres: The number of seconds to advertised the config service UUID
  • Sortie: None
# Start advertising the Eddystone config service for 5 minutes (300s)
AT+EDDYSTONECONFIGEN=300
OK

AT+EDDYSTONESERVICEEN

Adds or removes the Eddystone service from the GATT table (requires a reset to take effect).

  • Codebase Revision: 0.7.0
  • Paramètres: Whether or not the Eddystone service should be enabled or not, using on of the following values:
    • on
    • off
    • 1
    • 0
  • Sortie: If the command is executed with no Paramètres it will disable a numeric value indicating whether the service is enabled (1) or disabled (0).
# Enable Eddystone service
AT+EddyStonServiceEn=on
OK

AT+EddyStonServiceEn=1
OK

# Disable Eddystone service
AT+EddyStonServiceEn=off
OK

AT+EddyStonServiceEn=0
OK

AT+EDDYSTONEBROADCAST

This command can be used to start of stop advertising the Eddystone payload using the URL stored in non-volatile memory (NVM).

  • Codebase Revision: 0.7.0
  • Paramètres: Whether or not the payload should be broadcast, using one of the following values:
    • on
    • off
    • 1
    • 0
  • Sortie: If executed with no Paramètres, the current broadcast state will be displayed as a numeric value.
# Enable broadcasting current setting of EddyStone (stored previously on nvm)
AT+EddyStoneBroadcast=on
OK

AT+EddyStoneBroadcast=1
OK
    
# Disable broadcasting current setting of EddyStone (still stored on nvm)
AT+EddyStoneBroadcast=off
OK

AT+EddyStoneBroadcast=0
OK

Basé sur "Bluefruit LE Shield" d'Adafruit Industries, écrit par Kevin Townsend - Traduit en Français par shop.mchobby.be CC-BY-SA pour la traduction
Toute copie doit contenir ce crédit, lien vers cette page et la section "crédit de traduction".

Based on "Bluefruit LE Shield" from Adafruit Industries, written by Kevin Townsend - Translated to French by shop.mchobby.be CC-BY-SA for the translation
Copies must includes this credit, link to this page and the section "crédit de traduction" (translation credit).

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com