Git Product home page Git Product logo

Comments (8)

olalonde avatar olalonde commented on August 20, 2024

Example logs when I start speculos:

 * Serving Flask app 'speculos.api.api' (lazy loading) 
app-boilerplate-speculos-1  |  * Environment: development
app-boilerplate-speculos-1  |  * Debug mode: offed                                                                        0.1s
app-boilerplate-speculos-1  | 13:26:43.009:werkzeug:  * Running on all addresses.
app-boilerplate-speculos-1  |    WARNING: This is a development server. Do not use it in a production deployment.
app-boilerplate-speculos-1  | 13:26:43.010:werkzeug:  * Running on http://172.19.0.2:5000/ (Press CTRL+C to quit)
app-boilerplate-speculos-1  | [*] speculos launcher revision:
app-boilerplate-speculos-1  | [*] using SDK version 2.0 on nanos
app-boilerplate-speculos-1  | [*] loading CXLIB from "/speculos/speculos/cxlib/nanos-cx-2.0.elf"
app-boilerplate-speculos-1  | [*] patching svc instruction at 0x125c74
app-boilerplate-speculos-1  | [*] patching svc instruction at 0x40001c54
app-boilerplate-speculos-1  | [*] patching svc instruction at 0x40002668
app-boilerplate-speculos-1  | 13:26:44.137:seproxyhal.ticker: skipping ticker events (expected within a debugger)

After I go to http://localhost:5000:

 * Serving Flask app 'speculos.api.api' (lazy loading)
app-boilerplate-speculos-1  |  * Environment: development
app-boilerplate-speculos-1  |  * Debug mode: offed                                                                        0.1s
app-boilerplate-speculos-1  | 13:26:43.009:werkzeug:  * Running on all addresses.
app-boilerplate-speculos-1  |    WARNING: This is a development server. Do not use it in a production deployment.
app-boilerplate-speculos-1  | 13:26:43.010:werkzeug:  * Running on http://172.19.0.2:5000/ (Press CTRL+C to quit)
app-boilerplate-speculos-1  | [*] speculos launcher revision:
app-boilerplate-speculos-1  | [*] using SDK version 2.0 on nanos
app-boilerplate-speculos-1  | [*] loading CXLIB from "/speculos/speculos/cxlib/nanos-cx-2.0.elf"
app-boilerplate-speculos-1  | [*] patching svc instruction at 0x125c74
app-boilerplate-speculos-1  | [*] patching svc instruction at 0x40001c54
app-boilerplate-speculos-1  | [*] patching svc instruction at 0x40002668
app-boilerplate-speculos-1  | 13:26:44.137:seproxyhal.ticker: skipping ticker events (expected within a debugger)
app-boilerplate-speculos-1  | 13:29:01.153:werkzeug: 172.19.0.1 - - [16/Jul/2022 13:29:01] "GET / HTTP/1.1" 304 -
app-boilerplate-speculos-1  | 13:29:01.237:werkzeug: 172.19.0.1 - - [16/Jul/2022 13:29:01] "GET /screenshot HTTP/1.1" 200 -
app-boilerplate-speculos-1  | 13:29:01.317:werkzeug: 172.19.0.1 - - [16/Jul/2022 13:29:01] "GET /screenshot?force=1657978141304 HTTP/1.1" 200 -
app-boilerplate-speculos-1  | 13:29:01.318:werkzeug: 172.19.0.1 - - [16/Jul/2022 13:29:01] "GET /events?stream=true HTTP/1.1" 200 -

from speculos.

olalonde avatar olalonde commented on August 20, 2024

Ohh it seems the web app just takes screenshots of a GUI running in the docker process? I tried --display qt but now getting :

 ModuleNotFoundError: No module named 'PyQt5'

from speculos.

olalonde avatar olalonde commented on August 20, 2024

I also tried with --text but no UI is displayed:

Screen Shot 2022-07-16 at 4 45 48 PM

from speculos.

olalonde avatar olalonde commented on August 20, 2024

I also tried running speculos in a x86 Ubuntu VM running in UTM. But getting different errors:

Screen Shot 2022-07-17 at 1 10 54 PM

from speculos.

olalonde avatar olalonde commented on August 20, 2024

I tried in an Linux ARM VM and now it is launching the emulator but it's just a black screen...

Screen Shot 2022-07-21 at 1 37 45 PM

from speculos.

greenknot avatar greenknot commented on August 20, 2024

Hello,

Can you reproduce the issue with one of the apps from the apps/ folder from this repository, for instance apps/btc.elf?

$ ls -l apps/btc.elf 
lrwxrwxrwx 1 user user 26 jan. 28 10:05 apps/btc.elf -> nanos#btc#2.1#1c8db8da.elf
$ ./speculos.py --model nanos --sdk 2.1 apps/btc.elf &

The screen should be displayed correctly in your web browser:

Screenshot

and even in your shell ;)

$ wget -q -O- http://127.0.0.1:5000/screenshot?force=1658736250975 | convert PNG:- JPG:- | jp2a -
                                                                                                                                                                                                                     
                                                                                                                                                                                                                     
                                                                                                                                                                                                                     
                                                                     .c;....;.   ...  ...                        ..                                                                                                  
                                                                     ;k;    ;;   .;..;oko;;.  .;;;;.   .;;;;.    ..   .;;;;;.                                                                                        
                                                                     ;ko;;;;;.   ;k;.;oko;;. .;;;;;. .;;;;;;;.   ;;   ;l;;;;;;.                                                                                      
                                  .;;;;;;.                           ;ko;;;;;.   ;k;  ;k;    ;;      ;k;    ;;   ;;   ;;    ;k;                                                                                      
                               .;;lkkkkkko;;.                        ;k;    ;;   ;k;  ;k;    ;;      ;k;    ;;   ;;   ;;    ;k;                                                                                      
                           ..;cccc;.;;.;cdkkdc;.                     ;kc....c;   ;k;  ;kc... .;..... .c;....;.   ;;   ;;    ;k;                                                                                      
       .;.                 ;kkko.   .;;. .okkkk;                     .;;;;;;;.   .;.  .;;;;.  .;;;;.   .;;;;.    ..   ..    .;.                                                                            .;.       
     .;;;.               .;lkkkk;   ;kk;  ;kkkkl;.                                                                                                                                                         .;;;.     
    .;;.                 ;kkkkOk;   .;;.  ;kkkkkk;                                                                                                                                                           .;;.    
  .;;.                   ;kkkkkk;   .;;.  .;okkkk;                                                                                                                                                             .;;.  
  ......                 .cdkkkk;   ;kkc..  ;kkdc.                                                                                                                                                           ......  
     .;;;.                 ;kkkl.   .;;.  .;okk;                     .;.                                                 .;.                                                                               .;;;.     
       .;.                 .;oko;;. .. .;;okkkl.                     .;.                                                 ;O;                                                                               .;.       
                             .;okko;oo;okkkkl;.                      .;.  .;;;;.        .;;;;.  .;;;;.  .;;;;;;.    .;;;;oO;.;.      .;.                                                                             
                               .;;okkkkkko;;.                        ;k;  ;ko;;.        ;l;;;..;;;;ok;  .;;;;ok;  .;;;;;;ok;.;;;.  .;;;.                                                                             
                                  ........                           ;k;  .c;...        ;;    ;kc..;c.  .c;..ck;  ;k;    ;k;  ;k;  ;k;                                                                               
                                                                     ;k;     .;;;.      ;;    ;k;       ;k;  ;k;  ;k;    ;k;  .;;;;;;.                                                                               
                                                                     ;k;  .;;;;;;.      ;;    .;;;;;;.  ;ko;;ok;  .;;;;;;ok;    ;kk;                                                                                 
                                                                     .;.  .;;;;.        ..      .;;;;.  .;;;;;;.    .;;;;;;.    ;o;.                                                                                 
                                                                                                                                ;;                                                                                   
                                                                                                                            ......                                                                                   
                                                                                                                                                                                                                     
                                                                                                                                                                                                                     
                                                                                                                                                                                                                     

from speculos.

olalonde avatar olalonde commented on August 20, 2024

It works with the apps/btc.elf.. I wonder why that is? Is it an issue with my compilation step?

from speculos.

greenknot avatar greenknot commented on August 20, 2024

Probably.

Since it isn't a speculos issue, please follow the developers documentation on the Developer Portal, or go on Discord to chat with developer support and the developer community.

from speculos.

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.