| | 342 | デバイスを再接続後、pythonでアクセスしてみる。 |
| | 343 | |
| | 344 | {{{ |
| | 345 | root@beaglebone:~# ipython --nosep |
| | 346 | |
| | 347 | In [1]: import hid |
| | 348 | In [2]: h = hid.device() |
| | 349 | In [3]: h.open(0x0403, 0x6030, "FT27KQDF") |
| | 350 | --------------------------------------------------------------------------- |
| | 351 | TypeError Traceback (most recent call last) |
| | 352 | <ipython-input-3-1e0fc914f0ab> in <module>() |
| | 353 | ----> 1 h.open(0x0403, 0x6030, "FT27KQDF") |
| | 354 | |
| | 355 | TypeError: Argument 'serial_number' has incorrect type (expected unicode, got str) |
| | 356 | |
| | 357 | In [4]: h.open(0x0403, 0x6030, u"FT27KQDF") |
| | 358 | }}} |
| | 359 | |
| | 360 | シリアル番号をunicodeで設定したら、オープンできたので、大丈夫そう。[[br]] |