[Photon] Is it possible? Broken Photon?

I was trying to use the second UART, which is Serial1 with the pins between GND and WKP. The TX pin is not working but the RX pin works fine. The code is quite simple. The Photo takes the data from RX and post it to IFTTT fine. But all the data to TX cannot be received? The oscilloscope detects nothing from the TX pin. Is it possible the Photon I have is a defect one?

Here is the code:

#include "elapsedMillis.h"

String recvLine = "";
elapsedMillis timeElapsed;
boolean ledState = LOW; // state of the LED = LOW is off, HIGH is on

void setup() {
    Serial1.begin(9600);

    // Blue LED
    pinMode(D7, OUTPUT);
    
    // Turn RGB LED off
    RGB.control(true);
    RGB.color(0, 0, 0);
    delay(1000);
    RGB.brightness(0);
    delay(1000);
}

void loop() 
{

  if (timeElapsed > (long) 1000) 
  {
      Serial1.println("atrt");

      ledState = !ledState;         // toggle the state from HIGH to LOW to HIGH to LOW ... 
      digitalWrite(D7, ledState);

      timeElapsed = 0;              // reset the counter to 0 so the counting starts over...
  }

  // ---------------------------------------------------------------------------------------------------------------------------------
  // Processing incoming UART commands
  // ---------------------------------------------------------------------------------------------------------------------------------

  // check if Qmote has incoming notifications or commands
  while (Serial1.available() > 0)
  {
    char c = Serial1.read();
    
    if(c == 0x0D)
    {
      Particle.publish("incoming", recvLine);
        
      // clear the line
      recvLine.remove(0);
      recvLine = "";
    }
    else if(c != 0x0A)
    {
      recvLine += c;
    }
    // ignore 0x0A
  } // end while
}

Samson

You can try doing simple Serial1.println("hello world"); repeatedly to see if it works first

@samson, what are the RX and TX pins connected to?

No, TX is still not working! The wired thing is the RX pin is working! From the program below, keep typing ‘a’ can toggle the blue LED but receiving nothing!

The code is simple as this

boolean ledState = LOW;

void setup() {
    Serial1.begin(9600);
    pinMode(D7, OUTPUT);  // BLUE LED
    delay(1000);
}

void loop() {
    Serial1.println("hello world");
    
    while (Serial1.available() > 0)
    {
        char c = Serial1.read();
        if(c == 'a')
        {
            ledState = !ledState; 
            digitalWrite(D7, ledState);
        }
    }
}

The PINs are connected as

Maybe you can contact support to have your device replaced - https://docs.particle.io/support/support-and-fulfillment/menu-base/

@kennethlimcp thanks for the advice. I have sent the message to Particle. Will see how they respond me.