èè ã¯ãæ°ããHandy Tech Active Star 40ç¹åãã£ã¹ãã¬ã€ã«Raspberry Pi ZeroãBluetoothã®ããã€ãã¹ã«ããã±ãŒãã«ãé 眮ããå èµUSBããŒããé»åãäŸçµŠããŸãã ãã®çµæãããŒããŒããšç¹åãã£ã¹ãã¬ã€ãåãããLinuxãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãæèŒããèªå·±å®çµåã®éã¢ãã¿ãŒARMã³ã³ãã¥ãŒã¿ãŒãå®æããŸããã USBçµç±ã§å é»/絊é»ã§ããŸãã é»åéè¡ãŸãã¯ãœãŒã©ãŒå é»åšããã ãããã£ãŠãæ°æéã§ã¯ãªãæ°æ¥éãäž»é»æºãçãããšãã§ããŸãã
ç¹åãã£ã¹ãã¬ã€ã®æ¬¡å ã®åºå¥
ãŸããæååã®é·ããç°ãªããŸãã 60以äžã®äœ¿ãæ £ããããã€ã¹ã¯ãã¹ã¯ãããã³ã³ãã¥ãŒã¿ãŒã§ã®äœæ¥ã«é©ããŠããŸããã40å°ã®ããã€ã¹ã¯ã©ãããããã§ã®æã¡éã³ã«äŸ¿å©ã§ãã çŸåšãã¹ããŒããã©ã³ãã¿ãã¬ããã«æ¥ç¶ãããŠããç¹åãã£ã¹ãã¬ã€ããããæååã®é·ãã¯14ãã18ã§ãã
éå»ã«ã¯ãç¹åãã£ã¹ãã¬ã€ã¯ããªã倧èŠæš¡ã§ããã ããšãã°ãããªãã¿ã®40ã€ã³ãã¯ã13ã€ã³ãã®ã©ãããããã®å¯žæ³ãšééã§ããã çŸåšãåãçšåºŠã®èŠªãã¿ã§ããã£ã¹ãã¬ã€äžã®ã©ãããããã§ã¯ãªããã©ãããããã®åã«ãã£ã¹ãã¬ã€ã眮ãã®ã«ååãªãããã¥ã¢ã§ãã
ãã¡ãããããã¯åªããŠããŸãããããã§ã2ã€ã®å¥ã ã®ããã€ã¹ãèã®äžã«çœ®ãã®ã¯ããŸã䟿å©ã§ã¯ãããŸããã ããŒãã«ã§ä»äºããããšããèŠæ ã¯ãããŸããããã©ãããããã¯å¥ã®æ¹æ³ã§ã©ããããããšåŒã°ãããã®ååãæ£åœåããããšããããšãèŠããŠãã䟡å€ããããŸãã
ã ããèè ã¯ãHandy Tech Starã·ãªãŒãºã§é·ãæåŸ ãããŠããæ°ããã¢ãã«ã®ãªãªãŒã¹ãåŸ ã£ãŠããŸããã 2002幎ã«ã以åã®Handy Tech Braille Star 40ã¢ãã«ããªãªãŒã¹ãããŸããããã®ã¢ãã«ã§ã¯ãããã£é åãã©ããããããäžã«çœ®ãã®ã«ååã§ãã åãŸããªãå Žåã¯ãæ ŒçŽåŒã¹ã¿ã³ããæäŸãããŸãã çŸåšããã®ã¢ãã«ã¯Active Star 40ã«çœ®ãæããããŠããŸãããã»ãšãã©åãã§ãããé»åæ©åšãã¢ããã°ã¬ãŒããããŠããŸãã
ãããŠåŒã蟌ã¿åŒã®ã¹ã¿ã³ãã¯æ®ã£ãïŒ
ããããç®æ°ããã®äžã§æã䟿å©ãªããšã¯ãã»ãŒã¹ããŒããã©ã³ã®ãµã€ãºã®ããŒã¿ã§ãïŒKDPVãåç §ïŒã ãã©ãããã©ãŒã ãæ»ããšéããŸãã ã¹ããŒããã©ã³ãããã«çœ®ããŠããã®ã¯äžäŸ¿ã§ããããšãããããŸããããã©ããããããã空ã®ã³ã³ããŒãã¡ã³ãã䜿çšããå¿ èŠããããŸãã
èè ãæåã«æãã€ããã®ã¯ãRaspberry Piãããã«çœ®ãããšã§ãããããã£ã¹ãã¬ã€ãè³Œå ¥ãããšããraspberryãã§ã¯ã³ã³ããŒãã¡ã³ãå ã§ã¹ã©ã€ãããªãã£ãã¹ã¿ã³ããã³ã³ããŒãã¡ã³ããéããããšãããããŸããã ããŠãããããŒãããã£ã3mmã ãèããã°...
ããããååãRaspberry Pi Zeroã®ãªãªãŒã¹ã«ã€ããŠè©±ããŸãããRaspberryPi Zeroã¯éåžžã«å°ããããã2ã€ãã³ã³ããŒãã¡ã³ãã«åãŸãå¯èœæ§ãããããããã3ã€ã«ããªããŸããã 64 GBã®ã¡ã¢ãªã«ãŒããBluetoothããã€ãã¹ã«ãMicro USBã±ãŒãã«ãšãšãã«ããã«æ³šæãããŸããã æ°æ¥åŸãããããã¹ãŠãå°çããç®ãèŠããå人ãèè ãå°å³ãæºåããã®ãå©ããŸããã ãã¹ãŠãããã«æ£åžžã«æ©èœããŸããã
ããã®ããã«äœãè¡ãããã
Handy Tech Active Star 40ã®èé¢ã«ã¯ãããŒããŒããªã©ã®ããã€ã¹çšã®2ã€ã®USBããŒãããããŸãã å°åã®ç£æ°æ¥ç¶ããŒããŒããå«ãŸããŠããŸãã ããŒããŒããæ¥ç¶ãããŠããããã£ã¹ãã¬ã€èªäœãBluetoothçµç±ã§æ©èœããŠããå Žåãã³ã³ãã¥ãŒã¿ãŒã¯BluetoothããŒããŒããšããŠãèªèããŸãã
ãããã£ãŠãã¹ããŒããã©ã³ã®ã³ã³ããŒãã¡ã³ãã«é 眮ãããRaspberry Pi Zeroã«Bluetoothããã€ãã¹ã«ããæ¥ç¶ãããšã BRLTTYã䜿çšããŠBluetoothçµç±ã§ç¹åãã£ã¹ãã¬ã€ãšéä¿¡ã§ããããŒããŒãããã£ã¹ãã¬ã€ã«æ¥ç¶ãããšãMalinkaããæ©èœãã圌女ãšã
ããããããã ãã§ã¯ãããŸããã Malinkaèªäœã¯ãããããµããŒãããããã€ã¹ããBluetooth PANçµç±ã§ã€ã³ã¿ãŒãããã«ã¢ã¯ã»ã¹ã§ããŸãã èè ã¯èªå® ãšè·å Žã§ããã«å¿ããŠã¹ããŒããã©ã³ãšã³ã³ãã¥ãŒã¿ãŒãã»ããã¢ããããŸããããå°æ¥çã«ã¯ãã1ã€ã®ãã©ãºããªãŒããã€ãŒãµããããšå¥ã®Bluetoothããã€ãã¹ã«ãã«æ¥ç¶ããããŒãã§ã¯ãªãã¯ã©ã·ãã¯ãªãã®ã«é©å¿ãããäºå®ã§ãã
BlueZ 5ããã³PAN
BlueZã䜿çšããŠPANãæ§æããæ¹æ³ã¯æããã§ã¯ãããŸããã§ããã èè ã¯pyhton-script bt-panïŒä»¥äžãåç §ïŒãèŠã€ããŸãããããã«ãããGUIãªãã§PANãæ§æã§ããŸãã
ããã«ããããµãŒããŒãšã¯ã©ã€ã¢ã³ãã®äž¡æ¹ãæ§æã§ããŸãã ã¯ã©ã€ã¢ã³ãã¢ãŒãã§äœæ¥ããŠãããšãã«é©åãªD-Busã³ãã³ããåä¿¡ãããšããµãŒããŒãžã®æ¥ç¶ã確ç«ããçŽåŸã«æ°ããbnep0ãããã¯ãŒã¯ããã€ã¹ãäœæããŸãã éåžžãDHCPã¯ããã®ã€ã³ã¿ãŒãã§ã€ã¹ã«IPã¢ãã¬ã¹ãå²ãåœãŠãããã«äœ¿çšãããŸãã ãµãŒããŒã¢ãŒãã§ã¯ãBlueZã«ã¯ãåã¯ã©ã€ã¢ã³ããæ¥ç¶ããããã«ã¹ã¬ãŒããè¿œå ã§ããããªããžããã€ã¹ã®ååãå¿ èŠã§ãã éåžžãããªããžããã€ã¹ã®ã¢ãã¬ã¹ãæ§æããããªããžã§DHCPãµãŒããŒãšIPãã¹ãã³ã°ãéå§ããã ãã§ååã§ãã
Systemdã䜿çšããBluetooth PANã¢ã¯ã»ã¹ãã€ã³ã
ããªããžãæ§æããããã«ãèè ã¯systemd-networkdãé©çšããŸããïŒ
ãã¡ã€ã«/etc/systemd/network/pan.netdev
[NetDev] Name=pan Kind=bridge ForwardDelaySec=0
ãã¡ã€ã«/etc/systemd/network/pan.network
[Match] Name=pan [Network] Address=0.0.0.0/24 DHCPServer=yes IPMasquerade=yes
次ã«ãBlueZã«NAPãããã¡ã€ã«ãæ§æãããå¿ èŠããããŸãã BlueZ 5.36ã®éåžžã®ãŠãŒãã£ãªãã£ã¯å®è¡ã§ããªãããšãå€æããŸããã äœæè ãééã£ãŠããå Žåã¯ä¿®æ£ããŠãã ããïŒmlangïŒè³ã®åããæ¹ãç¥ã£ãŠããŸãïŒç²ç®ïŒæã ã¢ã¯ã»ã¹ãšéåïŒã®é人
ãããã圌ã¯ããã°æçš¿ãšD-Busã«å¿ èŠãªåŒã³åºããè¡ãPythonã¹ã¯ãªãããèŠã€ããŸãã ã
䟿å®äžãäœæè ã¯SystemdãµãŒãã¹ã䜿çšããŠã¹ã¯ãªãããå®è¡ããäŸåé¢ä¿ã®è§£æ±ºã確èªããŸããã
ãã¡ã€ã«/etc/systemd/system/pan.service
[Unit] Description=Bluetooth Personal Area Network After=bluetooth.service systemd-networkd.service Requires=systemd-networkd.service PartOf=bluetooth.service [Service] Type=notify ExecStart=/usr/local/sbin/pan [Install] WantedBy=bluetooth.target
ãã¡ã€ã«/ usr / local / sbin / pan
#!/bin/sh # Ugly hack to work around #787480 iptables -F iptables -t nat -F iptables -t mangle -F iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE exec /usr/local/sbin/bt-pan --systemd --debug server pan
Debianã«IPMasquerade =ãµããŒããããå Žåã2çªç®ã®ãã¡ã€ã«ã¯å¿ èŠãããŸããïŒ ïŒ787480ãåç §ïŒã
systemctl daemon-reloadããã³systemctl restart systemd-networkdã³ãã³ããå®è¡ããåŸã systemctl start panã³ãã³ãã§Bluetooth PANãèµ·åã§ããŸã
Systemdã䜿çšããBluetooth PANã¯ã©ã€ã¢ã³ã
ã¯ã©ã€ã¢ã³ãåŽãSystemdã䜿çšããŠç°¡åã«æ§æã§ããŸãã
ãã¡ã€ã«/etc/systemd/network/pan-client.network
[Match] Name=bnep* [Network] DHCP=yes
ãã¡ã€ã«/etc/systemd/system/pan@.service
[Unit] Description=Bluetooth Personal Area Network client [Service] Type=notify ExecStart=/usr/local/sbin/bt-pan --debug --systemd client %I --wait
èšå®ãåèµ·åããåŸã次ã®ããã«æå®ãããBluetoothã¢ã¯ã»ã¹ãã€ã³ãã«æ¥ç¶ã§ããŸãã
systemctl start pan@00:11:22:33:44:55
ã³ãã³ãã©ã€ã³ã®ãã¢ãªã³ã°
ãã¡ããããµãŒããŒãšã¯ã©ã€ã¢ã³ãã¯ãBluetoothãä»ããŠãã¢ãªã³ã°ããåŸã«èšå®ããå¿ èŠããããŸãã ãµãŒããŒã§ãbluetoothctlãå®è¡ããã³ãã³ããäžããå¿ èŠããããŸãã
power on agent on default-agent scan on scan off pair XX:XX:XX:XX:XX:XX trust XX:XX:XX:XX:XX:XX
ã¹ãã£ã³ãéå§ããåŸãå¿ èŠãªããã€ã¹ããªã¹ãã«è¡šç€ºããããŸã§æ°ç§åŸ ã¡ãŸãã 圌ã®ã¢ãã¬ã¹ãæžãçããŠãpairã³ãã³ããããã³å¿ èŠã«å¿ããŠtrustã³ãã³ããçºè¡ããŠäœ¿çšããŸãã
ã¯ã©ã€ã¢ã³ãã¯åãããšãããå¿ èŠããããŸãããtrustã³ãã³ãã¯ç¢ºãã«å¿ èŠã§ã¯ãããŸããã ãµãŒããŒã¯ããŠãŒã¶ãŒãæåã§ç¢ºèªããããšãªããNAPãããã¡ã€ã«ã®æ¥ç¶ãåãå ¥ããå¿ èŠããããŸãã
èè ã¯ããããã³ãã³ãã®æé©ãªã·ãŒã±ã³ã¹ã§ãããã©ããã¯ããããŸããã ããããå¿ èŠãªã®ã¯ãã¯ã©ã€ã¢ã³ããšãµãŒããŒããã¢ãªã³ã°ãããµãŒããŒã§trustã³ãã³ããå®è¡ããããšã ãã§ããã圌ã¯ãŸã è©ŠããŠããŸããã
HID Bluetoothãããã¡ã€ã«ã䜿çšããæš©é
ãMalinkaãã¯ãæç·ã§ç¹åãã£ã¹ãã¬ã€ã«æ¥ç¶ãããããŒããŒããèªèããBluetoothãä»ããŠãã£ã¹ãã¬ã€èªäœã«ãã£ãŠãã§ã«è»¢éãããŠããå¿ èŠããããŸãã åãæ¹æ³ã§ã ãšãŒãžã§ã³ãã®ä»£ããã«ã®ã¿keyboardOnlyã³ãã³ããå®è¡ããå¿ èŠããããbluetoothctlã¯HIDãããã¡ã€ã«ãæã€ããã€ã¹ãæ€åºããŸãã
ãã ããã³ãã³ãã©ã€ã³ããBluetoothãæ§æããã®ã¯å°ãè€éã§ã
èè ã¯ãã¹ãŠãæ§æã§ããŸããããã³ãã³ãã©ã€ã³ããBlueZãæ§æããã®ã¯äžäŸ¿ã§ããããšãç解ããŠããŸãã æåã¯ããšãŒãžã§ã³ãã¯PINã³ãŒãã®å ¥åã«ã®ã¿å¿ èŠã§ãããšèããŠããŸããããããšãã°ãHIDãããã¡ã€ã«ãæå¹ã«ããã«ã¯ãagent KeyboardOnlyããšå ¥åããããšãå€æããŸããã é©ãã¹ãããšã«ãBluetooth PANãèµ·åããã«ã¯ãç®çã®ã¹ã¯ãªãããæ¢ããŠãªããžããªãç»ãå¿ èŠããããŸãã 圌ã¯ã以åã®ããŒãžã§ã³ã®BlueZã«ã¯ãã®ããã®æ¢è£œã®ãã³ãããŒã«ããã£ãããšãèŠããŠããŸã-BlueZ 5ã§ã¯ã©ãã§ãããããŸãããïŒ çªç¶ãæ°ãã解決çãç»å ŽããŸããããèè ã«ã¯ç¥ãããŠããŸããããè¡šé¢ã«æšªããã£ãŠããŸããïŒ
æ§èœ
ããŒã¿è»¢éé床ã¯çŽ120 kbpsã§ãããã§ååã§ãã 1 GHz ARMããã»ããµã¯ãã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ã€ã¹ãšããŠéåžžã«é«éã§ãã èè ã¯ãããã€ã¹äžã§äž»ã«sshãšemacsã䜿çšããäºå®ã§ãã
ã³ã³ãœãŒã«ãã©ã³ããšç»é¢è§£å床
Raspberry Pi Zeroã®ãã¬ãŒã ãããã¡ãŒã§äœ¿çšãããããã©ã«ãã®ç»é¢è§£å床ã¯ããªãå¥åŠã§ããfbsetã¯ã656x416ãã¯ã»ã«ã§ããããšãå ±åããŸãïŒãã¡ãããã¢ãã¿ãŒã¯æ¥ç¶ãããŠããŸããïŒã 8x16ã®ã³ã³ãœãŒã«ãã©ã³ãã§ã¯ã1è¡ããã82æåãš26è¡ãååŸãããŸããã
ãã®ã¢ãŒãã§40æåã®ç¹åãã£ã¹ãã¬ã€ã䜿çšããã®ã¯äžäŸ¿ã§ãã ãŸããèè ã¯ãUnicodeæåãç¹åã§è¡šç€ºããããšãæãã§ããŸãã 幞ããªããšã«ãLinuxã¯512æåããµããŒãããã»ãšãã©ã®ã³ã³ãœãŒã«ãã©ã³ãã«ã¯256æåããããŸããã³ã³ãœãŒã«ã»ããã¢ããã§ã¯ã2ã€ã®256æåãã©ã³ããäžç·ã«äœ¿çšã§ããŸãã äœæè ã¯ã次ã®è¡ã/ etc / default / console-setupãã¡ã€ã«ã«è¿œå ããŸããã
SCREEN_WIDTH=80 SCREEN_HEIGHT=25 FONT="Lat15-Terminus16.psf.gz brl-16x8.psf"
泚ïŒbrl-16x8.psfãã©ã³ãã䜿çšå¯èœã«ããã«ã¯ãconsole-brailleãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã
次ã¯ïŒ
ç¹åãã£ã¹ãã¬ã€ã«ã¯3.5 mmãžã£ãã¯ããããŸãããèè ã¯Mini-HDMIãããªãŒãã£ãªãåé€ããããã®ã¢ããã¿ãŒãèªèããŠããŸããã èè ã¯ããã©ãºããªãŒãã«çµã¿èŸŒãŸãããµãŠã³ãã«ãŒãã䜿çšã§ããŸããã§ããïŒå¥åŠãªããšã«ã翻蚳è ã¯Zeroã«ã¯äœããªããšç¢ºä¿¡ããŠããŸããããGPIOã«PWMãµãŠã³ããåºåããæ¹æ³ããããŸãïŒã 圌ã¯ãUSB-OTGããã䜿çšããŠå€éšã«ãŒããæ¥ç¶ããç¹åãã£ã¹ãã¬ã€ã«çµã¿èŸŒãŸããã¹ããŒã«ãŒã«é³å£°ãåºåããäºå®ã§ãã äœããã®çç±ã§ã2æã®å€éšã«ãŒããæ©èœããªãã£ããããå¥ã®ãããã»ããã§åæ§ã®ããã€ã¹ãæ¢ããŠããŸãã
ãã©ãºããªãŒããæåã§ãªãã«ããæ°ç§åŸ ã£ãŠããç¹åãã£ã¹ãã¬ã€ããªãã«ããã®ã¯äŸç¶ãšããŠäžäŸ¿ã§ãã ãããŠãã¹ãŠã¯ããããåæããããšãã³ã³ããŒãã¡ã³ãã®ã³ãã¯ã¿ããé»åãåãé€ãããã§ãã èè ã¯ã³ã³ããŒãã¡ã³ãã«å°ããªãããã¡ããããªãŒãå ¥ããGPIOãä»ããŠãã©ãºããªãŒãã«ãã£ã¹ãã¬ã€ããªãã«ããããšãéç¥ããäœæ¥ãéå§ããããšãèšç»ããŠããŸãã ãã®ãããªãããã¥ã¢UPSã
ã·ã¹ãã ã€ã¡ãŒãž
åãç¹åãã£ã¹ãã¬ã€ããããåãç¹åãã£ã¹ãã¬ã€ã䜿çšããå Žåãäœæè ã¯ã·ã¹ãã ã®æ¢è£œã®ã€ã¡ãŒãžïŒRaspbian Stretchã«åºã¥ãïŒãæäŸããæºåãã§ããŠããŸãã äžèšã®ã¢ãã¬ã¹ã§ããã«ã€ããŠåœŒã«æžããŠãã ããã å¿ èŠãªäººãããããããå Žåã¯ããã®ãããªå€æŽã«å¿ èŠãªãã¹ãŠãå«ãã»ãããäœæããããšãã§ããŸãã
è¬èŸ
ããã¹ããæ ¡æ£ããŠãããDave Mielkeã«æè¬ããŸãã
åçã€ã©ã¹ããæäŸããŠãããSimon Kainzã«æè¬ããŸãã
ã©ãºããªãŒãã€ã®äžçã«èè ãçŽ æ©ã玹ä»ããŠãããã°ã©ãŒãå·¥ç§å€§åŠã®ååã«æè¬ããŸãã
PSãã®ãããã¯ã«é¢ããèè ã®æåã®ãã€ãŒã ïŒå ¬éãããŠããŸãã-翻蚳è ïŒã¯ããã®èšäºã®ãªãªãžãã«ã®å ¬éã®5æ¥åã«è¡ãããŸãããé³ã®åé¡ãé€ããŠãã¿ã¹ã¯ã¯å®è³ªçã«è§£æ±ºããããšæšæž¬ã§ããŸãã ã¡ãªã¿ã«ãèè ã¯åœŒãäœæãããèªçµŠèªè¶³ã®ç¹åãã£ã¹ãã¬ã€ãããããã¹ãã®æçµçãç·šéããSSHçµç±ã§ããŒã ã³ã³ãã¥ãŒã¿ãŒã«æ¥ç¶ããŸããã