David Surman Jr., the Quakertown man police say was behind a series of mysterious explosions in Bucks County last year, was ordered Friday to remain behind bars until his trial.

Surman, 31, violated his bail a second time in an unrelated child pornography case by possessing devices with access to the internet. On May 24, prosecutors say, probation officers on an unannounced visit discovered that Surman had two smartphones and a laptop. He had been barred from possessing devices with internet access as a condition of his bail.

That condition was at the center of two lengthy bail revocation hearings last month, when Surman and his attorney, Paul Lang, argued that purchases made through PayPal accounts bearing his name were actually made by his mother, Kathy.

At the time, County Court Judge Raymond F. McHugh ruled that Surman had improperly used internet-connected devices in his home, but allowed him to remain free, subject to GPS monitoring and random drug testing. But the discovery by probation officers last week led McHugh to overturn that decision.

The officers also found, through the GPS monitoring, that Surman made at least one unauthorized trip away from his home, according to Deputy District Attorney Antonetta Stancu, the lead prosecutor in the case.

“I had argued before that no set of conditions would prevent [Surman] from violating his bail, and I think the judge was generous in giving him an opportunity,” Stancu said. “But he clearly has shown there are no set of conditions that would prevent that.”

Lang declined to comment on the bail revocation Friday, but said it wasn’t an obstacle.

“Bail has nothing to do with the fact that my client is innocent and will be proven not guilty of all charges at the trial,” he said.

Surman was arrested last June and charged with possessing weapons of mass destruction after state police investigators found homemade explosives in his home and business in the northern portion of Bucks County. He was arrested a second times months later, when detectives investigating the bombings uncovered child pornography on electronic devices seized from his home.

Surman’s trial in both cases is set to begin on Aug. 19.