The man accused of setting off a pipe bomb inside a subway tunnel in Midtown appeared in court Wednesday, courtesy of a video link from his hospital room.

Akayed Ullah, 27, was officially read his charges by a federal judge.

Lying in a hospital bed, he showed no emotion in his first court appearance, two days after he allegedly tried to blow himself up in the subway.

Speaking softly in English, Ullah gave short answers to questions by U.S. Magistrate Katharine Parker, who was sitting in a Lower Manhattan courtroom several miles away. The two were linked by video, which could be watched on monitors in the federal courthouse.

Ullah answered, "Yes, I do" when he was asked if he understood his rights. He waived his right to enter a plea after the charges against him were read. A preliminary hearing is set for Jan. 13.

His head was propped up on a pillow and he was covered to his neck by a white hospital blanket at Bellevue Hospital. It appeared that he was hooked up to an IV.

Two assistant public defenders stood beside his bed during the hearing, which lasted just over 10 minutes.

Prosecutors filed a list of federal terrorism charges against Ullah on Tuesday.

Investigators said Ullah told them the Islamic State group inspired him to carry out Monday's attack in an underground subway tunnel near the Port Authority.

Ullah admitted to planning the attack for two to three weeks.

Police said he strapped a homemade device to his body, made with explosive powder, a nine volt battery, and a Christmas light.

Additional evidence was found at his home in Brooklyn, officials said.

"A search yesterday of his apartment revealed metal pipes, pieces of wires, and metal screws consistent with the bomb materials recovered at the scene," said Acting U.S. Attorney Joon Kim. "Officers also found a passport there in Ullah's name with handwriting that included one particularly chilling note, and I quote, "Oh America, die in your rage."

Authorities said Ullah started down the path of radicalization three years ago, after watching Islamic State Group videos online.

Ullah lived in Brooklyn after immigrating from Bangladesh in 2011, but he occasionally returned to his native country, where his wife remained.

Officials in Bangladesh said Wednesday said that counterterrorism investigators there questioned Ullah's wife. She reportedly told them that during his last visit, he urged her to read the writings of an imprisoned radical Islamic leader. But it's not known if Ullah has any link to him.

Ullah will remain at Bellevue Hospital in custody without bail as he continues to recover from the burns he suffered from the pipe bomb blast.

Five other people suffered minor injuries in the attack.

Sketch above courtesy Andrea and Shirley Shepard.