Re: serielles Modem ansprechen ( AT Befehle )

From: Thomas Scheidegger [MVP] (spam.netmaster_at_swissonline.ch)
Date: 09/08/04

  • Next message: Jan el846_at_gmx.de: "RS232"
    Date: Wed, 8 Sep 2004 10:15:22 +0200
    
    

    Hallo Jan

    > Hallo ich möchte ein serielles Modem über ein kleines C#
    > Programm ansprechen, wie kann ich eine Verbindung zum
    > Modem aufbauen und AT Befehle senden/empfamgen ?

    Nicht direkt mit .NET.

    Falls das Modem korrekt bei Windows angemeldet ist,
    dann Verbindungsaufbau im Prinzip über das Win32 'TAPI' API (siehe MSDN)
           http://msdn.microsoft.com/library/en-us/tapi/tapi3/microsoft_telephony_overview.asp
    Hat den Vorteil, dass Code weniger vom Modem-Typ/Hersteller
    abhängig ist.

    Falls du direkt mit AT-Befehlen arbeiten willst,
    dann wohl nur direkt via serielle Schnittstelle:

    Meine Serial-Port FAQ:

    Das .NET 1.0/1.1 Framework hat keine Unterstützung für Ports (RS-232/COM/LPT),
    kommt erst ab .NET 2.0 (2005):

       .NET 2.0 Beta 1 Doku:
          http://lab.msdn.microsoft.com/library/en-us/cpref/html/N_System_IO_Ports.asp
       Serial Support in Whidbey Demo:
          http://www.gotdotnet.com/team/clr/bcl/demos/demos.aspx

    Mit 1.0/1.1 muss man mit dem Win32 API per PInvoke oder Interop arbeiten...

    Das Win32 API ist hier beschrieben (C++):
      http://msdn.microsoft.com/library/en-us/dnfiles/html/msdn_serial.asp

    MSDN Artikel für .NET/C#:
      http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/

    PInvoke Bsp für VB.NET:
       http://support.microsoft.com/?kbid=823179
       http://msdn.microsoft.com/library/en-us/dnvssamp/html/vbcs_usingthecomportinvbnet.asp
       http://www.gotdotnet.com/community/usersamples/Default.aspx?query=rs232
       http://www.mentalis.org/classlib/class.php?id=15
       http://www.corradocavalli.cjb.net/

    oder für C#:
      http://www.gotdotnet.com/community/usersamples/Default.aspx?query=SerialPort
         (beachte, Projekt mit beta VS.NET erstellt, lies die gotdotnet Kommentare)
      http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/
      http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=9dde5cf3-4842-4d4b-baa7-73e09c4d5890
      http://www.gotdotnet.com/community/usersamples/Default.aspx?query=SerialStream
      http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=5a96c071-e9e8-47c4-bb9e-5413384f0c25

    oder das alte VB6 MSComm ActiveX wiederverwenden, gibt aber Probleme (Lizenz)
      http://support.microsoft.com/?kbid=318597
      http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=320
      http://ourworld.compuserve.com/homepages/richard_grier/NETCommOCX.htm

    oder auch "Managed Extensions for C++" und Wrapper-Klassen:
        http://msdn.microsoft.com/library/en-us/vcmex/html/vcconMCOverview.asp
        http://www.gotdotnet.com/team/cplusplus/
        http://msdn.microsoft.com/library/en-us/dncscol/html/csharp12192002.asp
        im VS.NET Pfad:
         ...\VC7\managedextensionsspec.doc
         ...\VC7\migration_guide.doc
       MC++ Sample:
        http://www.codeproject.com/managedcpp/howtocomport.asp

    fürs Compact Framework (Windows CE)
       http://msdn.microsoft.com/library/en-us/dnnetcomp/html/PISAPICF.asp
         http://www.microsoft.com/downloads/details.aspx?FamilyID=206645de-63ba-4e49-b9a3-2d3b9cef4aa5
       http://ourworld.compuserve.com/homepages/richard_grier/CFSerial.htm

    oder ggf kaufen, z.B.:
      http://www.sax.net/dotnet/communications/
           (Community Edition in : http://msdn.microsoft.com/vbasic/vbrkit/ )
      http://www.winsoft.sk/ncomport.htm
      http://www.charonsoftware.com/net/communications/
      http://www.scientificcomponent.com/portcontroller_net.htm
      http://www.aftek-software.com/CommControl.htm
      http://www.componentscience.net/Elements/TransPort/
      http://franson.biz/serialtools/

    -- 
     Thomas Scheidegger - MVP .NET - 'NETMaster'
     http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
    

  • Next message: Jan el846_at_gmx.de: "RS232"

    Relevant Pages

    • Re: Is VS2008 a good environment?
      ... Windows provides you an API called Win32 for usermode applications. ... Making a shim between "static" function and a proper member function is very ...
      (microsoft.public.win32.programmer.ui)
    • Re: LoadLibraryEx (as datafile) and MorIcons.dll - extracting icons
      ... At the time the documentation for Windows 2.x was written there was no ... publicly available Win32 API or SDK. ... In my copy of the 16 bit SDK that cam ...
      (microsoft.public.win32.programmer.tools)
    • Re: Suggested base class additions
      ... If you think of Dolphin as primarily a Smalltalk-flavoured front-end to Win32, ... then it'd seem quite natural to have all the API wrapped/exposed. ... on Windows, then the less you see of the Win32 cesspit the better. ...
      (comp.lang.smalltalk.dolphin)
    • Re: May I introduce myself to cobol?...
      ... a clarification on what the win32 API ... meaning "Application Programming Interface", ... in the context of the OS Windows ...
      (comp.lang.cobol)
    • Re: UpdateDriverForPlugAndPlayDevices API problem
      ... "Prashanth" wrote in message ... > I am having problems in using the "UpdateDriverForPlugAndPlayDevices" API ... This above API is working fine in XP but in Windows 2000 it ... According to MSDN this API should work under both Windows ...
      (microsoft.public.development.device.drivers)

    Loading