New VB.Net Version
Added by newlife over 1 year ago
Hi Admin,
how are you?
long time to talk to you
i want to send my last vb.net version for your last library version
its now one form for both mms and sms
i think you will like this layout
and finaly thanks thanks for your great work
MessagingToolkit.Core.Utilities.VB2008.zip (1.3 MB)
demo.JPG - Snap shot (71 kB)
Replies (5)
RE: New VB.Net Version - Added by stevensu over 1 year ago
Hi Newlife,
I see from your demo.jpg you are using huawei mobile 3G. What model do you use. If the modem receive new message, does the modem receive +CNMI command or the new message is polled by using AT+CMGL=0?
RE: New VB.Net Version - Added by newlife over 1 year ago
Hi Stevensu
I use E180.
I can receive new message,also i can Enable Message Indication
but you have to use (PC UI Interface) Port,and do not use the Modem port
In my case,the mode port is (3) and the PC UI Interface port is (5)
if i use the modem port i can send/recieve sms only.
but i cant use USSD,Message Indication,Call Indication,Or MMS
this is general for all HUAWEI models,you must use (PC UI Interface) for full features.
you can find this port as shown in the attached image.
I hope this help
Huawei.JPG (43.6 kB)
RE: New VB.Net Version - Added by stevensu over 1 year ago
Ok, Thank you for your information. Do you the huawei AT Command ebook?
How to retrieve active port like in your demo.jpg attachment (deviceCombobox)?
Thank you,
RE: New VB.Net Version - Added by newlife over 1 year ago
you are welcome brother,
about active port combobox,it is a part of the messaging toolkit demo,i just use it.
anyway:you can use this code to get list with all active modems with names and ports
=================================
Dim pc As String = "." 'local
Dim wmi As Object = GetObject("winmgmts:\\" & pc & "\root\cimv2")
Dim devices As SWbemObjectSet = wmi.ExecQuery("SELECT * FROM Win32_POTSModem WHERE Status = 'OK'") =================================
For Each d As SWbemObject In devices
ModemName = d.Name.ToString
ModemPort = d.attachedto.ToString
Next
but this will get all modem with direct ports,and if the modem has any other ports like huawei it will not return these ports
so you must try something else to get all ports
and to do so,you can use "SerialPort.GetPortNames"
put the only problem is that you will get only ports numbers and can not get devices name for this port,so you can not know this port device.
you can use namespace System.IO.Ports
and call
SerialPort.GetPortNames()
'##################### Working Solution #######################
after long time,I successed to Write a class to get a list of all active (Ports) with device names for all active Modems
you use the attached vb.net class
and use it like this
Dim ModemList As List(Of HardwareEnumerator.GSMModemPorts)
ModemList = HardwareEnumerator.DeviceInfo.EnumeratModemDevices
For Each s As HardwareEnumerator.GSMModemPorts In ModemList
nodeSubDevice = trvComputer.Nodes.Add(s.Name.ToString & "( " & s.Port & " )")
nodeSubDevice.Tag = s
Next
'#################################################################
hope this help
HardwareEnumerator.vb (14 kB)
RE: New VB.Net Version - Added by stevensu over 1 year ago
Hi NewLife,
Thank you for providing the hardware enumerator. How to add WbemScripting reference?
Thank you
(1-5/5)