This function worked for me. It sends a PDU message.
Private Sub PDUSMS()
If Comport = "" Then MsgBox("Please Choose A connection") : Return
smsPort.PortName = Comport
smsPort.BaudRate = "115200"
smsPort.Parity = Parity.None
smsPort.DataBits = 8
smsPort.StopBits = StopBits.One
smsPort.Handshake = Handshake.RequestToSend
smsPort.DtrEnable = True
smsPort.RtsEnable = True
smsPort.NewLine = vbCrLf
If Not (smsPort.IsOpen = True) Then
smsPort.Open()
End If
At\_length = "17"
PDU\_code = "079144772800800011000C914477529628010000AA03E8721E"
'smsPort.WriteLine("AT" & vbCrLf)
'System.Threading.Thread.Sleep(2000) 'Pause to allow last command to get to phone
smsPort.WriteLine("AT+CMGF=0" & vbCrLf) 'open space for new message
System.Threading.Thread.Sleep(2000) 'Pause to allow last command to get to phone
smsPort.WriteLine("AT+CSMS=0" & vbCrLf) 'open space for new message
System.Threading.Thread.Sleep(2000) 'Pause to allow last command to get to phone
smsPort.WriteLine("AT+CMGS=" + At\_length + vbCrLf) '+ Chr(34) + At\_length + Chr(34) +
System.Threading.Thread.Sleep(2000) 'Pause to allow last command to get to phone
smsPort.WriteLine(PDU\_code + Chr(26)) 'number to send message to + vbCrLf +
System.Threading.Thread.Sleep(2000)
If smsPort.IsOpen = True Then
smsPort.Close()
End If
End Sub