Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
AnswerCross post Pin
Not Active1-Feb-10 16:14
mentorNot Active1-Feb-10 16:14 
GeneralRe: Cross post Pin
scorpio222-Feb-10 1:33
scorpio222-Feb-10 1:33 
GeneralRe: Cross post Pin
Not Active2-Feb-10 1:56
mentorNot Active2-Feb-10 1:56 
GeneralRe: Cross post Pin
scorpio222-Feb-10 2:55
scorpio222-Feb-10 2:55 
QuestionOpen Source Project Pin
programmervb.netc++1-Feb-10 13:06
programmervb.netc++1-Feb-10 13:06 
AnswerRe: Open Source Project Pin
April Fans2-Feb-10 20:18
April Fans2-Feb-10 20:18 
GeneralRe: Open Source Project Pin
programmervb.netc++3-Feb-10 16:17
programmervb.netc++3-Feb-10 16:17 
QuestionSending AT commands to a v.92 USB modem Pin
saeidfarahi1-Feb-10 11:55
saeidfarahi1-Feb-10 11:55 
I have a NetForce USB modem (v.92 data transfer tech) which I want to send commands to. The problem is that I don't know what to send to the SerialPort (with WriteLine method) to receive answer from my modem. I tried "AT+DS44?" as the argument of WriteLine method and expected to receive all valid values of my modem as I read in this page : http://www.modemsite.com/56K/v92c.asp but in my DataReceive event handler when I call ReadLine function, I see that the return value is just what I wrote on the buffer; Meaning either the modem hasn't read the data(but why the event handler is risen?) or my modem is merely echoes what I write to it! I think I don't know sth about sending AT commands to modems but I don't know what?! Here's my whole c# code:
class Program
    {
        static SerialPort sp = new SerialPort("COM8", 56000, Parity.None, 8);

        static void Main(string[] args)
        {
            if(!sp.IsOpen)
                sp.Open();
            sp.WriteLine("AT+DS44=?");
            sp.DataReceived += new SerialDataReceivedEventHandler(sp_DataReceived);

            ThreadStart ts = new ThreadStart(f);
            Thread t = new Thread(ts);
            t.Start();
        }

        static void f()
        {
            while (true) ;
        }

        static void sp_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            Console.WriteLine("DataRecieved..............................");
            string str = sp.ReadLine();
            Console.WriteLine(str + "......................................");
        }
    }

AnswerRe: Sending AT commands to a v.92 USB modem Pin
Luc Pattyn1-Feb-10 12:10
sitebuilderLuc Pattyn1-Feb-10 12:10 
AnswerRe: Sending AT commands to a v.92 USB modem Pin
PIEBALDconsult1-Feb-10 15:01
mvePIEBALDconsult1-Feb-10 15:01 
GeneralRe: Sending AT commands to a v.92 USB modem Pin
Luc Pattyn1-Feb-10 15:11
sitebuilderLuc Pattyn1-Feb-10 15:11 
Questionrandom in background [modified] Pin
Mark H Bishop1-Feb-10 11:21
Mark H Bishop1-Feb-10 11:21 
AnswerRe: random in background Pin
harold aptroot1-Feb-10 11:39
harold aptroot1-Feb-10 11:39 
AnswerRe: random in background Pin
Abhinav S1-Feb-10 11:43
Abhinav S1-Feb-10 11:43 
GeneralRe: random in background Pin
Mark H Bishop2-Feb-10 4:05
Mark H Bishop2-Feb-10 4:05 
AnswerRe: random in background Pin
Luc Pattyn1-Feb-10 12:11
sitebuilderLuc Pattyn1-Feb-10 12:11 
Questionhow to expose an event in user control Pin
nuttynibbles1-Feb-10 10:37
nuttynibbles1-Feb-10 10:37 
AnswerRe: how to expose an event in user control Pin
#realJSOP1-Feb-10 10:47
mve#realJSOP1-Feb-10 10:47 
AnswerRe: how to expose an event in user control Pin
DaveyM691-Feb-10 12:10
professionalDaveyM691-Feb-10 12:10 
GeneralRe: how to expose an event in user control Pin
nuttynibbles1-Feb-10 16:51
nuttynibbles1-Feb-10 16:51 
QuestionAdding and removing differences from List compared to another list Pin
zagitta1-Feb-10 10:34
zagitta1-Feb-10 10:34 
AnswerRe: Adding and removing differences from List compared to another list Pin
#realJSOP1-Feb-10 10:51
mve#realJSOP1-Feb-10 10:51 
GeneralRe: Adding and removing differences from List compared to another list Pin
zagitta1-Feb-10 11:29
zagitta1-Feb-10 11:29 
GeneralRe: Adding and removing differences from List compared to another list Pin
#realJSOP1-Feb-10 23:20
mve#realJSOP1-Feb-10 23:20 
GeneralRe: Adding and removing differences from List compared to another list Pin
zagitta2-Feb-10 2:55
zagitta2-Feb-10 2:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.