Git Product home page Git Product logo

Comments (5)

martin-volf avatar martin-volf commented on July 23, 2024 1

development has already been merged to master, and master is actually a couple of commits ahead of that now and development should have been already deleted. So whatever works in development, should work in master too.

You may want to increase the debug level - it can be done by calling the static method Element.setDebugLevel(int) early on in your code, the level ranges from 0 for no debug info up to 4. (Yes, I know, we should have implemented standard logging mechanism long ago.)

from jnc.

martin-volf avatar martin-volf commented on July 23, 2024 1

At this point we have no clue as to where the issue is, or even if there is any, we need your help in reproducing it on our side. Are you able to get the traffic between the client and the device? The debug output with level at least 2 contains the traffic, or possibly the device logs that somewhere too.

The end of input means that the device closed the stream, you should be able to find a reason for that in device's logs too.

from jnc.

tomek-jaworski-elb avatar tomek-jaworski-elb commented on July 23, 2024

Thank you for your quick reply and debugging tip.
However, the device operation on the master branch still does not work, I receive information
end of input (-1)
and then
java.io.IOException: Session closed

Is there any solution for this issue?

from jnc.

tomek-jaworski-elb avatar tomek-jaworski-elb commented on July 23, 2024

I have no idea how to printout a receiving stream.
But I've found a place where is the issue. Incoming stream is filled by 0 and in this case method from line 134 returns -1.
Attaching some code from debug mode.

image

Edit: this part of code comes from branch development works for me, but there is a difference in master branch

from jnc.

martin-volf avatar martin-volf commented on July 23, 2024

Yes, when the other side (your device in this case) closes the stream, it manifests as that the read function returns -1. Normally, the device would not close the stream on its own, it is usually the client that sends close-session and then the streams are closed on both sides, that's why I think there should be something in the device's log that would indicate why the device decided to close the stream.

As for the stream contents - as I wrote, you can get that if you add a call like

Element.setDebugLevel(2);

somewhere early in your code, possibly even into the main() method. That would cause that the traffic (and other stuff) is logged on stdout.

By the way, there was a bug in logging introduced between development and master, we have just fixed; there is a very small chance that it fixes your problem too.

from jnc.

Related Issues (20)

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.