BC127 - Can't communicate through UART header

Hello!
I’m currently trying to communicate with a BC127 DISKIT from a Teensy 3.5 through the UART header without success. I have the RX of BC127 connected to the TX of the Teensy and the RX of the Teensy connected to the TX of the BC127. The Teensy pins are “TTL level” and I’m supplying the BC127 with power through the USB to HOST terminal. Theres 4 dip switched on the BC127 (sw1) which I’ve found need to be ON to communicate through UART to USB and supposedly OFF to communicate through the UART header. I’ve had communication through the UART to USB and all worked well.

Any ideas why I can’t get comms through the UART header? I’m using a program in the Teensy that has been proven, and can’t even get a simple echoback program to work. My BC127 has version 6.1.5

Still no progress. I’ve set the BC127 to auto connect to a headset. Here is my BC127 config:

BlueCreation Copyright 2017
Melody Audio V6.1.5
Build: 1496939390
Ready
CONFIG
AUDIO=0 0
AUDIO_ANALOG=15 15 1 OFF
AUDIO_DIGITAL=0 44100 64 100A00 OFF
AUTOCONN=2
AUTO_DATA=OFF OFF OFF
BALANCE=100 100
BATT_CONFIG=OFF 145 4250 1500 150
BC_SMART_CONFIG=68E3 28F0 89F7 D93C
BEACON_DATA=0 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF 04 D2 16 2E EE
BLE_CONFIG=0 OFF 40 ON
BLE_CONN_PARAMS=128 12 6 40 0 400 50 400 400 61 400 400
BT_VOL_CONFIG=A A 10 1
CLASS_1=OFF
CMD_TO=20
COD=240404
CODEC=0 OFF
CONN_TO=0
DEEP_SLEEP=OFF
DEVICE_ID=0001 0002 0003 0004 0005 0006 0007 0008
DISCOVERABLE=2 0
ENABLE_BATT_IND=ON
ENABLE_CAPSENSE=OFF
ENABLE_LED=ON
ENABLE_SPP_SNIFF=OFF 0 0 0 0 0
GPIO_CONFIG=ON 0 255
HFP_CONFIG=OFF ON OFF OFF OFF
HIGH_SPEED=OFF OFF
LOCAL_ADDR=20FABB0A001B
MAX_REC=2
MM=OFF OFF 0 OFF OFF OFF OFF OFF
MUSIC_META_DATA=OFF
MUSIC_OLD_AVRCP=OFF
NAME=BC-0A001B
NAME_SHORT=BCA001B
PIN=0000
PROFILES=2 2 0 2 2 1 2 1 0 0 1 0
REMOTE_ADDR=E422A510368D
SPP_UUID=00 00 11 01 00 00 10 00 80 00 00 80 5F 9B 34 FB
SSP_CAPS=3
TWS_CONFIG=OFF 1 2
UART_CONFIG=9600 OFF 0
USB_HOST=OFF
VREG_ROLE=1
OK

So as soon as i power the BC127 up, it automatically connects to my headset. Using the USB to UART connection and serial terminal software on my laptop, when I enter “CALL 12 OUTGOING 1”, it opens an AGHFP channel. Perfect!

My problem is trying to give this “CALL 12 OUTGOING 1” command the the UART header from my Teensy 3.5. Can anyone help?

I’ve tried the SparkFun Arduino library without success. I’m just getting -2 responses. I’ve tried to go back to the very basics with this code:

#define HWSERIAL Serial1

const int LED_PIN = 13;

String Call = (“CALL 12 OUTGOING 1”);
String EOL = ("\r");

void setup() {

pinMode(LED_PIN, OUTPUT);

HWSERIAL.begin(9600, SERIAL_8N1);

delay(1000);

       //blink 4 times to show teensy  CPU is running

Blink();
Blink();
Blink();
Blink();

HWSERIAL.print(Call);
delay(1000);
HWSERIAL.print(EOL);
}

//-------------------------------------------------------------------
//Subroutines
//-------------------------------------------------------------------
//Blink Routine
void Blink() {
//blink the LED
digitalWrite (LED_PIN, HIGH);
delay(1000);
digitalWrite (LED_PIN, LOW);
delay(500);
} //end of Blink routine

void loop() {

}

Any help would be super appreciated.

Did you get it working yet?

I’m not an expert, but try adding pull-up resistors of different values and see what happens

Hi,
Have you tried to connect the USB to Uart to the Teensy to see if you can get communication to work?

Hi!

I had some progress. Using the Sparkfun Arduino lib I can now send commands to the BC127, but not receive anything back from the BC127. Even though the commands work, I still get a -2 response from the BC127 in the serial monitor, indicating a timeout error. I thought it might be a difference in baud rate problem, but if that was the case, the commands I send wouldn’t work.

@workplease,

Are you using hardware UART or Software UART? The Software UART (bit-banging) is notoriously buggy on Arduinos.

-Ted