I posted on the Adafruit site, but they recommended me posting to the Arduino boards for info regarding an error message I've been getting.
I'd be grateful for any advice you might have.
I've had good luck in the past with the Bluefruit LE - Bluetooth Low Energy board.
But this time around, I'm getting a strange error message.
In fact, I've working on assembling two identical Arduino projects.
In one, everything seems to be working well
But for the second one, when I hook everything up, upload the sketch, and pull up the serial monitor, I get this error:
ACI Command D
Evt Cmd respone: Error. Arduino is in an while(1); loop
In both cases, I'm connecting to a separate Arduino Nano board.
I thought that the problem might be the one Nano, but when I upload a simple blink app, that works fine.
I've checked my connections a bazillion times, but still am getting the same problem.
Look at the code getting executed - you probably have something like this in the aci_loop() function:
case ACI_EVT_CMD_RSP:
//If an ACI command response event comes with an error -> stop
if (ACI_STATUS_SUCCESS != aci_evt->params.cmd_rsp.cmd_status)
{
//ACI ReadDynamicData and ACI WriteDynamicData will have status codes of
//TRANSACTION_CONTINUE and TRANSACTION_COMPLETE
//all other ACI commands will have status code of ACI_STATUS_SCUCCESS for a successful command
Serial.print(F("ACI Command "));
Serial.println(aci_evt->params.cmd_rsp.cmd_opcode, HEX);
Serial.println(F("Evt Cmd respone: Error. Arduino is in an while(1); loop"));
while (1);
}
so there is an error that is detected in the command response and the error message tells you that the library you are using will enter a while(1); infinite loop because it does not know how to deal with the error...
Have you checked just swapping the faulty one with the good one with everything else staying the same? what happens? you might have a faulty BTLE module... have you ever got anything to run with it?
Thanks for the helpful advice. I dug around into the BlueFruit library and found the following code:
void Adafruit_BLE_UART::pollACI()
{
// We enter the if statement only when there is a ACI event available to be processed
if (lib_aci_event_get(&aci_state, &aci_data))
{
aci_evt_t * aci_evt;
aci_evt = &aci_data.evt;
switch(aci_evt->evt_opcode)
........
case ACI_EVT_CMD_RSP:
/* If an ACI command response event comes with an error -> stop */
So that seems to indicate to me that this particular Bluetooth module is immediately going into the error state before it has a chance to receive any communications.
I can't easily switch this module out with the other one because I soldered it directly to the board. I could unsolder it, but I was wondering:
What is the relatively likelihood of:
a) having a bad bluetooth board
vs.
b) me having ruined the board with careless soldering
(yeah, I know you can't know my soldering skills, but I was just wondering...)
If you used header pins, just cut them off with diagonal cutters. Cut both above and below the board as close to the board as possible. Then, use a solder sucker on each hole - heat from one side, suck the other. I've done this, and it gets the holes nice and clean. Just solder new pins into the holes, and it's just like new.