Comments (13)
Submitted pull request #122.
from node-modbus-serial.
Hi, I'm using a server to simulate a modbus component and ECONNRESET happen sometimes. I don't know why, if someone can help. Thanks
from node-modbus-serial.
@checor hi, thanks for the issue, I will look into it this weekend.
p.s.
Your snippet look ok, so it's probably something with the lib. You can run the programs ( simulator and reader ) with debug, maybe you will see something you do not see now:
export DEBUG=modbus-serial
node simulator.js
from node-modbus-serial.
@yaacov Thanks for the fast reply! I will run the snippet with debugging enabled.
If I find anything, I will post the results.
from node-modbus-serial.
Hello,
i'm using the Modbus Server to mock a controller where i should connect, and every time i restart the client (master) application the server crashes.
I think the server should handle the socket error event that happens when the client abruptly closes the connection. Alternative, an event might be exposed to be handled by user's code.
As a workaround i'm using:
process.on('uncaughtException', function (err) { console.error(err.stack); });
Anyway, @yaacov big thumbs up for the library!
from node-modbus-serial.
@uwburn Thanks
p.s.
If you can make a pull request with a fix, it will be very nice, I do not find the time to fix this ...
from node-modbus-serial.
from node-modbus-serial.
@yaacov: i will try to get a grasp on it.
from node-modbus-serial.
Will merge once tests are green.
from node-modbus-serial.
On windows the linter went crazy, so i just ignored it... my bad. I tested again on linux and fixed linter complaints.
The bad side is that on Linux i could not get the ECONNRESET error to trigger on the server.
I'm spawning a child process that opens the connection to the server and then killing it: on Windows when the process is killed the socket is closed abruptly and ECONNRESET is triggered, but on Linux it doesn't happen.
I think i cannot implement a test for this, is that ok?
from node-modbus-serial.
I think i cannot implement a test for this, is that ok?
yes, thanks for the work ! I will try to make the test work and merge it when I do, you can try too :-).
from node-modbus-serial.
Ok, i later on i will update the PR. I will leave the test case for ECONNRESET commented, so the test will not fail and you can see the idea behind it.
from node-modbus-serial.
fixed by #122
from node-modbus-serial.
Related Issues (20)
- Port Not Open HOT 2
- Error after updating to 8.0.15 HOT 3
- Usage of isDebugEnabled to check the PDU raw data HOT 3
- Modbus TCP Connection was closed after 100 Seconds of Inactivity HOT 1
- ServerTCP causes uncaught exception if listen fails
- Permission denied, cannot open /dev/ttyUSB0
- Open-close function HOT 11
- Combination of modbus requests in the same TCP Frame. HOT 13
- Destroy function callback never to be called HOT 4
- Modbus RTU - CRC delay HOT 5
- Strange interaction with PLC when writing strings HOT 2
- multiple modbusRTU open/close will end with "Error Resource temporarily unavailable Cannot lock port" HOT 5
- ServerTCP: readHoldingRegisters throws Modbus exception 4: Slave device failure HOT 5
- Error "Buffer is not defined" during start Angular application HOT 7
- Does We have any plan using Typescript to refactor this repo?
- I expect to be able to return a string in the getMultipleInputRegisters method. HOT 6
- closing modbus connection using close() and it will crashing my electron app HOT 1
- ServerTCP getMultipleHoldingRegisters and getMultipleInputRegisters don't work with Promises
- 请问对于float,short,word等不同类型数据该如何读取 HOT 1
- Modbus TCP connect Telnet CRC Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-modbus-serial.