استخدام at command - نسخة قابلة للطباعة +- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb) +-- قسم : قسم التحكم (http://vb4arb.com/vb/forumdisplay.php?fid=62) +--- قسم : قسم ربط الكمبيوتر بالعالم الخارجي (http://vb4arb.com/vb/forumdisplay.php?fid=63) +--- الموضوع : استخدام at command (/showthread.php?tid=594) |
استخدام at command - menams3 - 19-10-13 استعملت mscomm32 للاتصال ب 3g usb modem نجحت معي اوامر ارسال الرساله النصيه مع نوعيم مختليفن من الاجهزه ولكن كود الاتصال برقم نجح في جهاز واحد ولكن المشكله عندي هي استعمال اكواد ussd وكيفيه استقبال رد الشبكه مثل #100# حاول ان اضع الكود في ترميز pdu gsm 7bit ونجح معي الارسال ولكن في الاستقبال كيف اجعل التطبيق يحول الترميز ويفكه RE: استخدام at command - Seif17 - 13-11-14 أصف Serialport و Textbox لعرض النتائج صع في خصائص الـــ serialport Private Sub SerialPort1_DataReceived(sender As Object, e As SerialDataReceivedEventArgs) Handles Serialport1.DataReceived ReceivedText(Serialport1.ReadExisting()) End Sub Private Sub ReceivedText(ByVal [text] As String) 'input from ReadExisting If Me.TextBox1.InvokeRequired Then Dim x As New SetTextCallback(AddressOf ReceivedText) Me.Invoke(x, New Object() {(text)}) Else Me.TextBox1.Text &= [text] 'append text End If End Sub ثم أضف button وصع الآكشن كالتالي : On Error Resume Next With Serialport1 .PortName = Comstar.Text .BaudRate = 9600 .Parity = IO.Ports.Parity.None .DataBits = 8 .StopBits = IO.Ports.StopBits.One .Handshake = IO.Ports.Handshake.None .RtsEnable = True .ReceivedBytesThreshold = 100 .NewLine = vbCr .ReadTimeout = 100000 .Open() Console.WriteLine("Open the serial port.") End With ' Send USSD Command Serialport1.Write("ATDT," & Chr(34) & "*100#" & Chr(34) & ",15" + Chr(13)) Console.WriteLine("Read the OK response data in the serial port.") Serialport1.Encoding.GetDecoder() If Serialport1.ReadExisting = "OK" Then Serialport1.NewLine = "1" End If ' Response should be OK Dim strResponse2 As String strResponse2 = Serialport1.ReadExisting.Length ' Wait for response ستعرض الشبكة لك خيارات يمكنك الرد بالتالي : ' Send réponse 2 Serialport1.newline = "ATDT" & Chr(34) & "*100#" & Chr(34) & ",15" + Chr(13) Console.WriteLine("Read the OK response data in the serial port.") Serialport1.Encoding.GetDecoder() If Serialport1.ReadExisting = "OK" Then Serialport1.NewLine = "1" End If ' Response should be OK Dim strResponse2 As String strResponse2 = Serialport1.ReadExisting.Length ' Wait for response ملاحظة : Comstar.Text هي Combox ويجب أن تضع كود الخاص بإضافة كل البورت المفتوح لها RE: استخدام at command - كرار العامري - 03-02-15 السلام عليكم ورحمة الله وبركاته اخواني الكرام محتاج مساعدتكم بموضووووووع جداااااا مهم ارجو الرد رجاءا من يمتلك معلومه لا يبخل بها اريد تطبيقات على التحكم بالمنفذ التسلسلي rs232 ارسال البيانات واستقبالها بالفجوال بيسك 6 شاكرا مروركم على المشاركة واشكركم على المساعدة مقدما |