atwolf359 Posted July 20, 2007 Posted July 20, 2007 I'm looking for way to detect a modem ring on a comm port I've been on the net so long, I remember when I could only e-mail myself!
martin Posted July 20, 2007 Posted July 20, 2007 I'm looking for way to detect a modem ring on a comm portI don't know how to detect the ring, but the way I think software normally deals with modems is to set the modem to auto answer mode, and then just detect some incomming data. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
ptrex Posted July 20, 2007 Posted July 20, 2007 @AllModems are controll by AT commands.This will get you all started :Modem AT Commandsregards,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
PsaltyDS Posted July 20, 2007 Posted July 20, 2007 @AllModems are controll by AT commands.This will get you all started :Modem AT Commandsregards,ptrexI think y'all are missing the point. RI (Ring Indicator) is a specific pin on an RS-232 (COM) port. Pin 22 on a DB25 connector, or pin 9 on a DB9. The equipment tied to the port and signaling on that pin might not be a modem at all.DaleHohm wrote a UDF: Phone Dialer (using COM to modem on serial port)I haven't looked but perhaps peeking at Dale's code will show you how to read individual signal states using a COM object to access the COM port. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
martin Posted July 20, 2007 Posted July 20, 2007 I think y'all are missing the point. RI (Ring Indicator) is a specific pin on an RS-232 (COM) port. Pin 22 on a DB25 connector, or pin 9 on a DB9. The equipment tied to the port and signaling on that pin might not be a modem at all.That's a little harsh. I said that I don't know how to detect RI and I mentioned AutoAnswer which I don't think is missing the point. In fact saying I don't know how to detect RI imeans I don't know how to detect it using AutoIt and API calls.@ atwolf359: If there is no connection to RI then you really have to use AutoAnswer. If you have the RI connection, which I would expect with the correct lead to a modem, then my COMMS udf could be extended fairly easily to give the status of the ring indicator. PM me if that would be useful, but look at the UDF first to see if would would do what you want otherwise. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
DaleHohm Posted July 20, 2007 Posted July 20, 2007 (edited) I haven't looked closely at martin's UDF so my comments should not be taken to imply anything about its abilities. With the COM methods however, you can use an event-driven model to detect port state, activity and data (i.e. it does not require a polling loop) so it can be quite efficient. When you use the DLL from Hard and Software, there is no special license required. Dale Edit: Typo Edited July 21, 2007 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
martin Posted July 20, 2007 Posted July 20, 2007 I haven't looked closely at martin's UDF so my comments should not be taken to imply anything about it's abilities.With the COM methods however, you can use an event-driven model to detect port state, activity and data (i.e. it does not require a polling loop) so it can be quite efficient. When you use the DLL from Hard and Software, there is no special license required.DaleEqually I know almost nothing about the COM method. If you can use an event to detect RI then that would be more efficient than what I was thinking of doing, and at the moment I don't intend to generate messages in my dll so it would require something like adlibenable with a function to keep checking the status.Can you give a link to the dll from Hard and Soft Dale? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
DaleHohm Posted July 21, 2007 Posted July 21, 2007 It is at www.hardandsoftware.net - the COM dialer post has more detail here: http://www.autoitscript.com/forum/index.ph...c=19769&hl=Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Confuzzled Posted July 21, 2007 Posted July 21, 2007 Two issues here.1: You have to read the data coming from the COM port. There are a number of threads on these forums already devoted to this subject.2: After you have mastered that, you need to monitor what is coming from the COM port. A standard AT command driven modem will transmit ASCII characters "RING" out of the COM port when it detects a ring signal if configured correctly. You should not have to monitor the RS232 RI pin to do that.________________It's all software...
martin Posted July 21, 2007 Posted July 21, 2007 A standard AT command driven modem will transmit ASCII characters "RING" out of the COM port when it detects a ring signal if configured correctly. You should not have to monitor the RS232 RI pin to do that.I didn't know that a modem sent "RING", but then I don't have a modem. I assume this happens when the modem is not set to auto answer. Does it send RING for every ring that would normally be heard, or is it just one RING for every attempted connection?To see this you don't need to 'master' reading data on the COM port btw; that was the whole point of Dale's thread on Com, and which he referred to, and mine. You can use hyperterminal to manually control a modem and receive or transmit files. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
atwolf359 Posted July 22, 2007 Author Posted July 22, 2007 Thanks everyone, You gave me some direction. I found "port.dll" ok , but the "commgAll.zip" would not open. Is there another link to this file I've been on the net so long, I remember when I could only e-mail myself!
martin Posted July 22, 2007 Posted July 22, 2007 (edited) Thanks everyone,You gave me some direction.I found "port.dll" ok , but the "commgAll.zip" would not open.Is there another link to this fileThe file commgAll.zip should be 219K. Try downloading it again or try this (link removed)If you still have a problem then PM me. Edited July 22, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
atwolf359 Posted July 22, 2007 Author Posted July 22, 2007 The file commgAll.zip should be 219K. Try downloading it again or try this this link.If you still have a problem then PM me.the new link worked, thanks.I'll post my results. I've been on the net so long, I remember when I could only e-mail myself!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now