Teensy 2.0++ with BLE not working

Status
Not open for further replies.

tzj

Member
Hi guys,
I've recently bought a Teensy2.0++ to replace my old Bluno Nano(uno with on-board ble).

I've bought a Grove-BLE http://wiki.seeed.cc/Grove-BLE_v1/ BLE module which uses a cc2540 chip.
My code is working fine, but i cant seem to read the stuff sent over the serial port on my android app. I've tried diff bluetooth serial apps, such as HMBLEComAssistant, Serial Bluetooth Terminal, and not able to receive any Serial stuff like i would in the serial monitor.

Based on the wiring pinout, Ive connected the BLE's tx to rx(teensy pin d3) and BLE's rx to tx(teensy pin d4). so it should be correct.


any idea what did i do wrong?
 
Do you get anything sent from any of the Apps?

A really basic test is to unwire your Teensy transmit pin and connect the BLE module TX and RX together. In theory that will loop data from the phone ap back to itself, and if you have code listening at the teensy end you will see it there as well as a check (or use a scope).

Edit: watching what the connection status is up to under the AT commands may also be useful - is the device even connecting to your phone?
 
Do you get anything sent from any of the Apps?

A really basic test is to unwire your Teensy transmit pin and connect the BLE module TX and RX together. In theory that will loop data from the phone ap back to itself, and if you have code listening at the teensy end you will see it there as well as a check (or use a scope).

Edit: watching what the connection status is up to under the AT commands may also be useful - is the device even connecting to your phone?

this is ridiculous. I've looped a Serial.print("test"); and connected both tx and rx of the teensy to a scope. both pins shows a flat. like a literal straight line. nothing at all, despite it showing printing in my serial monitor.

The phone apps are able to connect to it no problem. have tried multiple apps of similar nature, all are able to connect, just not receive/send any data.
 
Might help to see actual hookup and the actual code you are running.

Warning I do not have a 2+, but have all the others... If it is using Serial communications, is it not on pins D2/D3 as RX/TX? Also is your test program using Serial. callsor maybe Serial1 calls.

but again it might help to see your actual hookup... For example seen too many setups lately where people did not solder the pins in, but thought friction was enough...
 
My code is simply..
Code:
void setup(){
Serial.begin(9600);
Serial.println("LULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL"); //to make a more significant reading on scope
}
void loop(){
Serial.println("Test");
delay(1000);
}

I see the prints on serial monitor perfectly fine.

Ive connected the BLE's tx to rx(pin 2, D2) and rx to dx(pin 3, D3) based on the pinout of teensy 2.0++ i see online on teensy's site
GprCPJ3.png

I am fairly confident in my soldering skills and have checked and soldered the board under a magnifying glass(the tabletop one, with a lamp attached). Checked every hole every pin i solder, and at least twice after being done with everything.
Got my friend to check for me the soldering and wire connections again today, just to be sure.

placed the clip probes on the pin 2 and 3 of the teensy2.0++, and nope, a flat out straight line, despite seeing it printing in serial monitor.
 
Try Serial1.begin(9600);
serial1.println("Test");

I am guessing that Serial is going to the USB serial port not to the hardware pins
 
ok its working now, such that my ble terminal app receives it.

but.. now my serial monitor receives nothing..

got to use Serial.print to print to serial monitor/usb cablee
and Serial1.print to print thru pin 2 and 3.

meaning i gotta do so separately? the tx rx arent shortcircuit to the usb serial?
 
Yep - They are two different hardware serial ports. So you are free to use them any which way you want to...
 
the tx rx arent shortcircuit to the usb serial?

Correct, they are separate. Boards like Arduino Uno & Mega short them together because they use a USB-serial chip, but on Teensy the native USB and Serial1 are different ports (because there is no separate USB-Serial chip). If you want to send the same thing to both, you need to send it using 2 writes, to Serial and Serial1.
 
Correct, they are separate. Boards like Arduino Uno & Mega short them together because they use a USB-serial chip, but on Teensy the native USB and Serial1 are different ports (because there is no separate USB-Serial chip). If you want to send the same thing to both, you need to send it using 2 writes, to Serial and Serial1.

Thanks paul! ive check the serial documentations.. but cant find Serial or Serial1 's default timeout for .readStringUntil();

am i safe to assume its default is at 1000ms?
 
Status
Not open for further replies.
Back
Top