LedgerHQ / cargo-ledger

(Moved in the ledger device rust SDK --> https://github.com/LedgerHQ/ledger-device-rust-sdk). Load code on a Ledger device with a `cargo` subcommand
Apache License 2.0
15 stars 12 forks source link

Loading fails for nanox #28

Open polarker opened 1 year ago

polarker commented 1 year ago

I got Invalid status 6512 without "apiLevel": 1. Then got Invalid status 511f (Unknown reason) with "apiLevel": 1.

What could be the root cause of 511f?

Here is the Manifest:

{
  "binary": "nanox.hex",
  "apiLevel": "1",
  "dataSize": 0,
  "derivationPath": {
    "curves": [
      "secp256k1"
    ],
    "paths": [
      "m/44'/1234'"
    ]
  },
  "flags": "0x200",
  "icon": "alph_14x14.gif",
  "name": "Alephium",
  "targetId": "0x33000004",
  "version": "0.2.0"
}
polarker commented 1 year ago

@yhql Is the apiLevel supposed to be 1 for nanox?

yhql commented 1 year ago

Hi, sideloading apps is unfortunately not possible on Nano X. Recommended way of testing for now is using speculos

polarker commented 1 year ago

Hi, sideloading apps is unfortunately not possible on Nano X. Recommended way of testing for now is using speculos

It seems to work well with apiLevel = 5. What's the meaning of such api levels?

yhql commented 1 year ago

the api levels represent the OS's version, more or less. A change in api level means that some syscall changed in behaviour. Current api_level of Nano X is indeed 5, but now this value is injected by the SDK itself at compile time, you don't need to specify it in your app's Cargo.toml anymore