SHA2017Badge/mpfshell

From Badge team
Revision as of 15:23, 15 January 2019 by AnneJan (talk | contribs) (Created page with "[https://github.com/wendlers/mpfshell install mpfshell] just run: <nowiki>git clone https://github.com/wendlers/mpfshell.git cd mpfshell sudo pip install pyserial sudo pip in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

install mpfshell just run:

git clone https://github.com/wendlers/mpfshell.git
cd mpfshell
sudo pip install pyserial
sudo pip install colorama
sudo pip install websocket_client
sudo python setup.py install

Usage:

usage: mpfshell [-h] [-c [COMMAND [COMMAND ...]]] [-s SCRIPT] [-n] [--nocolor]
                [--nocache] [--logfile LOGFILE] [--loglevel LOGLEVEL]
                [--reset]

optional arguments:
  -h, --help            show this help message and exit
  -c [COMMAND [COMMAND ...]], --command [COMMAND [COMMAND ...]]
                        execute given commands (separated by ;)
  -s SCRIPT, --script SCRIPT
                        execute commands from file
  -n, --noninteractive  non interactive mode (don't enter shell)
  --nocolor             disable color
  --nocache             disable cache
  --logfile LOGFILE     write log to file
  --loglevel LOGLEVEL   loglevel (CRITICAL, ERROR, WARNING, INFO, DEBUG)
  --reset               hard reset device via DTR (serial connection only)

More on mpfshell usage Open the shell from the folder where there are the file to upload

mpfs> open ttyUSB0 #Go to launcher on badge because in sleep not work
  repl  #enter the python shell
  import shell #import the shell library
  #exit from the shell python with ctrl+] and the badge will be blank
  cd /lib
  md ./your-folder
  mput .*\.py
 

Remove the cable, go to the launcher and you will see your-folder

Alternatives: ampy