.deb for Ubuntu or how to install m210 tools?

Asked by GT

First of all, i would like to thank Tuomas for his tool and the most recent update!

On the other hand, I have difficulties installing the m210 tools in Ubuntu 11.10. It is likely that I simply make some mistake. Is there a repository or .deb-file available for Ubuntu 11.10? Or is there some brief manual how I can install them using the tar.gz-files?

Thank you very much!

Question information

Language:
English Edit question
Status:
Solved
For:
m210 Edit question
Assignee:
a Edit question
Solved by:
a
Solved:
Last query:
Last reply:
Revision history for this message
a (tuomasjjrasanen) said :
#1

Hi

Unfortunately, there isn't a .deb for m210, yet. I'll try to find some time to package all the necessary software, probably during Christmas holdidays, so soon :-).

In the meantime, you can install it from the source tarball, just as you've tried:

When installing m210 "manually" from .tar.gz, one needs to satisfy all dependencies also manually. Currently m210 depends on libudev (should be included already in your Ubuntu 11.10), libudev-dev, python2.7 (should be included already in your Ubuntu 11.10) So, m210 should get installed properly with following four steps:

1. wget http://launchpad.net/m210/trunk/0.5/+download/m210-0.5.tar.gz
2. tar zxvf m210-0.5.tar.gz && cd m210-0.5
3. sudo apt-get install libudev-dev
4. python setup.py build && sudo python setup.py install --record=installedfiles

Thanks for testing and giving feedback!

Revision history for this message
GT (gleppert) said :
#2

Thank you for the installation details. Like you, I could only find time in the Christmas holidays to try it out and to give you feed back. Installation went fine following your steps. The dependencies should be also fulfilled. However, the m210 tool did not work as expected:

* After performing your steps, I first encountered following error when entering *m210 info* as normal user:

"Traceback (most recent call last):
  File "/usr/local/bin/m210", line 74, in <module>
    main()
  File "/usr/local/bin/m210", line 70, in main
    func(**func_args)
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 177, in info
    connection = Connection()
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 93, in __init__
    _libm210.m210_dev_connect(ctypes.pointer(self.__dev_p))
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 72, in _error_handler
    raise OSError(code, os.strerror(code))
OSError: [Errno 13] Permission denied
gerald@rumpelstielzche:~$ m210 delete
Traceback (most recent call last):
  File "/usr/local/bin/m210", line 74, in <module>
    main()
  File "/usr/local/bin/m210", line 70, in main
    func(**func_args)
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 244, in delete
    connection = Connection()
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 93, in __init__
    _libm210.m210_dev_connect(ctypes.pointer(self.__dev_p))
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 72, in _error_handler
    raise OSError(code, os.strerror(code))
OSError: [Errno 13] Permission denied"

*On the other hand, sudo m210 info worked and correctly printed out the pen info.

*m210 convert and sudo m210 convert (with only one sample drawing in the pen's memory) took forever and it did not work. I cancelled it from the keyboard. The error message was:

^CTraceback (most recent call last):
  File "/usr/local/bin/m210", line 74, in <module>
    main()
  File "/usr/local/bin/m210", line 70, in main
    func(**func_args)
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 235, in convert
    for n, pen_paths in enumerate(_iter_pen_paths(input_file), 1):
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 138, in _iter_pen_paths
    next_header_bytes = notes_file_read(3)
  File "/usr/local/lib/python2.7/dist-packages/m210/__init__.py", line 129, in __call__
    bytes = self.f.read(byte_count)
KeyboardInterrupt

* m210 delete did not work, but sudo m210 delete worked (after trying twice).
* m210 dump did not work, but sudo m210 dump worked (and printed the binary file to the stout).

All in all, unfortunately, I was not able to receive svg-files from the pen. What could be a solution?

Thanks!

Revision history for this message
GT (gleppert) said :
#3

Hi Tuomas,

I figured out that I made a mistake by not using both commands with a pipe in between. "m210 dump | m210 convert" works. However, again, only if I use "sudo m210 dump | m210 convert". As normal user, it does not work. Is there any way to get it working as normal user instead of obtaining root rights?

However, in the end, I am very happy, because now I can download SVGs from the pen. Thanks!

Revision history for this message
Best a (tuomasjjrasanen) said :
#4

Hi

Glad that you got it working. However, few notes:

It's probably better to save the binary stream of notes first to separate file (that ensures that you always have it saved even if you delete those from the device):

  m210 dump > stored_notes

Then, you have convert them to SVG files:

  m210 convert < stored_notes

The reason for sudo requirement in *your* case is that the the device files are readable/writable by root-user by default. You can however, change the default behavior to allow any user belonging to group 'plugdev' to read/write those files. plugdev is a default group for memory sticks etc. There is a proper udev-rules file inside the source distribution for that purpose. You just need to copy it manually to /etc/udev/rules.d. This is documented in README.

But, best things always come last:

I have now started to package and publish m210 in my ppa: https://launchpad.net/~tuomasjjrasanen/+archive/tjjr
As of writing this, m210 is already built for i386 (amd64 is still in build queue). First packages are for oneiric, but I'm pushing backports also for maveric and natty.

Thanks for your patience. =)

Revision history for this message
GT (gleppert) said :
#5

Hi Tuomas,

thanks a lot for your work and help!

Indeed, these commands did it for me:

sudo add-apt-repository ppa:tuomasjjrasanen/tjjr
sudo apt-get update
sudo apt-get install m210

I will try out your hints regarding the sudo requirement as soon as possible, too.

Thanks,
Aldi

Revision history for this message
GT (gleppert) said :
#6

Thanks Tuomas Jorma Juhani Räsänen, that solved my question.

Revision history for this message
a (tuomasjjrasanen) said :
#7

Actually, now that you have installed those packages, you don't have to care about sudo-issues anymore. m210 package takes care of installing proper udev rules file.

You only need to copy that udev file manually only when installing from the source package.

Revision history for this message
GT (gleppert) said :
#8

Thanks, even better :-)

Revision history for this message
a (tuomasjjrasanen) said :
#9

Yes. Just simple `sudo apt-get install m210` should be enough. =)

I'm glad that I finally found enough time to make that happen.

Revision history for this message
a (tuomasjjrasanen) said :
#10

Tuomas Jorma Juhani Räsänen suggests this article as an answer to your question:
FAQ #1851: “Is M210 packaged for Debian or Ubuntu?”.