Boron 404X UART/Serial1 RX issue

Hi everybody,

I am attempting to interface with an external sensing module over UART which I have wired and configured to Serial1/RX&TX but the Boron never registers any data input. I've spliced in an external USB-Serial adapter to sniff the RX and TX individually and everything looks fine, it just never registers on the Boron side.

I've verified the sensing module is 3.3v per my meter and their documentation. I also have ran a separate wire between the two to make sure the grounds are the same.

I've tried the following two methods that I've found in the docs and in other forum posts. I commented out almost everything else that would be running.

while loop w/ serial1 available

void setup(){
	Serial.begin(115200); 
	Serial1.begin(19200, SERIAL_8N1);
}
void loop(){
	if((millis()-millisSinceLastPrint) > 1000){
		Serial.println("waiting for serial1 available");
		if(Serial1.availableForWrite()>10){
			Serial1.print("test\n");
		}
		millisSinceLastPrint = millis();
	}

	while(Serial1.available() > 0){
		int byte = Serial1.read();
		Serial1.println("success");
		Serial.print("Recieved: ");
		Serial.println(byte, DEC);
	}
}

serial event

void setup(){
	Serial.begin(115200); 
	Serial1.begin(19200, SERIAL_8N1);
}

void serialEvent1(){
	char byte = Serial1.read();
	Serial.println("read " + byte);
	if(Serial1.availableForWrite()>10){
		Serial1.println("success");
	}
}

void loop(){
	if((millis()-millisSinceLastPrint) > 1000){
		Serial.println("waiting for serial1 available");
		if(Serial1.availableForWrite()>10){
			Serial1.print("test\n");
		}
		millisSinceLastPrint = millis();
	}
}


I switched the external serial adapter from the module's TX to RX about halfway through the screengrab. You can see the sensor is receiving the "test" command since it reported an illegal command value.

Really not sure what else to do but buy another boron and hope for the best. I don't have access to an oscilloscope at the moment so I figured I'd try here to see if anyone has an idea.

Are you getting the waiting for serial1 available message on the Boron USB USB serial output?

What is the status LED on the Boron doing?

If you don't have SYSTEM_THREAD(ENABLED); in your code (it's recommended that you do), you won't get any output until the device is online and breathing cyan.

I would ignore the serial events example; there is no reason to use serial events.

Yup the waiting for serial1 available is on the usb serial consistently. The status LED is a slow breathing cyan.

I added ``SYSTEM_THREAD(ENABLED)``` but doesn't seem to make a difference. I also removed everything else and ended up with just this for the program for testing.

#include "Particle.h"
int millisSinceLastPrint;

SYSTEM_MODE(AUTOMATIC);
SYSTEM_THREAD(ENABLED);

void setup(){
	Serial.begin(115200);
	Serial1.begin(19200);
}

void loop(){
	if((millis()-millisSinceLastPrint) > 1000){
		Serial.println("waiting for serial1 available");
		if(Serial1.availableForWrite()>10){
			Serial1.print("test\n");
		}
		millisSinceLastPrint = millis();
	}

	while(Serial1.available() > 0){
		int byte = Serial1.read();
		Serial1.println("success");
		Serial.print("Recieved: ");
		Serial.println(byte, DEC);
	}
}

I can't remember my setup last night but now with the sensor TX plugged to boron RX it does seem to form bits properly. My serial debugger just prints out whitespace characters, but when I unplug the serial connection and monitor the sensor by itself it prints out the data I'd expect.

There's something weird going on, but it's unclear to me what. What I would do is remove the sensor completely and jumper RX to TX and see if you can write a byte then read it back. You could also test using your USB to UART adapter without your sensor.

Tried a fresh boron 404x to no avail, also tried a brand new photon 2 with the same code above and it works great. both have a single jumper between RX and TX (D9/D10). Not sure what to test from here.

new Boron

Photon2

Edit: I think plugging the photon in via USB and an external power supply may have killed it. So I won't be able to troubleshoot with that anymore...