الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

مساعدة في تحويل ذاكرة القراءة م Sim الى الميموري هام

بدأه ابومحفوظ في 25 أكتوبر 2009 · 2 رد · 892 مشاهدة · في JavaME
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكــم ورحمـة الله وبركاتــه ،،

عندي مشكلة لي حوالي شهر وانا ابحث عن الحل لكن دون جدوى

اريد قراءة رسالة من الجوال باستخدام اوامر الجافا

وقد اخذت وقت طويل لمعرفة الاجهزة التي تدعم قراءة الرسائل من الجوال

وبعد بحث طويل وجدت جهاز 6600 نوكيا يدعم قراءة الرسائل

المهم بعد محاولات كثيرة وجدت جهاز 6600 يقوم بقراءة الرسائل الخاصة ببطاقة SIM فقط

ولا يمكن قراءة الرسائل المخزنة علة الميموري او الهاتف

وعد تنفيذ امر لمعرفة الاماكن التي يمكن التخزين عليها انت النتيجة

+cpms : <"Sm"> , <"SM"> , <"MT">

ارجو من لديه الحل ان يضع تعليقه باقرب فرصة

الكود =import java.io.*;
import java.util.*;
import javax.comm.*;

/**
* Class declaration
*
*
* @author
* @version 1.8, 08/03/00
*/
public class SimpleRead implements Runnable, SerialPortEventListener {
	static CommPortIdentifier portId;
	static Enumeration		  portList;
	InputStream			  inputStream;
  //static String		  messageString = "AT+CMGL=\"REC UNREAD\";\n\r";
 static String		  messageString = "AT+CMGL=\"ALL\";\n\r";
	SerialPort			  serialPort;
	Thread			  readThread;
static OutputStream	   outputStream;

String []parts;
	/**
	 * Method declaration
	 *
	 *
	 * @param args
	 *
	 * @see
	 */
	public static void main(String[] args) {
	boolean			  portFound = false;
	String			  defaultPort = "COM9";

	if (args.length > 0) {
		defaultPort = args[0];
	}

	portList = CommPortIdentifier.getPortIdentifiers();

	while (portList.hasMoreElements()) {
		portId = (CommPortIdentifier) portList.nextElement();
		if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
		if (portId.getName().equals(defaultPort)) {
			System.out.println("Found port: "+defaultPort);
			portFound = true;
			SimpleRead reader = new SimpleRead();
		}
		}
	}
	if (!portFound) {
		System.out.println("port " + defaultPort + " not found.");
	}

	}

	/**
	 * Constructor declaration
	 *
	 *
	 * @see
	 */
	public SimpleRead() {
	try {
		serialPort = (SerialPort) portId.open("SimpleReadApp", 10000);
	} catch (PortInUseException e) {System.exit(1);}

	try {
		inputStream = serialPort.getInputStream();
	} catch (IOException e) {System.exit(1);}

	try {
		serialPort.addEventListener(this);
	} catch (TooManyListenersException e) {System.exit(1);}

	serialPort.notifyOnDataAvailable(true);

	try {
		serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8,
					   SerialPort.STOPBITS_1,
					   SerialPort.PARITY_NONE);
	} catch (UnsupportedCommOperationException e) {System.exit(1);}

	readThread = new Thread(this);

	readThread.start();


// send at command


			try {
			outputStream = serialPort.getOutputStream();
			} catch (IOException e) {System.exit(1);}

			System.out.println(
				"Writing command to "
			+serialPort.getName());

			try {
			outputStream.write(messageString.getBytes());
			} catch (IOException e) {System.exit(1);}

			try {
			   Thread.sleep(5000);  // Be sure data is xferred before closing
			} catch (Exception e) {System.exit(1);}


	/////////////////////////////////
	}

	/**
	 * Method declaration
	 *
	 *
	 * @see
	 */
	public void run() {
	try {
		Thread.sleep(20000);
	} catch (InterruptedException e) {System.exit(1);}
	}

	/**
	 * Method declaration
	 *
	 *
	 * @param event
	 *
	 * @see
	 */
	public void serialEvent(SerialPortEvent event) {
	switch (event.getEventType()) {

	case SerialPortEvent.BI:

	case SerialPortEvent.OE:

	case SerialPortEvent.FE:

	case SerialPortEvent.PE:

	case SerialPortEvent.CD:

	case SerialPortEvent.CTS:

	case SerialPortEvent.DSR:

	case SerialPortEvent.RI:

	case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
		break;

	case SerialPortEvent.DATA_AVAILABLE:
		byte[] readBuffer = new byte[200];
// String r;
		try {

		while (inputStream.available() > 0) {
			int numBytes = inputStream.read(readBuffer);
		   // System.out.println("555");

		}



	   System.out.println(new String(readBuffer));

		} catch (IOException e) {
   System.exit(1);
  }

		break;
	}
	System.exit(1);
	}

}!";
#2

غريبة ولا رد؟؟؟؟؟؟؟؟؟

#3
اقتباس
وجدت جهاز 6600 يقوم بقراءة الرسائل الخاصة ببطاقة SIM فقط

اذا كنت متاكد من المعلومة بانه فقط يقرا من السيم كيف تريد ان يقرا من الذاكرة

انا ليس لدي علم بالموضوع

ولكن اعتقد بانه يمكن ان يسمح لك بالتخزين على الذاكرة الميموري ولكن لايمكنك ان تسحب المسجات المخزنة عليها ... ولله اعلم

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…