Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8596917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:47:41+00:00 2026-06-12T00:47:41+00:00

I have a small program, that sends sms messages over SerialPort. It works nice

  • 0

I have a small program, that sends sms messages over SerialPort. It works nice for 7-8 days in a row, sending hundreds of messages per day. But sometimes it hangs on sending the message, and only a hardware reset can solve it.

The problem occurs when the modem is waiting for the message (showing the "> " string), and I sent my message. When a modem receives the CTRL+Z (ASCII#26) character, it should send back an "OK". But I never recevice this response, and from that time, every write attempt ends with a System.TimeoutException: The write timed out. exception.

I can catch the exception, but I can’t do anything to resolve the problem (except for the hardware reset). From the 1st timeout exception, the serial port won’t work – not even for hyperterminal. I had the chance to try 2 different modems, but both of them produces the same simptoms. (Different modems, but same computer.) I don’t have the means to test it for 10 days on a production like environment, on a different machine.

I used a serial monitor software, and it also showed, that the serial port (or the modem) sends back a write timeout error. When I initialize my serial port I set the WriteTimeout property to 100 (ms). I have to use hardware handshaking according to the modem’s manufacturer.

I send only simple text messages (no PDU, no more than 160 char).

I already found this thread, talking about write timeouts and hardware handshaking. I could raise the write timeout value, but I would like to know why this problems occurs only occasionaly. And I would like to know if this is my problem at all…

I’m using C# 4.0, the program runs on a Windows 2008 64 bit server.

Any ideas?


UPDATE
Following the hint from Dennis, we have found a solution. The watchdog part is my own software, detecting the timeout exception. When this happens, the program will send a command to a specialized hardware to toggle the power of the modem. At first, this specialized hardware would have been a relaycard, but we found a special extension cord, that can be controlled over RS-232 or USB or ETHERNET. (Switching on and off it’s plugs.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:47:43+00:00Added an answer on June 12, 2026 at 12:47 am

    This is a well-known problem for people, who often works with GSM-modems. In general, you can do noting here at software level, and the hardware reset is the only effective way.

    If you will look into any ATM, which works through the GSM newtork, you will find there a small watch-dog device, which is intended for the single thing – to make a hardware reset (it turns the power off, than on).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small program that sends and receives data from server and client
I have a small program that's supposed to sample some value from a device
I have a small program that reads in a file and processes the data
I have a small program that I'm trying to create to get ip addresses
I have a small Java program that reads list of IPs from text file
I have a small java program that reads a file in, in eclipse i
I'm experimenting with file I/O. I have a small practice program that creates a
Below is a small program that I have written to count the number of
I have a problem with Regular Expressions. I'm writing a small program that matches
I have a program that creates a small file in the Bin directory for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.