Modifications

Sauter à la navigation Sauter à la recherche
Ligne 73 : Ligne 73 :  
The app is still in BETA, but full [https://github.com/adafruit/adafruit-bluefruit-le-desktop source] is available in addition to the easy to use [https://github.com/adafruit/adafruit-bluefruit-le-desktop/releases pre-compiled binaries].
 
The app is still in BETA, but full [https://github.com/adafruit/adafruit-bluefruit-le-desktop source] is available in addition to the easy to use [https://github.com/adafruit/adafruit-bluefruit-le-desktop/releases pre-compiled binaries].
   −
{{ADFImage|Bluefruit-LE-Shield-Software-resources-40.jpg}}
+
{{ADFImage|Bluefruit-LE-Shield-Software-resources-40.png}}
 +
 
 +
=== Bluefruit LE Python Wrapper ===
 +
As a proof of concept, we've played around a bit with getting Python working with the native Bluetooth APIs on OS X and the latest version of Bluez on certain Linux targets.
 +
 
 +
There are currently example sketches showing how to retreive BLE UART data as well as some basic details from the Device Information Service (DIS).
 +
 
 +
This isn't an actively support project and was more of an experiment, but if you have a recent Macbook or a Raspberry Pi and know Python, you might want to look at [https://github.com/adafruit/Adafruit_Python_BluefruitLE Adafruit_Python_BluefruitLE] in our github account.
 +
 
 +
== Debug Tools ==
 +
If your sense of adventure gets the better of you, and your Bluefruit LE module goes off into the weeds, the following tools might be useful to get it back from unknown lands.
 +
 
 +
{{ambox-stop|text=hese debug tools are provided purely as a convenience for advanced users for device recovery purposes, and are not recommended unless you're OK with potentially bricking your board. Use them at your own risk.}}
 +
 
 +
=== AdaLink (Python) ===
 +
 
 +
This command line tool is a python-based wrapper for programming ARM MCUs using either a [https://www.adafruit.com/search?q=J-Link Segger J-Link] or an [https://www.adafruit.com/product/2548 STLink/V2]. You can use it to reflash your Bluefruit LE module using the latest firmware from the [https://github.com/adafruit/Adafruit_BluefruitLE_Firmware Bluefruit LE firmware repo].
 +
 
 +
Details on how to use the tool are available in the readme.md file on the main [https://github.com/adafruit/Adafruit_Adalink Adafruit_Adalink] repo on Github.
 +
 
 +
Completely reprogramming a Bluefruit LE module with AdaLink would require four files, and would look something like this (using a JLink):
 +
 
 +
<syntaxhighlight lang="bash">
 +
adalink nrf51822 --programmer jlink --wipe
 +
  --program-hex "Adafruit_BluefruitLE_Firmware/softdevice/s110_nrf51_8.0.0_softdevice.hex"
 +
  --program-hex "Adafruit_BluefruitLE_Firmware/bootloader/bootloader_0002.hex"
 +
  --program-hex "Adafruit_BluefruitLE_Firmware/0.6.7/blefriend32/blefriend32_s110_xxac_0_6_7_150917_blefriend32.hex"
 +
  --program-hex "Adafruit_BluefruitLE_Firmware/0.6.7/blefriend32/blefriend32_s110_xxac_0_6_7_150917_blefriend32_signature.hex"
 +
</syntaxhighlight>
 +
 
 +
You can also use the AdaLink tool to get some basic information about your module, such as which SoftDevice is currently programmed or the IC revision (16KB SRAM or 32KB SRAM) via the --info command:
 +
 
 +
<syntaxhighlight lang="bash">
 +
$ adalink nrf51822 -p jlink --info
 +
Hardware ID : QFACA10 (32KB)
 +
Segger ID  : nRF51822_xxAC
 +
SD Version  : S110 8.0.0
 +
Device Addr : **:**:**:**:**:**
 +
Device ID  : ****************
 +
</syntaxhighlight>
 +
 
 +
=== Adafruit nRF51822 Flasher (Python) ===
 +
Adafruit's nRF51822 Flasher is an internal Python tool we use in production to flash boards as they go through the test procedures and off the assembly line, or just testing against different firmware releases when debugging.
 +
 
 +
It relies on AdaLink or OpenOCD beneath the surface (see above), but you can use this command line tool to flash your nRF51822 with a specific SoftDevice, Bootloader and Bluefruit firmware combination.
 +
 
 +
It currently supports using either a Segger J-Link or STLink/V2 via AdaLink, or [https://github.com/adafruit/Adafruit_nRF51822_Flasher#rpi-gpio-requirements GPIO on a Raspberry Pi] if you don't have access to a traditional ARM SWD debugger.  (A pre-built version of OpenOCD for the RPi is included in the repo since building it from scratch takes a long time on the original RPi.)
 +
 
 +
We don't provide active support for this tool since it's purely an internal project, but made it public just in case it might help an adventurous customer debrick a board on their own.
 +
 
 +
<syntaxhighlight lang="bash">
 +
$ python flash.py --jtag=jlink --board=blefriend32 --softdevice=8.0.0 --bootloader=2 --firmware=0.6.7
 +
jtag      : jlink
 +
softdevice : 8.0.0
 +
bootloader : 2
 +
board      : blefriend32
 +
firmware  : 0.6.7
 +
Writing Softdevice + DFU bootloader + Application to flash memory
 +
adalink -v nrf51822 --programmer jlink --wipe --program-hex "Adafruit_BluefruitLE_Firmware/softdevice/s110_nrf51_8.0.0_softdevice.hex" --program-hex "Adafruit_BluefruitLE_Firmware/bootloader/bootloader_0002.hex" --program-hex "Adafruit_BluefruitLE_Firmware/0.6.7/blefriend32/blefriend32_s110_xxac_0_6_7_150917_blefriend32.hex" --program-hex "Adafruit_BluefruitLE_Firmware/0.6.7/blefriend32/blefriend32_s110_xxac_0_6_7_150917_blefriend32_signature.hex"
 +
...
 +
</syntaxhighlight>
 +
 
    
{{Bluefruit-LE-Shield-TRAILER}}
 
{{Bluefruit-LE-Shield-TRAILER}}
29 917

modifications

Menu de navigation