The Android Modbus home page
The purpose of this program is to show the feasibility of a Modbus TCP HMI client application for the Android platform.
I tested the client program using a CoDeSys xv100 panelPLC (with Modbus TCP libraries) as a server.
I bridged the Ethernet to wireless using the 20€ Fonera access point.
I loaded the program in Google's Nexus One smartphone. .
The starting screenshot of the smartphone.
The starting screenshot of the panelPLC.
The application look when the operator writes the first word.
The result of writing the first word in the panelPLC.
The screenshot of the panelPLC when the operator changes the value of the second word.
The screenshot of the panelPLC when the operator has changed the value of the second word.
The screenshot of the smartphone shows that the second word has been changed.
The Ethernet transactions beforehand described:
No. Time Source Destination Protocol Info 1 0.000000 192.168.0.101 192.168.0.99 TCP 42267 > asa-appl-proto [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=536631 TSER=0 WS=1 2 0.000702 MicroInn_00:c7:99 Broadcast ARP Who has 192.168.0.101? Tell 192.168.0.99 3 2.951506 MicroInn_00:c7:99 Broadcast ARP Who has 192.168.0.101? Tell 192.168.0.99 4 2.954412 Htc_96:0a:68 MicroInn_00:c7:99 ARP 192.168.0.101 is at 00:23:76:96:0a:68 5 2.954984 192.168.0.99 192.168.0.101 TCP asa-appl-proto > 42267 [SYN, ACK] Seq=0 Ack=1 Win=33580 Len=0 MSS=1460 WS=0 TSV=0 TSER=0 6 2.962215 192.168.0.101 192.168.0.99 TCP 42267 > asa-appl-proto [ACK] Seq=1 Ack=1 Win=5840 Len=0 TSV=536927 TSER=0 7 2.982658 192.168.0.101 192.168.0.99 Modbus/TCP query [ 1 pkt(s)]: trans: 0; unit: 1, func: 3: Read multiple registers. 8 3.032716 192.168.0.99 192.168.0.101 Modbus/TCP response [ 1 pkt(s)]: trans: 0; unit: 1, func: 3: Read multiple registers. 9 3.035050 192.168.0.101 192.168.0.99 TCP 42267 > asa-appl-proto [ACK] Seq=13 Ack=14 Win=5840 Len=0 TSV=536935 TSER=57232 130 23.464980 192.168.0.101 192.168.0.99 Modbus/TCP query [ 1 pkt(s)]: trans: 0; unit: 1, func: 16: Write Multiple Registers. 131 23.514588 192.168.0.99 192.168.0.101 Modbus/TCP response [ 1 pkt(s)]: trans: 0; unit: 1, func: 16: Write Multiple Registers. 132 23.518533 192.168.0.101 192.168.0.99 TCP 42267 > asa-appl-proto [ACK] Seq=510 Ack=546 Win=5840 Len=0 TSV=538983 TSER=57437The Wireshark .pcap file of the transactions: android_modbus.pcap
A video of the operation using the Eclipse emulator.
Of course pages can be customized the way you prefer...
Here are some examples...
If you would like to contact me... maybe to commission me a development...
click on the following link to add me to your Skype contacts list (nickname:CoDeSys.CANopen).