Raspberry Pi使い始めでどう進めれば良いのかも分からない状態なので、調べ方や「自分ならこれを試してみる」といった情報でも頂けると嬉しいです。足りない情報がありましたら教えてください。
前提・実現したいこと
Raspberry piを買って、サーマルプリンタに繋ごうと試しているのですが、
lsusbコマンドでは認識されているのですが(Device 007)、ttyAMA0に印刷命令を出しても応答が無い状態です。
"This is a test"という文字列を印刷したいです。
Raspberry piとサーマルプリンタはUSBで接続しています。
発生している問題・エラーメッセージ
印刷命令を出しても応答が無い状態です。
該当のソースコード
CLI
1pi@raspberrypi:~ $ lsusb 2Bus 001 Device 007: ID 0416:5011 Winbond Electronics Corp. Virtual Com Port 3Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp. 4Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub 5Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub 6Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 7pi@raspberrypi:~ $ ls /dev 8autofs loop5 ram5 tty20 tty46 vc-mem 9block loop6 ram6 tty21 tty47 vchiq 10btrfs-control loop7 ram7 tty22 tty48 vcio 11bus mapper ram8 tty23 tty49 vcs 12cachefiles mem ram9 tty24 tty5 vcs1 13char memory_bandwidth random tty25 tty50 vcs2 14console mmcblk0 raw tty26 tty51 vcs3 15cpu_dma_latency mmcblk0p1 rfkill tty27 tty52 vcs4 16cuse mmcblk0p2 serial1 tty28 tty53 vcs5 17disk mqueue shm tty29 tty54 vcs6 18fb0 net snd tty3 tty55 vcs7 19fd network_latency stderr tty30 tty56 vcsa 20full network_throughput stdin tty31 tty57 vcsa1 21fuse null stdout tty32 tty58 vcsa2 22gpiochip0 ppp tty tty33 tty59 vcsa3 23gpiochip1 ptmx tty0 tty34 tty6 vcsa4 24gpiomem pts tty1 tty35 tty60 vcsa5 25hwrng ram0 tty10 tty36 tty61 vcsa6 26initctl ram1 tty11 tty37 tty62 vcsa7 27input ram10 tty12 tty38 tty63 vcsm 28kmsg ram11 tty13 tty39 tty7 vhci 29log ram12 tty14 tty4 tty8 watchdog 30loop-control ram13 tty15 tty40 tty9 watchdog0 31loop0 ram14 tty16 tty41 ttyAMA0 zero 32loop1 ram15 tty17 tty42 ttyprintk 33loop2 ram2 tty18 tty43 uhid 34loop3 ram3 tty19 tty44 uinput 35loop4 ram4 tty2 tty45 urandom 36pi@raspberrypi:~ $ lsusb -t 37/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M 38 |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M 39 |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M 40 |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=lan78xx, 480M 41 |__ Port 3: Dev 7, If 0, Class=Printer, Driver=, 12M 42pi@raspberrypi:~ $ sudo echo -e "This is a test" > /dev/ttyAMA0
試したこと
lsusb -tコマンドでDevice 007のdriverが表示されていないので、ドライバのインストールが必要なのかと思い、以下サイトからドライバーをダウンロードしてzip内のinstall58ファイルを実行しました。
ドライバダウンロードページ
するとusblpというドライバが表示されるようになりましたが、依然として印刷命令に対して反応がありません。
pi@raspberrypi:~ $ lsusb -t /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=lan78xx, 480M |__ Port 2: Dev 9, If 0, Class=Printer, Driver=usblp, 12M pi@raspberrypi:~ $ sudo echo -e "This is a test" > /dev/ttyAMA0
補足情報(FW/ツールのバージョンなど)
Raspberry Pi 3 Model B+
Symcode 58MM USB サーマルレシートプリンター ESC/POS
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。