わいえむねっと

Contents
Categories
Calendar
2010/06
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Monthly Archives
~2000/01
Recent Entries
RSS1.0
Templates
Information
Processed: 0.050 sec
Chashed: -
2010/06/08 Tue
libpafeでRC-S330を叩いてみるテスト。


環境

マシンを用意するのが面倒だったので、仮想環境でお茶を濁す。

  • VMware Server 2.0.2 (VMware-server-2.0.2-203138.exe)
  • Ubuntu 8.04 (ubuntu-ja-8.04-vmware-i386.zip)


ログ

  • libusbは標準でインストールされている。libusb-devを追加インストール。
  • libpafeをconfigureしてmakeしてinstallして。
  • tests下もmakeされているので、felica_dumpを叩いてみる。
$ ./felica_dump 
error
  • error

  • とりあえずgdb。
$ gdb felica_dump 
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
"/home/foo/libpafe-0.0.7/tests/felica_dump": not in executable format: File format not recognized
(gdb) b mainr
No symbol table is loaded.  Use the "file" command.
(gdb) r
Starting program:  
No executable file specified.
Use the "file" or "exec-file" command.
  • not in executable format: File format not recognized

  • とりあえずlibtool。
$ libtool --mode=execute gdb felica_dump
./felica_dump: line 61: Xfelica_dump: command not found
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x8048d89: file felica_dump.c, line 176.
(gdb) r
Starting program: /home/foo/libpafe-0.0.7/tests/.libs/lt-felica_dump 

Breakpoint 1, main () at felica_dump.c:176
176   p = pasori_open();
  • pasori_open()のusb_set_configuration()でこけてた。権限の問題か。

  • とりあえずsudo。

わー。