Auto Detect Port that is connected by GSM Modem in C# -


how autodetect or autoconnect port connected gsm modem. assuming have variables. want don't want set portname automatically portname. please help!!! in advance!

using gsmcomm.gsmcommunication; using gsmcomm.pduconverter; using gsmcomm.pduconverter.smartmessaging; using gsmcomm.interfaces; using gsmcomm.server;  public void setdata(string portname, int baudrate, int timeout) {     this.portname = portname;     this.baudrate = baudrate;     this.timeout = timeout; }  public void getdata(out string portname, out int baudrate, out int timeout) {     portname = this.portname;     baudrate = this.baudrate;     timeout = this.timeout; }  private void formload(object sender, eventargs e) {     portname = "com43";     baudrate = 9600;     timeout = 300;     comm = new gsmcommmain(portname, baudrate, timeout);     comm.open(); } 

you can cycle through com ports in system (their list programmatically) , send command receiving gsm modem version or model (as remember yo can via gsmcomm library).


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -