Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

how to manage my at commands

$
0
0
hi i have this codes

With SerialPort1
                Try
                   
                    .Write("at" & vbCrLf)
                    Threading.Thread.Sleep(1000)
                    
                    .Write("AT+CMGF=1" & vbCrLf)
                    Threading.Thread.Sleep(1000)
                    
                    .Write("AT+CPMS=""SM""" & vbCrLf)
                    Threading.Thread.Sleep(1000)
                    
                    .ReadTimeout = 1000
                    .Write("AT+CMGL=""all""" & vbCrLf)
                    Threading.Thread.Sleep(1000)


i read at command output by this

SerialPort1.ReadExisting


heres the error. i can read messages but the problem is it doesnt read all message

but when set the interval of Threading.Thread.Sleep(10000) it reads all the messages

how can i manage the at commands so that it will stop reading messages when all are done?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>