OpenModScan

Aus TippvomTibb
Zur Navigation springen Zur Suche springen

Allgemeines

OpenModScan ist auch so ein Tool, welches die Register eines MODBUS Clients scannt. So richtig funktioniert es bei mir aber nicht. Einmal kurz die falschen Einstellungen und schon feuert es gnadenlos auf den armen Client. Der Waveshare stuerzt dann irgendwann ab.

worker:/opt # mbpoll -v -m tcp -1 -a 1 -r 1 -t 3:hex -c 10 192.168.178.68
debug enabled
Set mode=tcp
iGetIntList(1)
Integer found: 1
iCount=1
iGetIntList(1)
Integer found: 1
iCount=1
Set function=3
Set format=hex
Set number of values=10
Set device=192.168.178.68
mbpoll 1.0-0 - ModBus(R) Master Simulator
Copyright (c) 2015-2023 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.

Connecting to [192.168.178.68]:502
Set response timeout to 1 sec, 0 us
Protocol configuration: ModBus TCP
Slave configuration...: address = [1]
                        start reference = 1, count = 10
Communication.........: 192.168.178.68, port 502, t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, input register table

-- Polling slave 1...
[00][01][00][00][00][06][01][04][00][00][00][0A]
Waiting for a confirmation...
<00><01><00><00><00><17><01><04><14><09><4B><00><00><09><44><00><00><09><42><00><00><10><1E><00><00><10><27><00><00>
[1]:    0x094B
[2]:    0x0000
[3]:    0x0944
[4]:    0x0000
[5]:    0x0942
[6]:    0x0000
[7]:    0x101E
[8]:    0x0000
[9]:    0x1027
[10]:   0x0000

worker:/opt # mbpoll -v -m tcp -1 -a 1 -r 1 -t 3:hex -c 10 192.168.178.68
debug enabled
Set mode=tcp
iGetIntList(1)
Integer found: 1
iCount=1
iGetIntList(1)
Integer found: 1
iCount=1
Set function=3
Set format=hex
Set number of values=10
Set device=192.168.178.68
mbpoll 1.0-0 - ModBus(R) Master Simulator
Copyright (c) 2015-2023 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.

Connecting to [192.168.178.68]:502
Set response timeout to 1 sec, 0 us
Protocol configuration: ModBus TCP
Slave configuration...: address = [1]
                        start reference = 1, count = 10
Communication.........: 192.168.178.68, port 502, t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, input register table

-- Polling slave 1...
[00][01][00][00][00][06][01][04][00][00][00][0A]
Waiting for a confirmation...
<00><1C><00><00><00><17><01><03><14><09><47><00><00><09><35><00><00><09><42><00><00><10><10><00><00><10><11><00><00>
Invalid transaction ID received 0x1C (not 0x1)
Read input register failed: Invalid data

Zwischen den beiden Abfragen lief ein OpenModScan. Erst nach einem Reset der RS485toETH ging mbpoll wieder.

Einen kleinen Vorteil hat der miszglueckte Einsatz von OpenModScan doch gehabt. Als mit VirCom einen Device Reset durchgefuehrt habe hat Wireshark die UPD Nachricht (170 Bytes) mitgeschnitten. Mal schauen ob das Device auch einen Reset durchfuehrt wenn das Paket klone.

0000   04 ee e8 1c 04 d4 08 00 27 9b 85 a9 08 00 45 00   ........'.....E.
0010   00 c6 00 f9 00 00 80 11 52 b5 c0 a8 b2 e3 c0 a8   ........R.......
0020   b2 44 04 13 04 44 00 b2 a3 7e 5a 4c 04 00 d0 f5   .D...D...~ZL....
0030   12 00 b0 f8 12 00 f4 f7 12 00 02 24 f7 77 10 55   ...........$.w.U
0040   f6 77 ff ff ff ff 0b 18 f4 77 14 ac bf 77 00 00   .w.......w...w..
0050   32 00 00 00 00 00 19 ac bf 77 60 f8 12 00 ff ff   2........w`.....
0060   ff ff 46 ac bf 77 6a 03 00 00 00 00 00 00 d8 f7   ..F..wj.........
0070   12 00 01 00 00 00 10 f9 12 00 b0 3e c0 77 48 20   ...........>.wH 
0080   be 77 ff ff ff ff 19 ac bf 77 2a ac bf 77 44 00   .w.......w*..wD.
0090   00 00 55 ac bf 77 44 00 00 00 00 00 00 00 44 38   ..U..wD.......D8
00a0   d3 73 44 00 00 00 60 f8 12 00 44 b2 a8 c0 98 50   .sD...`...D....P
00b0   32 00 98 50 32 00 3e e7 42 00 44 00 00 00 02 6f   2..P2.>.B.D....o
00c0   32 00 02 6f 32 00 1c f9 12 00 b0 98 40 00 41 99   2..o2.......@.A.
00d0   40 00 98 50                                       @..P

Das Paket kam auch noch irgendwie dazwischen.

0000   08 00 27 9b 85 a9 04 ee e8 1c 04 d4 08 00 45 00   ..'...........E.
0010   00 c6 02 23 00 00 40 11 91 8b c0 a8 b2 44 c0 a8   ...#..@......D..
0020   b2 e3 04 44 04 11 00 b2 db b7 5a 4c 01 c0 a8 b2   ...D......ZL....
0030   44 ff ff ff 00 c0 a8 b2 01 c0 a8 b2 0a 01 f6 10   D...............
0040   64 00 38 38 38 38 38 38 38 38 38 38 28 6f 0a 0c   d.8888888888(o..
0050   04 c8 04 57 53 44 45 56 30 30 30 31 00 00 03 05   ...WSDEV0001....
0060   14 00 00 ff 02 00 00 01 00 01 00 08 08 04 04 31   ...............1
0070   39 32 2e 31 36 38 2e 31 37 38 2e 31 30 00 00 00   92.168.178.10...
0080   00 00 00 00 00 00 00 00 00 00 00 00 00 0c 3c 00   ..............<.
0090   50 00 01 00 67 be e6 5a 4c 01 00 00 05 06 fa 00   P...g..ZL.......
00a0   09 04 00 00 0e 28 0a 04 00 00 15 c7 00 00 00 00   .....(..........
00b0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00c0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00d0   00 00 00 00                                       ....