Giter Club home page Giter Club logo

Comments (3)

mchack-work avatar mchack-work commented on May 29, 2024 1

In https://github.com/tillitis/tillitis-key1-apps we decided to probe for firmware and have running apps checking framing protocol header for incoming commands to DST_FW and replying NOK. Not great, but at least a workaround for now.

Closing.

from tillitis-key1.

quite avatar quite commented on May 29, 2024

It would be interesting to know exactly what you send to the firmware which "bricks" it, making app-loading impossible. But I think I can see ways of this happening.

Our usual procedure in the host programs is that they either assume the TKey-app they want to talk to is running, and talk away. This is the simple case.

But tkey-ssh-agent is more clever, and tries to probe for firmware by doing GetNameVersion with a read timeout. If it gets a response, then firmware is running and it proceeds to load its signer-app. If it times out, then some app is assumed to be running, so it tries GetNameVersion towards the app (which signer-app implements) and if it the signer-app is indeed running, then go ahead and talk to it. If it times out, some other TKey-app is probably running and the TKey currently needs to be removed and plugged in again to put it back in firmware mode.

We're considering to add watchdog which can be used to allow firmware and app to reset themselves to a known state if it doesn't receive enough bytes for a cmd etc. This should be usable to avoid lock-ups. #72

from tillitis-key1.

quite avatar quite commented on May 29, 2024

Oh, and to specifically answer your question. No you cannot in the general case find out if an app is running, because the app can implement any protocol of choice. So you can try to talk to firmware with timeout, and this should fail if an app is running. But it would also fail if you're talking to the wrong serial port/tty. And the app could as well implement the firmware protocol, impersonating the firmware.

Protocol guidelines could be introduced, where TKey app developers agree to implement a certain command in the same way, or to ignore a certain firmware command.

from tillitis-key1.

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.