(CNN) -

U.S. Marine Corps reservist Sgt. Andrew Tahmooressi told CNN by phone Sunday that he was "more hopeful" and "optimistic" than ever that he would be released from a Mexican prison after a court hearing coming on Wednesday.

More than three months after he was imprisoned for driving into Mexico with three firearms in his truck, Tahmooressi called CNN from the El Hongo Penitentiary in Tecate, Mexico, where he is being held.

"I'm not as down as I once was," he said. "My relationship with the guards has turned more into a friendship, so I don't feel as alone, I guess. Once the media started covering it ... things did start changing. ... I'm just trying to keep my cool and stay relaxed."

Tahmooressi has maintained that he took a wrong turn on the California side of the border into Tijuana, Mexico, the night of March 31. He was detained by Mexican border officials for possessing a .45-caliber pistol, a 12-gauge pump shotgun and an AR-15 rifle.

"I'm not a guilty man, and you can probably hear it from my voice and the sincerity in my voice," he said. "I'm innocent, and it was just a big mistake."

He says he replays in his head what happened the night he was arrested. Tahmooressi has denied crossing the border with the intent of trafficking arms. He said allegations against him that he could be involved with in gun trafficking or anything nefarious are "silly."

"I don't know what more there is to say, really," Tahmooressi said when asked what he would tell people who don't believe what he did was an accident. "If you look at the facts, I mean ... I'm a smart man too, I'd like to think. I wouldn't go about trying to sell my guns to criminals. For one, I'm not a criminal. And I don't like any criminal activity. I especially don't like any cartel people."

"I wouldn't have gone about selling my guns to get money. I would have sold my motorcycle. I would have sold my truck. Besides that I had plenty of money in my bank account that I had saved up from the Marine Corps. And I'm not a dumb man, to be selling my guns that have serial numbers registered to me."

The director of the Tijuana checkpoint told Mexican media last month that Mexican agents at the border gave Tahmooressi a chance to surrender his weapons and return to the United States without incident. Tahmooressi told CNN that's "a lie."

"That's not true at all. They never told me anything of that sort," he said.

Tahmooressi said the Spanish translator provided to him at the border added to the confusion in communication.

"After I had got off the phone with 911 and I felt like there was no one there to help me, I even told them, I said, 'You can take my guns, take my truck and take all my possessions, just let me go back to America.' And they shook their head no in frustration."

Asked by CNN if he believes he should receive punishment for his mistake, Tahmooressi said no.

"I feel like the punishment was never necessary from the beginning. But once the (Mexican) military people got involved, they were like, 'Look what we found, we found these guns, good for us. Let's get this guy incriminated.' There was some good people at the border who were going to do the right thing, and that's how it should have been from the start."

As for what he needs most right now, Tahmooressi said, "I just need the people to keep on praying for me. I think that should help. There's really nothing else besides that that I need," he said.

"My court date is on Wednesday. Once the judge gets to hear me out, I think it should go well. And I think it shouldn't be too much longer (that I will be in prison) after that, I hope."