Bluefruit LE UART Friend receiving -1

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
valdis
 
Posts: 5
Joined: Tue Aug 20, 2013 9:23 am

Bluefruit LE UART Friend receiving -1

Post by valdis »

I am running the Bluefruit LE UART friend from an Arduino Uno with the Neopixel sketch provided in the library. I previously tried the throughput sketch and it ran fine with my phone. But the Neopixel sketch will not connect. I did a serial.println() with what the Uno is receiving from the Bluefruit friend and all it prints are -1. Even if I send something via the UART interface, it doesn't print receive it - just -1. The Bluefruit is in data mode, its blinking twice and then pausing for 3 seconds.

I am using the software serial with pins 8-12 as recommended in the tutorial. The neopixel is connected to pin 7.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Bluefruit LE UART Friend receiving -1

Post by mikeysklar »

The initial successful connection with the throughput sketch might have confused things. Maybe start fresh with these FAQ suggestions:
There are several possible explanations here, but the first thing to try is to:
Disconnect and close the Bluefruit LE Connect app if it's open
Disable BLE on your mobile device
Restart your Bluefruit sketch and HW
Turn BLE back on again (on the mobile device)
Open the Bluefruit LE Connect mobile app again and try to connect again
If problems persist, try performing a Factory Reset of your device (see the appropriate learning guide for details on how to do this since it varies from one board to another).
https://learn.adafruit.com/introducing- ... friend/faq

User avatar
valdis
 
Posts: 5
Joined: Tue Aug 20, 2013 9:23 am

Re: Bluefruit LE UART Friend receiving -1

Post by valdis »

Reconnecting and a factory reset did not change anything. The Bluefruit app still fails to detect the neopixel sketch.

When I turn on echo and verbose its saying AT+GAPGETCONN and the response seems to be 1. When it isn't connected by bluetooth it reads 0.

I'm not sure how the neopixel sketch is supposed to work, but it isn't doing it.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Bluefruit LE UART Friend receiving -1

Post by mikeysklar »

Okay, can you post the example code you are running for the NeoPixel test? It sounds like the code is the culprit here as there are some required changes you need to make. By default the examples are set to the BluefruitLE SPI rather than the BluefruitLE UART that you are using.

These are the two NeoPixel code examples I'm familiar with:

https://github.com/adafruit/Adafruit_Bl ... s/neopixel

https://github.com/adafruit/Adafruit_Bl ... xel_picker

https://learn.adafruit.com/introducing- ... 2177166-24

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”