C # write Mobile software

Source: Internet
Author: User

The first time I spent writing something, I used to look at everyone.

Recently contacted the program of short message, I believe that a lot of brothers have been realized, I just write my own experience.

First checked the csdn on the post, which has a lot of ads, did not believe them:
Read the recommended pole above the Silkworm Chrysalis wrote the classic procedure, the harvest is quite large
Take that program as the core and start trying. In the middle received the enthusiastic reply of Egpscar, hereby thanks.

Silkworm Chrysalis that is not to see the introductory tutorial Ah, must see
Http://soft.yesky.com/SoftChannel/72342380468109312/20040523/1800310.shtml

And the http://0926.net/archive/sms.htm provided by popcorn (Mihua)
There is also a download address for the AT command http://www.cetinet.com/download/list.asp?id=179

On the basis of the Silkworm Chrysalis sample program, I have added some control to the debugging side, which can basically reach 800 per hour.
I'm using WinForm, and I haven't done it with Windownsservice for the time being.

Source code Download Address
http://bbs.gzeasy.com/index.php?showtopic=275782 no place to upload, borrowed the GZ BBS

I have added
More than 1 threads processing to ensure that the COM port can be read out at the same time, rather than wait until read an AT command returned to the end to display the results
2 read COM port add retry, 50ms read once
3 read COM port to increase processing buffer,
Because after sending a command to the COM port, then read the COM port to obtain the return information, note that the data of the COM port is not guaranteed to be on the COM port. The next reading is new, 50ms read once, wait for the next time to read or read n times into the buffer, to form a match with the agreement of the string, It took me a little time to figure it out, so the master laughed at it. That's OK.

I use my Siemens 3518i mobile phone, and then sell mobile phone accessories where I bought a data cable 30 pieces, began debugging

Here to explain, this program has logging, you can see the interface of two data boxes, black and green word is sent log, white bottom black word is bufferlog. What is recorded, that is, the failure or success of the delivery, if the failure, will be renewed. The content is sent in the database, with SQL, the table can find the file created in the databases directory, an extension of SQL.

I sent 200, see the log has been issued several, accept the end of the more than 2. It's not ideal, is it, and an hourly estimate of only 400~600.

Later I was going to buy a gsmmodem, mainly because of the charging problem, because my data line and charge of the line with the interface is one, also can not change the battery. Episode (later Silkworm Chrysalis told me that the mobile phone can be charged and even the data line, but I think may need to have hardware support, and then the equipment bought, I haven't tried it either)

Gsmmodem this thing Shanghai do not know where to sell, anyway, I was not found, and then in some sell this DD website Forum inquiry, mainly in Beijing and Fujian Guangdong, we often received you won, now we all know is Fujian and Guangdong liar hair Message, I guess they're using this kind of equipment, but there are more modules, and there's no saying bad things about people here. hehe

One of them gave me a quote, I do not dare to buy, mainly worried that this program can not be used, I let him help me test, the results of a few days did not reply, waiting for a www.sendsms.com in the letter said they also sell, I said that you help me try it, this guy did not install. NET, Even windowsupdate have no use: (, I had to pass him a framework, he worked hard for me all the afternoon, the result is good. The boy is still enthusiastic, so it gives a place for the brothers who want to buy professional equipment. It's kind of an encouragement to his professionalism, huh?

After receiving the equipment, I immediately test 100, used 7 minutes less than a little, so see an hour to send 800 no problem, and send the log did not fail and resend, received the phone also received all, no duplication.

The difference between this device and the phone is to analyze
My phone's connection speed is 19200bps, and this gsmmodem (wavecom) is only 9600
But it's mostly stable and responsive, like my mobile phone about to wait a little bit longer to read out OK or error, this modem quickly. I read it one more time and print a point in the log, the average phone calls 7, 8 points, and the modem is about 4, 5 points, And because the mobile phone seems to be prone to error, and then hair, although the last can be successful, but time is wasted.

Well, that's basically it, and it's been used for about two weeks, if there is no silkworm Chrysalis code, I do not know how to do it, so also provide my code for everyone's reference (after the consent of the Silkworm Chrysalis), hope to save the time of the brothers need this, there is no comment, if there is doubt and discussion can write to me Guanfei@hotmail.com, to the Chinese theme, or spam too much I easily overlooked. The next step is to read the message. It's not too hard to predict .

Hope everybody likes, HoHo, need this person not many, put on csdn for like me the person search to
2004-11-0208:55

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.