Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Adafruit Bluefruit LE UART Friend Couldn't Factory Reset
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Bluefruit LE UART Friend Couldn't Factory Reset

by glee4u on Thu Jul 02, 2020 6:35 pm

I ordered the product Adafruit Bluefruit LE UART Friend and no matter which example sketch I attempt to upload, if it includes the factory reset code, the reset fails. The bluefruit does power up and appear in the list of available bluetooth devices and Bluefruit LE Connect does connect. However, none of the modules appear to work normally. I think my soldering looks ok, and I have definitely tried the hardware reset which appears to go as expected with the blue light flashing after five seconds. But when I attempt to run an example sketch, again it just says "Couldn't Factory Reset". This is the same outcome if I attempt the factoryreset example sketch. I have also tried swapping out all jumper cables and tried various placements on the breadboard with the same outcome. Toggling the UART<>CMD switch also does not appear to change the outcome.

Image
Image
Image

Any help would be much appreciated

glee4u
 
Posts: 2
Joined: Thu Jul 02, 2020 6:20 pm

Re: Adafruit Bluefruit LE UART Friend Couldn't Factory Reset

by glee4u on Thu Jul 02, 2020 6:39 pm

factoryreset example sketch code:
Code: Select all | TOGGLE FULL SIZE
#include <Arduino.h>
#include <SPI.h>
#include "Adafruit_BLE.h"
#include "Adafruit_BluefruitLE_SPI.h"
#include "Adafruit_BluefruitLE_UART.h"

#include "BluefruitConfig.h"

#if SOFTWARE_SERIAL_AVAILABLE
  #include <SoftwareSerial.h>
#endif

// Create the bluefruit object, either software serial...uncomment these lines
/*
SoftwareSerial bluefruitSS = SoftwareSerial(BLUEFRUIT_SWUART_TXD_PIN, BLUEFRUIT_SWUART_RXD_PIN);

Adafruit_BluefruitLE_UART ble(bluefruitSS, BLUEFRUIT_UART_MODE_PIN,
                      BLUEFRUIT_UART_CTS_PIN, BLUEFRUIT_UART_RTS_PIN);
*/

/* ...or hardware serial, which does not need the RTS/CTS pins. Uncomment this line */
// Adafruit_BluefruitLE_UART ble(BLUEFRUIT_HWSERIAL_NAME, BLUEFRUIT_UART_MODE_PIN);

/* ...hardware SPI, using SCK/MOSI/MISO hardware SPI pins and then user selected CS/IRQ/RST */
Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_CS, BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);

/* ...software SPI, using SCK/MOSI/MISO user-defined SPI pins and then user selected CS/IRQ/RST */
//Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_SCK, BLUEFRUIT_SPI_MISO,
//                             BLUEFRUIT_SPI_MOSI, BLUEFRUIT_SPI_CS,
//                             BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);


// A small helper
void error(const __FlashStringHelper*err) {
  Serial.println(err);
  while (1);
}

/**************************************************************************/
/*!
    @brief  Sets up the HW an the BLE module (this function is called
            automatically on startup)
*/
/**************************************************************************/
void setup(void)
{
  while (!Serial);  // required for Flora & Micro
  delay(500);

  Serial.begin(115200);
  Serial.println(F("Adafruit Factory Reset Example"));
  Serial.println(F("------------------------------------------------"));

  /* Initialise the module */
  Serial.print(F("Initialising the Bluefruit LE module: "));

  if ( !ble.begin(VERBOSE_MODE) )
  {
    error(F("Couldn't find Bluefruit, make sure it's in CoMmanD mode & check wiring?"));
  }
  Serial.println( F("OK!") );

  /* Perform a factory reset to make sure everything is in a known state */
  Serial.println(F("Performing a factory reset: "));
  if (! ble.factoryReset() ){
       error(F("Couldn't factory reset"));
  }

  Serial.println("Requesting Bluefruit info:");
  /* Print Bluefruit information */
  ble.info();

  Serial.println(F("DONE!"));
}

/**************************************************************************/
/*!
    @brief  Constantly poll for new command or response data
*/
/**************************************************************************/
void loop(void)
{
}


And config file:
Code: Select all | TOGGLE FULL SIZE
// COMMON SETTINGS
// ----------------------------------------------------------------------------------------------
// These settings are used in both SW UART, HW UART and SPI mode
// ----------------------------------------------------------------------------------------------
#define BUFSIZE                        128   // Size of the read buffer for incoming data
#define VERBOSE_MODE                   true  // If set to 'true' enables debug output


// SOFTWARE UART SETTINGS
// ----------------------------------------------------------------------------------------------
// The following macros declare the pins that will be used for 'SW' serial.
// You should use this option if you are connecting the UART Friend to an UNO
// ----------------------------------------------------------------------------------------------
#define BLUEFRUIT_SWUART_RXD_PIN       9    // Required for software serial!
#define BLUEFRUIT_SWUART_TXD_PIN       10   // Required for software serial!
#define BLUEFRUIT_UART_CTS_PIN         11   // Required for software serial!
#define BLUEFRUIT_UART_RTS_PIN         -1   // Optional, set to -1 if unused


// HARDWARE UART SETTINGS
// ----------------------------------------------------------------------------------------------
// The following macros declare the HW serial port you are using. Uncomment
// this line if you are connecting the BLE to Leonardo/Micro or Flora
// ----------------------------------------------------------------------------------------------
#ifdef Serial1    // this makes it not complain on compilation if there's no Serial1
  #define BLUEFRUIT_HWSERIAL_NAME      Serial1
#endif


// SHARED UART SETTINGS
// ----------------------------------------------------------------------------------------------
// The following sets the optional Mode pin, its recommended but not required
// ----------------------------------------------------------------------------------------------
#define BLUEFRUIT_UART_MODE_PIN        12    // Set to -1 if unused


// SHARED SPI SETTINGS
// ----------------------------------------------------------------------------------------------
// The following macros declare the pins to use for HW and SW SPI communication.
// SCK, MISO and MOSI should be connected to the HW SPI pins on the Uno when
// using HW SPI.  This should be used with nRF51822 based Bluefruit LE modules
// that use SPI (Bluefruit LE SPI Friend).
// ----------------------------------------------------------------------------------------------
#define BLUEFRUIT_SPI_CS               8
#define BLUEFRUIT_SPI_IRQ              7
#define BLUEFRUIT_SPI_RST              4    // Optional but recommended, set to -1 if unused

// SOFTWARE SPI SETTINGS
// ----------------------------------------------------------------------------------------------
// The following macros declare the pins to use for SW SPI communication.
// This should be used with nRF51822 based Bluefruit LE modules that use SPI
// (Bluefruit LE SPI Friend).
// ----------------------------------------------------------------------------------------------
#define BLUEFRUIT_SPI_SCK              13
#define BLUEFRUIT_SPI_MISO             12
#define BLUEFRUIT_SPI_MOSI             11

glee4u
 
Posts: 2
Joined: Thu Jul 02, 2020 6:20 pm

Re: Adafruit Bluefruit LE UART Friend Couldn't Factory Reset

by rsafipour on Mon Jul 06, 2020 11:41 am

I am having the exact same problem with mine. I have not figured out the solution yet. Posting here so I can follow this thread. I hope somebody can help with this!

rsafipour
 
Posts: 5
Joined: Fri Feb 14, 2020 11:56 pm

Re: Adafruit Bluefruit LE UART Friend Couldn't Factory Reset

by sarahlouise on Tue Jul 07, 2020 3:12 am

I have build this web and app https://www.seebiz.com/ how I do add install app with wifi.

sarahlouise
 
Posts: 1
Joined: Tue Jul 07, 2020 3:07 am

Re: Adafruit Bluefruit LE UART Friend Couldn't Factory Reset

by Thirdrow on Wed Jul 08, 2020 2:36 pm

Same problem here - I have four of these things and three of them have this issue currently. I also scoured the web for other solutions and have found only the adafruit documentation or the forums - both of which are vague to my nooby eyes.

Can someone please point me in the direction of the the different LED modes this device has and what they mean?
Also - total noob question, but the factory reset failure during the execution of the code from the "factory Reset" example - when it says connect the FCR pad to low/ground - do I have to solder something to that? use a jumper wire? whats the best method for doing that? is there a video?

And I think that post by sarahlouise is spam....

Thirdrow
 
Posts: 11
Joined: Mon Apr 18, 2016 9:14 pm

Please be positive and constructive with your questions and comments.