NotePage, Inc. Forum Index

Monitoring AT+CSQ from Solarwinds

 
Post new topic   Reply to topic    NotePage, Inc. Forum Index -> PageGate Support
View previous topic :: View next topic  
Author Message
peterlyttle



Joined: 04 Apr 2012
Posts: 27
Location: UK

PostPosted: Tue Sep 13, 2016 5:24 am    Post subject: Monitoring AT+CSQ from Solarwinds Reply with quote

Hello,

If I have connector 1 connected to my modem I am unable to connect and run AT+CSQ to get the signal strength due to the com port being in use. Does PageGate poll this value periodically and if so is there anywhere that I can extract the value to report/alert on from within Solarwinds?

Thanks,
Peter


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Tue Sep 13, 2016 8:02 am    Post subject: Reply with quote

Peter,

Just to double check, do you have AT+CSQ specified in the "Init String" field in the settings of either Connector 1 or the cellular modem carrier?



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
peterlyttle



Joined: 04 Apr 2012
Posts: 27
Location: UK

PostPosted: Tue Sep 13, 2016 9:14 am    Post subject: Reply with quote

Yep, the init is set as AT+CSQ for the Carrier


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Tue Sep 13, 2016 9:18 am    Post subject: Reply with quote

PageGate will pass the init string any time it is capable of using the COM port. The trouble is that if, as you mentioned, the COM port is locked, the program doesn't have any way of passing the init string to query the signal strength because it can't communicate with the device.

So, you can monitor the pgdial1.log file located in the PageGate Logging directory for the CSQ responses to alert on a low signal strength value and you can also monitor that same log for "Warning - Unable to open COM port", just in case PageGate can't communicate with the device.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
peterlyttle



Joined: 04 Apr 2012
Posts: 27
Location: UK

PostPosted: Tue Sep 13, 2016 10:22 am    Post subject: Reply with quote

Ah ok cool thanks, just hoped there would be an easier way to do it -

First shot at the regex is (maybe useful for someone else) -

^(.*Received:<CR><LF>\+CSQ:.)(.*)(,)(.*)(<CR><LF><CR><LF>)(.*)(<CR><LF>)$


Back to top
View user's profile
peterlyttle



Joined: 04 Apr 2012
Posts: 27
Location: UK

PostPosted: Wed Sep 14, 2016 8:57 am    Post subject: Reply with quote

Just a quick question, as the log file will only have the AT+CSQ from the last message that was sent. Can I drop a .asc file for the GetAscii module to pick up that will force the AT+CSQ to be issued?


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Wed Sep 14, 2016 9:09 am    Post subject: Reply with quote

As you noted, the only way for PageGate to pass the init string is to have the program attempt to send a message. There isn't a way that I can think of that you can trigger PageGate to issue a single AT command unrelated to a larger messaging sequence.

So, the technical answer to your question of whether you can drop a file for GetAscii to force the AT+CSQ is yes, you can, but it's going to send a message and won't singly issue the AT+CSQ command.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
peterlyttle



Joined: 04 Apr 2012
Posts: 27
Location: UK

PostPosted: Thu Sep 15, 2016 3:23 am    Post subject: Reply with quote

Ah ok, can I raise that as a feature request? Some way initiating AT commands without needing to stop the Connector and connect with putty etc?


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Thu Sep 15, 2016 7:57 am    Post subject: Reply with quote

Certainly. I've be put it on our features request list.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
peterlyttle



Joined: 04 Apr 2012
Posts: 27
Location: UK

PostPosted: Thu Sep 15, 2016 10:01 am    Post subject: Reply with quote

Thats great thanks!


Back to top
View user's profile
OzCom



Joined: 22 Oct 2003
Posts: 1121
Location: US

PostPosted: Thu Sep 15, 2016 10:37 am    Post subject: Reply with quote

If you use the GSMReply feature - the connector will poll the modem every 60 seconds. As long as "AT+CSQ" is in the INIT string, it will log the signal strength



_________________
Aaron D. Osgood
Streamline Communications, LLC
* Authorized Notepage, Inc. Development Partner and Re-seller
TEL: 207-518-8455
AOsgood@streamline-solutions.net
Creators of AutoPage Spillman CAD interface for PageGate
Back to top
View user's profile Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
OzCom



Joined: 22 Oct 2003
Posts: 1121
Location: US

PostPosted: Thu Sep 15, 2016 10:38 am    Post subject: Reply with quote

If you use the GSMReply feature - the connector will poll the modem every 60 seconds. As long as "AT+CSQ" is in the INIT string, it will log the signal strength. This option also gives you the ability to REMOVE received messages so the modem does not suffer from memory overload and lockup due to too many unread messages



_________________
Aaron D. Osgood
Streamline Communications, LLC
* Authorized Notepage, Inc. Development Partner and Re-seller
TEL: 207-518-8455
AOsgood@streamline-solutions.net
Creators of AutoPage Spillman CAD interface for PageGate
Back to top
View user's profile Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
peterlyttle



Joined: 04 Apr 2012
Posts: 27
Location: UK

PostPosted: Fri Sep 16, 2016 6:55 am    Post subject: Reply with quote

OzCom wrote:
If you use the GSMReply feature - the connector will poll the modem every 60 seconds. As long as "AT+CSQ" is in the INIT string, it will log the signal strength. This option also gives you the ability to REMOVE received messages so the modem does not suffer from memory overload and lockup due to too many unread messages


Nice, i'll give this a shot and see how it goes! Thanks




Last edited by peterlyttle on Fri Sep 16, 2016 7:02 am; edited 1 time in total
Back to top
View user's profile
peterlyttle



Joined: 04 Apr 2012
Posts: 27
Location: UK

PostPosted: Fri Sep 16, 2016 7:02 am    Post subject: Reply with quote

This worked a treat!!

FYI here is my powershell monitor for SAM

Code:

$input_file = "E:\PageGateData\Logs\PGDial1.log"
$regex = "^(.*Received:.*\+CSQ:.)(.*)(,)(.*)(<CR><LF><CR><LF>)(.*)(<CR><LF>)$"
$output = select-string -Path $input_file -Pattern $regex -AllMatches | % { $_.Matches } | % { $_.Value } | Select -Last 1
$signal_strength = [regex]::Match($output,$regex).captures.groups[2].value
$bit_error_rate = [regex]::Match($output,$regex).captures.groups[4].value
$status = [regex]::Match($output,$regex).captures.groups[6].value
Switch ($signal_strength)
   {
   1{Write-Host "Message.Signal:Poor:"$signal_strength" (-112dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   2{Write-Host "Message.Signal:Marginal:"$signal_strength" (-109dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   3{Write-Host "Message.Signal:Marginal:"$signal_strength" (-107dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   4{Write-Host "Message.Signal:Marginal:"$signal_strength" (-105dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   5{Write-Host "Message.Signal:Marginal:"$signal_strength" (-103dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   6{Write-Host "Message.Signal:Marginal:"$signal_strength" (-101dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   7{Write-Host "Message.Signal:Marginal:"$signal_strength" (-99dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   8{Write-Host "Message.Signal:Marginal:"$signal_strength" (-97dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   9{Write-Host "Message.Signal:Marginal:"$signal_strength" (-95dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   10{Write-Host "Message.Signal:OK:"$signal_strength" (-93dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   11{Write-Host "Message.Signal:OK:"$signal_strength" (-91dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   12{Write-Host "Message.Signal:OK:"$signal_strength" (-89dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   13{Write-Host "Message.Signal:OK:"$signal_strength" (-87dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   14{Write-Host "Message.Signal:OK:"$signal_strength" (-85dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   15{Write-Host "Message.Signal:Good:"$signal_strength" (-83dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   16{Write-Host "Message.Signal:Good:"$signal_strength" (-81dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   17{Write-Host "Message.Signal:Good:"$signal_strength" (-79dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   18{Write-Host "Message.Signal:Good:"$signal_strength" (-77dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   19{Write-Host "Message.Signal:Good:"$signal_strength" (-75dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   20{Write-Host "Message.Signal:Excellent:"$signal_strength" (-73dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   21{Write-Host "Message.Signal:Excellent:"$signal_strength" (-71dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   22{Write-Host "Message.Signal:Excellent:"$signal_strength" (-69dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   23{Write-Host "Message.Signal:Excellent:"$signal_strength" (-67dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   24{Write-Host "Message.Signal:Excellent:"$signal_strength" (-65dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   25{Write-Host "Message.Signal:Excellent:"$signal_strength" (-63dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   26{Write-Host "Message.Signal:Excellent:"$signal_strength" (-61dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   27{Write-Host "Message.Signal:Excellent:"$signal_strength" (-59dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   28{Write-Host "Message.Signal:Excellent:"$signal_strength" (-57dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   29{Write-Host "Message.Signal:Excellent:"$signal_strength" (-55dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   30{Write-Host "Message.Signal:Excellent:"$signal_strength" (-53dB)"
   Write-Host "Statistic.Signal:"$signal_strength}
   99{Write-Host "Message.Signal:DOWN:"$signal_strength" (N/A)"
   Write-Host "Statistic.Signal:0"}
}
Write-Host "Message.BitRateError:Bit Error Rate:"$bit_error_rate
Write-Host "Statistic.BitRateError:"$bit_error_rate


Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    NotePage, Inc. Forum Index -> PageGate Support All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
Theme created by Vjacheslav Trushkin