Comments (3)
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.
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.
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)
- Add a Verilog formatter
- Make testbenches self testing, and with correct exit code
- Idea: ability (but not enforced) to clear (or R/W) CDI HOT 4
- Improve community information about the project HOT 1
- Increase clock frequency of application_fpga HOT 2
- Clean up UDI and UDS implementation as well as udi_uds_patch program
- Add support for client based device reset HOT 14
- support for OpenPGP? HOT 1
- Rewrite code to reduce resource allocation HOT 1
- Update core local Makefiles to use Verilog-2005 for sim, linting
- Hardware support to access flash from CPU
- Signal to firmware not to load app from flash HOT 2
- FW: Optionally start app from flash
- CH552 fw: Support for different USB classes: CDC and HID
- Support communication to different USB endpoints
- FIDO2 device app
- Change names of ADDR_RAM_ASLR and ADDR_RAM_SCRAMBLE HOT 1
- Device app to test hold touch HOT 1
- Remove possible redundant RAM clearing functionality HOT 1
- Remove possibly redundant randomized RAM scrambling during randomised RAM fill
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 tillitis-key1.