Nokia 3110c über C# SMS lesen



  • Hallo,

    Ich versuche mit folgendem Code die SMS auf meinem Nokia zu lesen:

    private void btnRead_Click(object sender, EventArgs e)
    		{
    			// Get and verify port name
    			string portName = cboPort.Text;
    			if (portName.Length == 0)
    			{
    				MessageBox.Show(this, "You must enter a port name.", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Warning);
    				return;
    			}
    
    			lvwMessages.Items.Clear();
    			Update();
    
    			// Set up the phone and read the messages
    			ShortMessageCollection messages = null;
    			try
    			{
    				this.port = OpenPort(portName);
    				Cursor.Current = Cursors.WaitCursor;
    				// Check connection
    				ExecCommand("AT", 300, "No phone connected at " + portName + "." );
    				// Use message format "Text mode"
    				ExecCommand("AT+CMGF=1", 300, "Failed to set message format.");
    				// Use character set "ISO 8859-1"
    				ExecCommand("AT+CSCS=\"8859-1\"", 300, "Failed to set character set.");
    				// Select SIM storage
    				ExecCommand("AT+CPMS=\"SM\"", 300, "Failed to select message storage.");
    				// Read the messages
    				string input = ExecCommand("AT+CMGL=\"ALL\"", 5000, "Failed to read the messages.");
    				messages = ParseMessages(input);
    				Cursor.Current = Cursors.Default;
    			}
    			catch (Exception ex)
    			{
    				Cursor.Current = Cursors.Default;
    				MessageBox.Show(this, ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    				return;
    			}
    			finally
    			{
    				if (port != null)
    				{
    					ClosePort(this.port);
    					this.port = null;
    				}
    			}
    
    			if (messages != null)
    				DisplayMessages(messages);
    		}
    

    Bekomme immer den Fehler:

    Failed to select the message storage

    In der Zeile:

    ExecCommand("AT+CPMS=\"SM\"", 300, "Failed to select message storage.");
    

    Kann wer helfen?
    Danke!



  • Ich komm grad vom Dienst ( ➡ aggressiv 👍 )... was zum Henker ist ExecCommand, was tut es, woher kommt es und warum benutzt du das?

    Ich hab noch nen Haufen Nokia Phones rumliegen (Nokia 6150, 3110c, 5800, 2730c), eventuell kann ich also auch noch etwas testen 😉

    MfG



  • oh vom dienst 😃

    es führt den befehl auf dem nokia handy aus.
    kannst dir vorstellen wie hyper terminal, mit dem du auc hdirekt AT befehle auf dem handy ausführen kannst.

    meine vermutung:
    das 3110c CPMS implementation. wenn ichs über hyper terminal mache, bekomm ich ebenfall "error"

    habe das noch bei einem 6500er nokia probiert, ebenso "error" ...



  • Such mal danach im Netz. Manche sagen das es nicht geht, manch sagen ein Firmwareupdate hilft.



  • Wie gesagt, habe die aktuellste Firmware auf dem Handy oben...

    DAchte mir auch schon dass das Command nicht implementiert ist.
    Mich würde wundern ob sonst wer welche Nokias kennt, wo das senden und empfangen via sms von den AT Befehlen möglich ist?



  • Hallo,

    mit dem N79 gehts auf jedem Fall 🙂 Habs selber mal als GSM Modem benutzt für nen Projekt.


Anmelden zum Antworten