microera Posted March 30, 2012 Share Posted March 30, 2012 Is any solution to sniff serial communication on PC (windows XP or Win7) between PC and attached device? Like do portmon.exe from sysinternals.... I need to catch traffic between two devices (multimeter and PC) and write to PC or send data over internet... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 30, 2012 Moderators Share Posted March 30, 2012 microera, Take a look at martin's Serial port UDF - might be useful. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jchd Posted March 30, 2012 Share Posted March 30, 2012 Due to delays in processing interception with AutoIt code, the best bet if you work at high Baud rate is to use stock multiport board and route signals (Y connection) to one or two new ports. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
microera Posted March 31, 2012 Author Share Posted March 31, 2012 (edited) @MelbaI know about this UDF but this is direct connecting to device (in this example multimeter)!I need to sniff in paralel betwen device and PC SW.....like this sw:http://technet.microsoft.com/en-us/sysinternals/bb896644@jchdYou mean hardware multi port? No, no,.... At this example are baudrate slow ... I think bellow 115kbaud!And I know that exist sw wich can sniff in background and visualise data wich are recived/transmitted between "external device" and PC!But is possible make this job with autoit? I think YES because autoit is VERY GOOD tool! But I dont know how! Edited March 31, 2012 by microera Link to comment Share on other sites More sharing options...
jchd Posted March 31, 2012 Share Posted March 31, 2012 (edited) I do know there are such programs, but the thing is that first AutoIt is by itself too high-level to intercept serial I/O without disturbing the running program and _could_ be too slow for the actual situation.If you want to intercept serial activity reliably, you have to monitor timewise signals and data I/O. That's normally the job of a driver, which precludes simultaneous multiple use of a given port. I don't say it can't be done at all, I simply don't expect it can be done reliably by using AutoIt only. Should you have a fast DLL (typically in C) with monitoring support built-in, then yes it would probably be possible. I'm not aware of any such DLL (but it may exists somewhere).Look at the portmon page and read "How it Works: WinNT" section. Now while this works with a fast dev language, it's very unclear that AutoIt will be fast enough to keep up with the use pace. We aren't simply getting messages from some kind of GUI here, we work with real-time external events.Another way is to use some (free or payware) serial monitor and grab its output from AutoIt.All in all, given that finding a working solution may be time consuming, that's why I suggested you use simple Y cable to route I/O signals and Tx/Rx to two separate serial ports, which you then can monitor easily using Martin's serial UDF and accompanying DLL. Given that if you don't have extra ports free on your PC, you can still use another PC or use a multi-I/O board at 10 € street price.Yet another way, depending on the actual nature of the reason for monitoring. Obtain the docs of the remote instrument and work from there might be enough for your purpose. Edited March 31, 2012 by jchd This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
martin Posted April 1, 2012 Share Posted April 1, 2012 Is any solution to sniff serial communication on PC (windows XP or Win7) between PC and attached device?Like do portmon.exe from sysinternals....I need to catch traffic between two devices (multimeter and PC) and write to PC or send data over internet...I think com0com can do what you want. My udf cannot. 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. Link to comment Share on other sites More sharing options...
NiVZ Posted April 2, 2012 Share Posted April 2, 2012 (edited) I had a lot of luck with this free program for Serial port sniffing:http://www.serial-port-monitor.com/Using this I managed to get the comms between the PC and my diabetes glucose meter and managed to make an autoit script that could communicate with the glucose meter. Also, I didn't use the UDF, but used the code from this thread:NiVZ Edited April 2, 2012 by NiVZ Link to comment Share on other sites More sharing options...
AlexGreen Posted July 8, 2016 Share Posted July 8, 2016 (edited) You can catch traffic between two devices with <snip>. This software serves as a gatekeeper on the flow of data via RS232/422/485 serial ports during applications or driver development, testing, debugging and optimization of serial devices, and so on. Moreover, the monitored data can be redirected to a specified file or copied to a clipboard. Serial Port Monitor can intercept, and record all serial input/output control codes (IOCTLs) parameters with full detail. Each monitoring session can be saved and used whenever necessary. So, It can be very useful) Edited July 8, 2016 by Melba23 Removed link Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 8, 2016 Moderators Share Posted July 8, 2016 AlexGreen, We do not permit adverts for payware. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
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