Giter Club home page Giter Club logo

iot-communication's Introduction

IOT-COMMUNICATION

Maven-v1.5.1 Language-java8 Idea-2022.02.03 CopyRight-Oscura License

English(英文) | Chinese(中文)

Overview

If this project helps you, please give the author a ⭐ .

Now, it is a tool for iot communication, used for the learning and development of protocols, it includes

  • Siemens S7 protocol, support PLC S1500, S1200, S400, S300, S200Smart, Siemens SINUMERIK 828D. S7Client DEMO.
  • Modbus protocol, support ModbusTcp, ModbusRtuOverTcp, ModbusAsciiOverTcp.
  • Mitsubishi Melsec(MC) Protocol, support PLC iQ-R series, Q/L series, QnA series, Only the L Series has been tested so far.
  • RTSP, RTCP, RTP, H264, MP4 (FMP4) protocol, RTSP + H264 + FMP4 + WebSocket + MSE + WEB. WEB Monitor DEMO.
  • Parse byte array data.

Getting Started

Add the dependency to pom.xml in the JAVA project.

<dependency>
    <groupId>com.github.xingshuangs</groupId>
    <artifactId>iot-communication</artifactId>
    <version>1.5.1</version>
</dependency>

Tutorial

Contact

If you have any questions, please contact the author in the following ways, and the author will give answers in his spare time.

License

Distributed under the MIT License. See LICENSE for more information.
@2019 - 2099 Oscura (xingshuang), All Rights Reserved.

❗❗❗ Please strictly abide by the MIT agreement and add the author's copyright license notice when using.

Disclaimer

The dependencies used in this project are as follows:

Number Scope Dependency Version License Date Copyright
1 provided lombok 1.18.26 MIT 2009-2021 Lombok Authors
2 test junit 4.13.2 EPL-1.0 2002-2021 junit
3 test slf4j-simple 2.0.6 MIT 2004-2023 QOS.ch
4 compile slf4j-api 2.0.6 MIT 2004-2023 QOS.ch

Sponsor

Buy me a cup of coffee.
WeChat (Please note your name)
wechat

iot-communication's People

Contributors

xingshuangs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iot-communication's Issues

S7-1200 进行OB1的 uploadFile总是提示失败

com.github.xingshuangs.iot.exceptions.S7CommException: 响应异常,错误类型:应用关系,错误原因:未在模块上实现此服务或报告了帧错误
PLC端肯定是有OB 程序的,这是啥原因呢

Exception message in English

Hi @xingshuangs and thanks for the awesome tool!

  1. Do you have any plans to migrate to English description of any exception message?
  2. Or do you consider contribution of such changes in the project?

S7读写1200时发现读写不一致的问题

我每次写完一组点位表立刻再读一遍,然后判断两边数据一致就认为写成功了,否则就报错
现在一个新项目里发现经常出现读到的值不是本次写入的值,我用wireshark抓包看到写入都是成功的,下一步该如何定位是plc程序的问题还是我这里的问题
这是抓的包
3.pcapng.zip
这是写入的值
image
这是读到的值与写入值不一致
image

Comminication over Modbus Gate

Hi. How i can communicate with my device over Modbus Gate? I defined unitId for ModbusTcp object when it was created buţ it can`t work. I resived same data for different unitId. My unitId for my devices for example 5,10,15. I defined unitId6 but i can get data!! Help please. Thanks.

关于s7文档内的最大读写字节

搜了一下 snap7的作者说有的 plc pdu size计算包括 TPTK(4) + COTP(3),保守一些..

https://sourceforge.net/p/snap7/discussion/bugfix/thread/bd855431/

根据测试S1200[CPU 1214C],单次读多字节
发送:最大字节读取长度是 216 = 240 - 24, 24(请求报文的PDU)=10(header)+14(parameter)
接收:最大字节读取长度是 222 = 240 - 18, 18(响应报文的PDU)=12(header)+2(parameter)+4(dataItem)

根据测试S1200[CPU 1214C],单次写多字节
发送:最大字节写入长度是 212 = 240 - 28, 28(请求报文的PDU)=10(header)+14(parameter)+4(dataItem)
接收:最大字节写入长度是 225 = 240 - 15, 15(响应报文的PDU)=12(header)+2(parameter)+1(dataItem)

S7-200-Smart 获取VD 和 VW块出现的问题

S7-200-Smart
com.github.xingshuangs.iot.protocol.s7.utils.AddressUtil#parseByteAddress(java.lang.String[])的sub截取一个字符串
如果的读取 VD 和 VW块,例如:VD1000时,会导致java.lang.NumberFormatException
1
2

MultiAddressWrite能否增加addString(String address, String data)

  1. MultiAddressWrite里只有addByte(String address, byte[] data)方法,如果只把字符串的字节数组传进去,这个方法里与writeString方法里关于byte[]的处理是有区别的,writeString多了这行代码
    requestItem.setByteAddress(requestItem.getByteAddress() + offset);
  2. writeString里默认字符串是gb2312,是s7不支持utf-8么?
  3. 用modbus如何跟s7一样批量读写?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.