micropython icon indicating copy to clipboard operation
micropython copied to clipboard

download_ble_stack file is outdated, softdevice is not working even if updating the file

Open darkcurrent opened this issue 2 years ago • 0 comments

download_ble_stack.sh file includes old links so ble stacks can not be installed. I think it would be great to update the script.

I manually update the .sh file and successfully download and compile micropython for feather52. I flash the hex file output to the feather52 but micropython did not start. When I only compile micropython for the board without softdevice. It will be ok. Micropython started. How can I activate bluetooth stack?

Here are the steps I followed:

  1. Manually edited the download_ble_stack.sh file below, and execute the script. The contents downloaded successfully;
#!/bin/bash
function download_s132_nrf52_6_0_0
{
    echo ""
    echo "####################################"
    echo "### Downloading s132_nrf52_6.0.0 ###"
    echo "####################################"
    echo ""
    mkdir -p $1/s132_nrf52_6.0.0
    cd $1/s132_nrf52_6.0.0
    wget https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/softdevices/s132/s132nrf52600.zip
    mv s132nrf52600.zip temp.zip
    unzip -u temp.zip
    rm temp.zip
    cd -
}

SCRIPT_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ $# -eq 0 ]; then 
    echo "No Bluetooth LE stack defined, downloading all."

    download_s132_nrf52_6_0_0 ${SCRIPT_DIR}
else 
    case $1 in
        "s132_nrf52_2_0_1" )
            download_s132_nrf52_6_0_0 ${SCRIPT_DIR} ;;
        "s132_nrf52_3_0_0" )
            download_s140_nrf52_6_0_0 ${SCRIPT_DIR} ;;
    esac
fi
exit 0
  1. Execute these commands one by one in ports/nrf directory. These commands gave me to hex files named. firmware.hex file without an error. (compiler gave only one error: missing-attributes I simply ignored it.)
make BOARD=feather52
make BOARD=feather52 SD=s132
  1. Using adalink, wiped all contents on the feather52, and flashed the firmware.hex file with these lines:
adalink nrf52832 -p jlink -w
adalink nrf52832 -p jlink -h firmware.hex
  1. After installing make BOARD=feather52 SD=s132 option did not work but make BOARD=feather52 option did work successfully.

darkcurrent avatar Jan 29 '23 19:01 darkcurrent