0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AX203 for FreeBSD 調査編

Last updated at Posted at 2020-01-22

Hardoffで128x128のチープなデジタルフォトフレームが110円であったので購入してみました。未開封品でしたがLiPoは使えなくなっていました。

写真(2020-01-22 10.43).jpg

いろいろ調べてみたところこのモジュールはAppoTechのAX203というチップを使っているようです。AX203のCPUは8051のようです。

AX203.png

同様のモジュールで使われるチップにはST2205というもあるようです。AX203の後継のAX206というチップもあるようです。

MENUボタンを押してUSB接続にすると、USBのインターフェースは、umassのCDとして認識されます。VIDが0x1908でPIDが0x1320です。

ugen0.2: <BUILDWIN Photo Frame> at usbus0
umass0 on uhub4
umass0: <DPF Mate> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:6:0: Attached to scbus6
cd0 at umass-sim0 bus 0 scbus6 target 0 lun 0
cd0: <buildwin Photo Frame 1.01> Removable CD-ROM SCSI-2 device
cd0: 1.000MB/s transfers
cd0: 0MB (1 0 byte sectors)
cd0: quirks=0x10<10_BYTE_ONLY>

Linux方面ではgphoto2やdpf-axなどでサポートがありました。

gphoto2はWindowsやMacのアプリケーションのように画像ファイルのコピーができるようです。実際のコードはlibgphoto2の中にあります。SCSIコマンドでオペレーションができてSCSI GENERIC(SG)というAPIを使ってlibgphoto2_port/usbscsi/linux.cでプログラムされているようです。FreeBSDのpkgのgphoto2では認識できませんでした。

dpf-axは8051のfirmwareを書き換えるプロジェクトでLCD4Linuxでディスプレイとして使えるようにしているようです。こちらはfirmwareを焼き変えるための処理はSCSIコマンドですが、焼き変えた後は専用のUSBインターフェースになるようです。

SGはFreeBSDでも用意されているので、おそらくポートは可能だと思います。

/usr/include/cam/scsi/scsi_sg.h

これを調べていてLCD4linuxを知ったのですが自分もいろいろLCDをいじっていますが、実装のアプローチが全く違っています。アプリケーションなので同じである必要もないと考えています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?