View Single Post
Old 03-10-2012, 09:17 PM   #12
tuxor
Addict
tuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animalstuxor is kind to children and small, furry animals
 
Posts: 311
Karma: 6731
Join Date: Oct 2011
Location: Germany
Device: Onyx Boox M92, Icarus Illumina E653
Just to prove what I said, here is a small Python tool, that automates the zmodem way (unfortunately for Linux users only at the moment):
  • Download the attached usb_dev_mode.zip and unpack it to your M92's internal storage. Most credits for the contents of this file go to FDD!! See http://www.mobileread.com/forums/sho...89&postcount=5.
  • Make sure the commands "cu", "/usr/bin/rz" and "/usr/bin/sz" as well as Python are installed on your host OS.
  • Download and unpack the attached m92.py.zip.
  • Mark m92.py executable, e.g. chmod a+x m92.py
  • Execute "usb_dev_mode_start.oar" on your M92.
  • Connect your M92 via USB.
  • Try to run "/path/to/m92.py shell" and test the remote shell - you should close it by typing "~." ... For what happens on "exit" see below.
You can upload and download files by simply running "/path/to/m92.py push YOURFILE" or "/path/to/m92.py pull REMOTEFILE", where REMOTEFILE must be an absolute path on you M92 like "/media/flash/testfile" or "/media/sd/testfile". All files will be downloaded to the current working directory, files will be uploaded to your internal storage.

In order to use your M92 as USB mass storage after this procedure, you will have to close any running remote shell (with "exit" or type "/path/to/m92.py exit") and execute "usb_dev_mode_stop.oar" on your M92.

Troubleshooting
  • Whenever you execute "/path/to/m92.py" and there's no immediate output wait at least 10 seconds before killing it. In case your M92 doesn't react it will take my tool some seconds to notice that. If so, you perhaps have to execute "usb_dev_mode_start.oar" first.
  • Make sure that the serial console is created in /dev/ttyACM0 whenever M92 is connected in usb_dev_mode. If the serial console has a different name on your system (find out with "dmesg" output directly upon USB connection), you'll have to edit line 10 of m92.py accordingly.
  • You can upload multiple files simply by using "/path/to/m92.py push FILE1 FILE2 ...".
  • If you want to upload to a different directory than /media/flash you will have to edit line 11 in m92.py accordingly.

This is only a proof of concept. The whole thing may still have many bugs and it's not exactly comfortable. But it works for basic file transfers and it shows that with some effort, we could even write a tool (with gui if you want), that connects to your M92 and lets you browse through the M92's file system and change, upload and download files while you're still able to use your M92 for whatever purpose you like.
Attached Files
File Type: zip usb_dev_mode.zip (84.4 KB, 62 views)
File Type: zip m92.py.zip (1.3 KB, 59 views)

Last edited by tuxor; 03-10-2012 at 09:26 PM.
tuxor is offline   Reply With Quote