ããã¯ç§ã®äººçã§æãé·æã¡ããå·¥èžåã§ããã¢ã€ãã¢ããå®æãŸã§12幎ãããã䜿ããããã«ãªããŸããïŒãã®éã移äœãåºçãæ»äº¡ãªã©ãèšå€§ãªæ°ã®åºæ¥äºãèµ·ãããŸãããããã®èãã¯ç§ã«ãããäœããã£ãŠãç§ã¯ãããå®äºããŸããããããŠããã®å·¥èžåã«äŒŽãéããšããé¡æããããŠãã®çµæãšããŠäœãèµ·ãã£ãã®ããã話ãããããšæããŸãã
èã
ãã®ãããžã§ã¯ã ã§ã¯ããã£ãšåã«ã«ãŒã¿ãŒãããŒã¹ã«ããWi-Fiã©ãžãªã®ã¢ã€ãã¢ãã®ãã®ãèŠãŸãããã©ã¡ãããšããã°-ããã¯2009幎ã§ããããã¯ã«ãŒã¿ãŒããŒã¹ã®ã©ãžãªãLinuxãmpdããŒã¢ã³ã§ãããããã§ããããã¯ç§ã«ãšã£ãŠå®å šã«æ確ãªçšèªã§ã¯ãããŸããã§ããããããç§ã¯æ¬åœã«ãã®ãããªã©ãžãªã欲ããã£ãã§ãããããŠãç§ã¯ãã®ã¢ã€ãã¢ãæãã€ãããããã«ãç§ã¯ããããã©ã³ãæè¡ã«éåžžã«è§ŠçºãããŸããïŒå¢å¹ ã©ã³ããã€ã³ãžã±ãŒã¿ãŒã©ã³ãïŒç§ã®ãããã£ãŒã«åçã«ãã6E1PïŒãCRTã¹ã¯ãªãŒã³ããããŠãVFDãã£ã¹ãã¬ã€ïŒVFD-ç空èå ãã£ã¹ãã¬ã€ãŸãã¯ãã·ã¢èªã®ç空çºå ã€ã³ãžã±ãŒã¿ãŒïŒVLIïŒããŸãã¯é°æ¥µçºå ã€ã³ãžã±ãŒã¿ãŒïŒCLIïŒãéåžžã«æ¥œãã
ã®ã§ããã£ãã·ã¥ãã£ã¹ãã¬ã€ã䜿çšããããšã«ããŸãããããããç§ã¯ãããäœãšåŒã°ããã®ãããç¥ããŸããã§ãããã€ã€ãŒãã£ã¹ãã¬ã€ã
ã€ãŸããè³Œå ¥è ã®ãã£ã¹ãã¬ã€ãã·ã³ã°ã«ããŒãã®ã³ã³ãã¥ãŒã¿ãŒãŸãã¯ã«ãŒã¿ãŒãLinux + mpdãç空èå ã€ã³ãžã±ãŒã¿ãŒãããã³ãã®ãããªãã®ã®ããã®ããçš®ã®ã³ã³ãããŒã«ã§ããç§ã«ã€ã³ã¹ãã¬ãŒã·ã§ã³ãäžãããããžã§ã¯ãã«äŒŒãŠããŸãã
Wi-Fiã©ãžãªã«ã¯ããŸããŸãªãªãã·ã§ã³ãããããããã®ã¯ã©ããã«éåžžã«é ããããšãç解ããŠããŸããããããããã§ãæŠå¿µçã«ã¯ä»æ¥ã§ãä»ã®éšåãšã¯ç°ãªãããã®ãããªããã€ã¹ã®äœæã«ã€ããŠèªãããšã¯èå³æ·±ããšæããŸããããã«ãç§ã¯ãããéã®ããã«ããã®ã§ãã£ãŠã売ãç©ã§ã¯ãããŸããã§ããã
åºæ¬çãªã³ã³ã»ãããšãã¶ã€ã³
åœæïŒ2010幎é ïŒã®ãã®ã©ãžãªã«ã¯ãå¥ã®ãããžã§ã¯ãç®æšããããŸãããåœæãç§ã¯ã»ã«ãã¢èªãå匷ããŠããŠããã¹ã€ãããå ¥ãããããšã§ã»ã«ãã¢ã®ã©ãžãªå±ãåä¿¡ã§ããã·ã³ãã«ãªããã€ã¹ã欲ããã£ãã®ã§ããé»è©±ãã³ã³ãã¥ãŒã¿ãŒã¯ãããèªäœãç§ã倧ãã«æ··ä¹±ãããã®ã§ãéžæè¢ã§ã¯ãããŸããã§ããããããéããšãäœãããŠããããå¿ããŠããŸããŸãã第äºã«ãç§ã¯æ¬åœã«æ®éã®èº«è¿ãªã©ãžãªãšã§ããã ãåãããã«éçãæ®ãã幎é ã®äººã§ãããã䜿çšã§ããããã«ãããã£ãã®ã§ãããããŠæåŸã«ãç§ã¯ã³ã³ãããŒã«ãæå°éã«æããããšæããŸããã1ã€ã®ãã¿ã³ã§ãã
ç§ã¯ã20äžçŽã®30ã40幎代ã®å»ºç¯ãã€ã³ããªã¢ãç¹ã«ç¡ç·åä¿¡æ©ã®èšèšã«ãããèšèšãœãªã¥ãŒã·ã§ã³ã«éåžžã«åºæ¿ãåããŸããããã®ã¹ã¿ã€ã«ã¯ã¢ãŒã«ãã³ãšåŒã°ããŸããç§ãã¡ã®åœã§ã¯ããã®ã¹ã¿ã€ã«ã®æãã代衚ã¯ãã¬ãŒãã³å³æžé€šããšã¢ãããŒãå°äžéé§ ããã€ã³ãã¹ã«ã€ãã¯ã©ã¹ãã»ã«ã¹ã«ã€ã®å»ºç©ã§ãïŒããæ£ç¢ºã«ã¯ãããã¯ãã®ã¹ã¿ã€ã«ã®åœ±é¿ãåããŠããŸãïŒãã¬ã·ãŒããŒïŒã¢ãŒããã¯ãã£ãŒãããã§ã«åãåã£ããã¶ã€ã³ïŒã«ã€ããŠè©±ãå Žåãæãèå³æ·±ããªãã·ã§ã³ã¯ãã¹ã±ãŒã«ãäžçªäžã«ãããã®ã§ããã
匷ãã€ã³ã¹ãã¬ãŒã·ã§ã³ãåŸãèšèšäžã®æ±ºå®
ãã¡ãããåœåããã®ã©ãžãªã®æ¬äœã¯ãäžéšã®åä¿¡æ©ã®ããã«ã貎éãªæšæã§äœãããããã«èšç»ãããŠããŸããããããŠãããããã¬ã§äžåºŠã§ããåæ§ã®ãããžã§ã¯ããè¡ã£ãŠãããã¶ã€ããŒã«äŒããŸããïŒã©ããèŠããŠããŸãããããããªããïŒãã¹ã±ããããããããããžã§ã¯ãã®ããšãèãããããŸããããããã§ããããŠãããªçé¢ç®ãªéãæ©ãã€ããã¯ãããŸããã§ããããç¡é§ã§ããâŠäžè¬çã«ããããããªäžæè°ãªå€¢ã欲æããããŸãããããããããã¯ãã¹ãŠæ®é ·ãªçŸå®ã«åž°çããŸããã
å®è£ ã®æåã®ã¹ããã
ãã¹ãŠã®Wi-Fiã©ãžãªã®åºæ¬ã¯ãè³Œå ¥è ã®ãã£ã¹ãã¬ã€ã§ããç§ã¯éåžžã«é·ãéãã£ã¹ãã¬ã€ãéžæããæãã«è²·ãç©ã«è¡ããèªåãäžçªå¥œããªãã®ã«èŠããŸãããç§ã®ãæ°ã«å ¥ãã®ãã£ã¹ãã¬ã€ã¯PosiflexPD-2700ã§ããç§ã¯ããã«ç«ã¡å¯ã£ãã
åããŠé»æºãå ¥ããŠãç»é¢ã«ç»åã
衚瀺ããŸãããããã®ãã£ã¹ãã¬ã€ã®æäœã«é¢ããå¥ã®èšäºãæžããŸãããããã§èªãããšãã§ããŸãããããã£ãŠãç§ã¯åœŒãã®ä»äºã®ååã«ã€ããŠã¯è©³ãã説æããŸããã
ãã®ã©ãžãªã®ãé è³ããšããŠãTP-Link 3020ã«ãŒã¿ãŒãNokia N800ïŒã¯ããé©ããªãã§ãã ãããN800ïŒãããŸããŸãªã©ããããããããããçš®é¡ã®ç£æ¥çšã³ã³ãã¥ãŒã¿ãŒããã£ãã·ã¥ã¬ãžã¹ã¿ãŒãããŸããŸãªäžä»£ã®Raspberry Piãã·ã³ã°ã«ããŒãããã€ã¹ãªã©ãè©ŠãããŸããããã¹ãŠãäžããã決å®ã®æ®éæ§ã«ã€ããŠèªã£ãŠããŸãããããŠå°æ¥ãèŠæ®ããŠãããã€ãã®æ±ºå®ã¯æºåž¯æ§ã®ããã«è¡ããã建èšè²»ãåæžããããã§ã¯ãããŸããã
ããããäžè¬çã«ãç§ã¯ããããã¹ãŠã®ãœãªã¥ãŒã·ã§ã³ã奜ãã§ã¯ãªãã£ããããã®ãããªã¿ã¹ã¯ã®æ©èœã®ç¹ã§éå°ã§ãã£ãããéã«ãããã©ãŒãã³ã¹ãäœãããŠãµãŠã³ãåçã«åé¡ããããŸããïŒã«ãŒã¿ãŒãªã©ïŒã次ã«ããããžã§ã¯ãã®å®æœã«ãããŠç§ããã©ã£ãäž»ãªéçãã話ããŸããNokia N800ã®ãããªè¡ãæ¢ãŸãã®ãã©ã³ãã¯ãããŸããïŒãã®ã¢ãããŒãã®ãã¹ãŠã®ããã³ã¹ã®ããã«ïŒã
äœæ¥ãããã¿ã€ã
èªåŸåã§ãã©ãžãªãåçãããããã³ã«ç«ã£ãŠããæåã®å®çšçãªãããã¿ã€ãã¯ãTP-Link3020ã«ãŒã¿ãŒãš100ã«ãŒãã«çšã®äžåœã®USBãµãŠã³ãã«ãŒãã«åºã¥ããŠå®è£ ããŸããããã®ã«ãŒã¿ãŒã¯ãã®ãããªå·¥èžåã«ãšã£ãŠçŽ æŽããããã®ã§ãããã®äž»ãªå©ç¹ã¯ãä»ã®ã·ã³ã°ã«ããŒããšã¯ç°ãªããæå¯ãã®ã³ã³ãã¥ãŒã¿ãŒã¹ãã¢ã§è³Œå ¥ã§ããããšã§ããã¡ã€ã³OSã¯OpenWRTã§ããµãŠã³ãã¯USBãæèŒãã500ã«ãŒãã«ä»¥äžã®ã»ãšãã©ã®ãã·ã¥ãã³ã¹ããŒã«ãŒã§åçãããŸãããäžè¬çã«ããã¹ãŠãäžçªäžã«ãããŸãããããŠãããããŸããããŸããïŒèŠããã«ãååèªããããäžåºŠèŠãæ¹ãè¯ãã®ã§ãã
ãã®åŸãã¿ãã¬ãããããããªãå¶åŸ¡ããæ¹æ³ã¯ãªãã·ã§ã³ã§ã¯ãªãããšãæããã«ãªããŸãããåãã¿ãã¬ããã䜿çšã§ãããšãã©ãžãªã®æå³ã倱ãããŸãããã®ããããšã³ã³ãŒããŒã䜿çšããŠå¶åŸ¡ãè¿œå ããããšã«ããŸãããåœåããšã³ã³ãŒããŒã¯ãã®ã«ãŒã¿ãŒã®GPIOã«æ¥ç¶ãããŠããŸããïŒã¯ããGPIOãæèŒãããŠããŸãïŒãããã®äœæ¥ãããŸã奜ãã§ã¯ãªãããã®ãœãªã¥ãŒã·ã§ã³ã¯ç§»æ€æ§ããªãã£ããããå°æ¥ãUARTãä»ããŠæ¥ç¶ãããarduinoã«åºã¥ããŠå¥ã®ãšã³ã³ãŒããŒã³ã³ãããŒã©ãŒãäœæããŸããã
ãšã³ã³ãŒããŒã¯GPIOTP-Link 3020ã«æ¥ç¶ãããŠããŸãã
ãã®åŸãã©ãžãªå±ããæ§æãããå¿ èŠãããããããåããŠã¹ã©ã€ããŒãç»é¢äžã§åããããšãã«ãå€ãã©ãžãªã®ããã«èŠãããã£ãã®ã§ãããã®ããã«ãåçŽã¹ãã£ãã¯ãã©ã³ãã5åå®è£ ãããŸããããããŠãç§ã¯æ¯åããããªãŒããŒããŒãããŸãããç§ã®èšäºã§ãã©ã³ããããŠã³ããŒãããæ¹æ³ã«ã€ããŠèªãã§ãã ãããçµæã¯ãã®ãããªè§£æ±ºçã§ããã
ããŠããããã®å®éšã§ã©ãžãªèªäœã亀差ãããããšã¯æ®ã£ãŠããããã®çµæãç§ãã¡ã¯äŸ¿å©ãªå¶åŸ¡ãåŸãããšãã§ããŸãã圌ã¯äžèšã§èšã£ãããå®éã«ã¯æ°ã¶æãçµéããããçµæã¯ç§ã«ãšã£ãŠéèŠã§ããã
ããã¯ãã¹ãŠã®ããã«æããŸãããç§ã®å人ã®ã©ãžãªã¢ããã¥ã¢å šå¡ãšãã€ãã®ããã«-ããã€ã¹ã«ã¯ã±ãŒã¹ããªããäœããã¹ãããèãå§ããŸãããç§ã¯30幎代ã®ãªãŒãã³ãªãã³ããŒãžã¬ã·ãŒããŒã«éåžžã«è§ŠçºãããŸãããããã§ã¯ãã·ãŒã«ããšãã³ãã«ã®ããã³ãŒããŒãããããã¹ãŠã®å èãç¡æã§ãã
ãããã¿ã€ãã®å€çš®
ãç¹°ãè¿ãããšã«ããŸããããããè¡ãããã«ã圌ã¯æ±ãåŒãè£ããæ±ãã寞æ³ãåãé€ãã段ããŒã«ãããããã¿ã€ããäœæããŸããã
ã¹ããŒã«ãŒãã¬ããããã¢ã³ããåãåºãã寞æ³ã枬å®
ããŸããã«ã©ã ãå解ããåŸãããããã¢ã³ããåãåºããã±ãŒã¹ãã¢ã³ãããšã³ã³ãŒããŒã®ããã®ãã¹ãŠã®å¯žæ³ãåãå€ãã段ããŒã«ã®ãã¹ãŠã«èŠãç®ã©ããã®ããŒã¯ãä»ããŸããã
ç§ã
æã£ããµã€ãºã®ããŒãã³ã°ãäœãåè«ã§ãããããããäžçš®ã®æ®µããŒã«ã®ãããã¿ã€ãã§ãã段ããŒã«ã§ã©ã®ããã«èŠããããèŠãŠã¿ãŸãããã
段ããŒã«ã©ãžãª
ãããŠãããæ©èœããŸãïŒ
ãããã圌ã¯ãã¹ãŠã®å¯žæ³ãã³ããŒããæããŠã¬ãŒã¶ãŒã«ããã«éããŸããã
寞æ³
ã«ãããããã¢ã¯ãªã«ãåŸã«ãªã£ãŠããããçµã¿ç«ãŠåŸã®æ§åã§ãã
ããã³ãããã«ã«ã¯ãé»æºãã¿ã³ããšã³ã³ãŒããŒãããªã¥ãŒã ããããããŸããäžã«ã¯ãç¬ç«ããé»æºãšããããã®ãããããããšãããããŸããæ£çŽãªãšãããèŠæ ãããããããŸããã
å€ãã®äººãæ°ä»ããããããŸããããã¢ã¯ãªã«ã¯éæã§ããæåã¯ããã£ã¹ãã¬ã€ãèåŸã«é 眮ããŠããã£ã¹ãã¬ã€ãéããŠèŠããããã«ãããã£ãã®ã§ãïŒãã£ã¹ãã¬ã€ã¯ãã§ã«çœã§ãç·è²ã®ãã£ã«ã¿ãŒãéããŠå ã£ãŠããŸãïŒãããããç§ã¯è²ãšã³ã³ãã©ã¹ãã奜ãã§ã¯ãããŸããã§ããã
åçã§ã¯ããªã¬ã³ãžè²ã®ã¢ã¯ãªã«ãéããŠå ããããæ£çŽãªãã£ã¹ãã¬ã€ã®è²ïŒå®éã«ã¯çœã§ãïŒãããã³ãã£ã¹ãã¬ã€ã®1ã€ã®éããã£ã«ã¿ãŒïŒçŸåšãã©ãžãªã«ç·ããããŸãïŒããããŸãã
çµæãšããŠåŸããããã¶ã€ã³ã¯ãã¡ããã¯ãŒã«ã§ãããç§ã¯èªåèªèº«ã«åãã€ãããšã¯ãªããå®çšçã§ã¯ãããŸããããã¡ãããããã¯ããŸããããç§ããã°ãããã®è£œåãèŽããŠããŸããããããã€ãã®åé¡ãæããã«ãªããŸããã第äžã«ããã®åœ¢ã§äœ¿çšããããšã¯å®å šã«äžå¯èœã§ãããããã¯ã»ãããéããäœãäžã«çœ®ãããšãã§ãããå€ãã®ã¹ããŒã¹ãå æããŸãã第äºã«ãTP-Link 3020ã¯ç¡ç·ã«å¯ŸããŠããªã匱ãããšãå€æããå€ãã®äººããã®å®è£ ã®åé¡ã«çŽé¢ããŸãããOpenWRTã¯ãããŒãã£ã³ã°ãã€ã³ãã®ããŒããŠã§ã¢ãµããŒããåããŠããªããããmpdã¯ããã»ããµã100ïŒ ããŒããããµãŠã³ãã§ãããèãããšãã§ããŸãïŒäžå¿«ãªããžã¿ã«ã¯ãªãã¯ããããŸãïŒãããã¯ãäžè¬çã«ããã®ãããªå®è£ ã«çµæ¢ç¬Šãæã€ãããã«ãç§ã®äººçã®å€ãã®ç¶æ³ã§ãç§ã¯ãããã®ãããžã§ã¯ãã«åŸäºããããšãã§ããŸããã§ããããããŠãã®ã©ãžãªã¯å解ãããŠãæåéãç®±ã«å ¥ããããŸããã
æçµæ±ºå®
ããããç§ããã ããããããšã¯æããªãã§ãã ãããããããã¢ã€ãã¢ã¯åç¶ããŸããããããŠä»ããã°ããããŠãç§ã¯ãã®ã©ãžãªãçµããããããšã«æ±ºããŸããããããŠãããã¯ç§ãäžåœã§è²·ã£ãã±ãŒã¹ãæã£ãŠããã»ã©ããŸããã£ããé è³ãšããŠãç§ã¯ããŒã°ã«ããŒã³ãã©ãã¯ãåããŸãããããã䜿ã£ãŠ1ã€ã®ãããžã§ã¯ãã«åãçµã¿ããã®è¯ãé¢ãšæªãé¢ãç¥ã£ãŠããŸããã¹ã«ãŒãã¯ãã¡ããå€ãã§ããããã®ã¿ã¹ã¯ã«å®å šã«é©åããŸããåœåãOpenWRTãã¡ã€ã³OSã«ãããã£ãã®ã§ãããWi-Fiãã©ã€ããŒã«åé¡ããããããããŸããã人æ°ã®PCM2704DACã§ãµãŠã³ãã«ãŒããåããŸããã圌女ã¯ãã®ãªã¯ãšã¹ãã§ãçœãã¹ã«ãŒããªã©ã®äººæ°ã®ãããªãŒã¯ã·ã§ã³ã§ç°¡åã«æ€çŽ¢ãããŸããç§ã¯ãµãŠã³ãã«ãŒãã«éåžžã«æºè¶³ããŠããŸãããäžè¬çã«ã¯ãSoundBlasterã§ããã眮ãããšãã§ããŸããã
ãããã¿ã€ãã®æ®µéãããŸããŸãªãµãŠã³ãã«ãŒããã·ã³ã°ã«ããŒãããã€ã¹ãLinuxã€ã¡ãŒãžãWi-Fiã¢ããã¿ãŒã®è©Šçšãããã³æé©ãªãœãªã¥ãŒã·ã§ã³ã®éžæ
ååã®èšäºã§ã¯ãã³ã³ããŒãã³ãã®éžæã«æéãè²»ããããšã«ã€ããŠèª¬æããŸãããããããªããšãåé¡ãçºçããŸããåãããã«ãLinux察å¿ã®USBWi-Fiã«ãŒãã欲ããã£ãã®ã§ãããããŠããããããšãªãã圌ã¯èªåã®ããã«TP-LinkN150ãåããŸãããèŠããã«ããããããªãã§ãã ããã圌女ã¯ç§ãã倧éã®è¡ã飲ã¿ãäžé±é圌女ã«è²»ããããç§ã¯OpenWRTã®äžã§ãããåŸãããšãã§ããŸããã§ãããUbuntuã§ç§ã¯ã¿ã³ããªã³ã§ããã€ãã®æ¿ãããã³ã¹ã§ãããå§ããŸãããèŠããã«ããã®ããã¥ã¢ã«ã«åŸã£ãŠã€ã³ã¹ããŒã«ããŸããïŒéäžã«æ瀺ããããŸãïŒãèµ·åã¹ã¯ãªããïŒ/etc/rc.localïŒã¯ãç§ã«ã¯æ¬¡ã®ããã«ãªããŸãïŒäžé£ã®å®éšã®åŸïŒã
#!/bin/sh
PATH="/sbin:/bin:/usr/bin"
ps -ef|grep wpa|awk '{print $2}' |xargs -i kill {}
#in case you want to test the script
ifdown wlan0
sleep 0.1
ifup wlan0
sleep 0.1
ifup wlan0
sleep 0.1
ifup wlan0
sleep 0.1
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
#END
sleep 30
#
äžè¬çã«ããã¹ãŠã®è©Šç·Žã®åŸãããããã¹ãŠãå§ãŸããããããã¹ãŠãçµã¿ç«ãŠãããŠå»ºç©ã«å ¥ããããŸããã誰ããèªåã®ãã®ãæã£ãŠããã®ã§ãç§ã¯ãã¹ãŠã®è©³çŽ°ã説æããŸãããããããç§ã¯èçšã«æ°ããããã·ã³ã°ãäœããåºã¯äžããåæ¿ã§äœãããããã«ãã¹ãŠãåãä»ããŸããããã£ã¹ãã¬ã€ã¯æšè£œã®ãã¬ãŒã ã«åãä»ããããŸããã
ããã³ãããã«
ãã¹ãŠããšã³ã³ãŒããŒã«ãã£ãŠå¶åŸ¡ãããŸããå·Šå³-ã¹ããŒã·ã§ã³ã®éžæããšã³ã³ãŒããã¿ã³ãæŒã-äžæåæ¢; ãã¿ã³ã2åçãæŒã-æå»ãšæ¥ä»ã®è¡šç€ºïŒæèšã®ããã«æ©èœããŸãïŒã
èé¢ããã«
ããã¯ãŸãã«Wi-Fiç¡ç·ã§ããã«ããããããã蚺æãšãããã°ã®ããã«ã€ãŒãµãããçµç±ã§æ¥ç¶ããå¯èœæ§ãæ®ããŸãããã芧ã®ãšãããçŸåšãã±ãŒã¹ã«ã¯ã¢ã³ãããããŸãããç§ã®æèŠã§ã¯ãããã«äŸ¿å©ãªã©ã€ã³ã¢ãŠãã ãã§ããäžãèŠãŠã¿ãŸãããã
å·ŠåŽã«ã¯é»æºãââãããäžã®é¢ã«ã¯æšè£œãã¬ãŒã ã®ãã£ã¹ãã¬ã€ããããå³åŽã«ã¯ãšã³ã³ãŒãããããŸããé»æºãæ¥ç¶ãããŠããUSBããã®äžéšã§ã¯ããã£ã¹ãã¬ã€ã«ãé»æºãäŸçµŠããããµãŠã³ãããã¯ã¹ãããã«æ¿å ¥ãããŠããŸããã·ã³ã°ã«ããŒãèªäœã¯ãåæ¿ã«ãã蟌ãŸããã©ãã¯ã®ã¢ã«ãããŠã ã³ãŒããŒã«ç«ã£ãŠããŸãããšã³ã³ãŒããŒã³ã³ãããŒã©ãŒã¯å³åŽã«é ããŠããããããªæãã§ãã
ãšã³ã³ãŒããŒã³ã³ãããŒã©ãŒ
ããã¯ãUARTãä»ããŠããŒã°ã«ããŒã³ã«æ¥ç¶ãããäžè¬çãªã¢ã«ãã¥ã€ã³ã«ã§ãã
ãœãŒã¹ã³ãŒããšèšå®ã«ã€ããŠäžèš
ã³ãŒãã®èª¬æãèšäºã«è¿œå ãããšãèªã¿ããããããã«ååã«ãªãããšã«æ°ã¥ããŸããããããã£ãŠããã®èšäºã§ã¯ã³ãŒãã¯ã»ãšãã©ãããŸãããã2ã€ã®èšäºã¯ã³ãŒãã®èª¬æã«ã®ã¿å°å¿µã§ããŸãã mpdããŒã¢ã³ã®èšå®ã«ã€ããŠã¯èª¬æããŸãããHabréã«é¢ããèšäºãå«ããäœåãã®èšäºããããããã¥ã¢ã«èªäœã¯éåžžããã«ã€ããŠç¶²çŸ ãããŠããŸãã Beagleboneã§ã®Linuxã»ããã¢ããã¯çç¥ããŸãã Arduinoãæ¥ç¶ããããã«UARTããªã³ã«ããå¿ èŠããªãéãããããããããç°¡åã«ã°ãŒã°ã«ã§æ€çŽ¢ã§ããŸãããããžã§ã¯ãå šäœã®ãœãŒã¹ã³ãŒãã¯githubã«ããã誰ã§ãå©çšã§ããŸãã
ã³ãŒãã®ãã¹ãŠã®ãã€ã³ããåæããããã§ã¯ãããŸããããã£ã¹ãã¬ã€ã®æäœã«ã€ããŠã¯ã以åã®èšäºã§èª¬æããŸããããã¡ã€ã«ã確èªããŸãã
arduino_encoderãã©ã«ããŒã«ã¯ãarduinoãšã³ã³ãŒããŒãããžã§ã¯ããå«ãŸããŠããŸããããã«ã¯ãã¹ãŠãçŽæçã«ã¯ã£ããããŠããŠãã©ãããããããããæŽçããçç±ãããããŸãããã©ãžãªèªäœã®ãœãŒã¹ã³ãŒãã§ããLinuxãã©ã«ããŒã§ã¯ããããžã§ã¯ããããããžã§ã¯ããžãšããŸãã£ãã®ã¯ãã®ã³ãŒãã§ããã
- Makefile
ããã¯ãããžã§ã¯ãèªäœã®ã¢ã»ã³ããªã§ãããããã§ã¯æ°ããããšã¯äœããããŸããã
- control.c
ããã¯ãã¹ãŠã®éæ³ãèµ·ãããã¹ã¿ãŒããã°ã©ã ã§ãã
- uart.c
- uart.h
ãããæ¢è£œã®UARTåæåã³ãŒãã§ããLinuxã§UARTã䜿çšããŠCã§äœæ¥ãããã¹ãŠã®äººã«ãšã£ãŠãããã2ã€ã®ãã¡ã€ã«ã調ã¹ãããšããå§ãããŸãããŸããç§ã¯ãŸãããã®ãå§ãLinuxã§UARTã§ã®äœæ¥ã«ç§ã®ãŠã§ãããŒãèŠãŠèª°ãäžåºŠãäºåºŠããããã«èŠãããã
- display.c
- display.h
- output.h
ãæ³åã®ãšãããããã¯ãã£ã¹ãã¬ã€ãæäœããããã®ã³ãŒãã§ããããã«ãæåå€æã³ãŒããããã«ãã蟌ãå¿ èŠããããŸããã
- charset_coverter.c
- charset_coverter.h
衚瀺ã¯CP866ã³ãŒãã£ã³ã°ã§æ©èœããŸãããŸããã³ã³ãœãŒã«ãããã·ã¢èªã§ã¡ãã»ãŒãžã衚瀺ããã«ã¯ã次ã®ããªãã¯ã䜿çšããå¿ èŠããããŸãã
echo -en " \n dlinyj" | iconv -f UTF-8 -t CP866 > /dev/ttyACM0
ãããããã¥ã¢ã³ã¹ããããŸããæåãeãã¯ãªããããŒãèšå·ãããšãœããèšå·ãbãã¯éã«ãªã£ãŠããŸãããããã£ãŠããã³ãŒãåŸããã³ãŒãããå¿ èŠããããŸãã
- mpc.c
- mpc.h
mpdããŒã¢ã³ã®æäœãäžè¬çã«ã¯ããããæäœããããã®ã©ã€ãã©ãªããããŸãããããŸãå€ãã®é¢æ°ãå¿ èŠãšããªãã®ã§ããã¹ãŠãæåãããœã±ããã«æžã蟌ãããšã«ããŸãããããããããã¯èª°ãã«åœ¹ç«ã€ã§ãããã
- term.c
- term.h
ãããããã¯çŽ æŽãããéšåã§ãããã£ã¹ãã¬ã€ãªãã§ã³ãŒãããããã°ããªããã°ãªããªãããšããã£ãã®ã§ããšã³ã³ãŒãã®ä»£ããã«ããŒããŒãå¶åŸ¡ã䜿çšããŠããã£ã¹ãã¬ã€ã®ãã·ãã¥ã¬ãŒã¿ããäœæããŸãããããã¯æ¬¡ã®ããã«ãªããŸããæåã®åçã«ã¯æ¥ä»ãšæèšãããã2çªç®ã®åçã«ã¯ã¡ããã£ãŒãšã¹ããŒã·ã§ã³ããããŸãã
ãããäœæããæ¹æ³ã®è©³çŽ°ã«ã€ããŠã¯ãèšäºãã¿ãŒããã«ã°ã©ãã£ãã¯ã¹ããåç §ããŠãã ããã
ç§ã®ããã«ã©ãžãªå±ãè¿œå ããã®ã¯æ¬¡ã®ã¹ã¯ãªããã§ãã
#! /bin/sh -
# Some configuration settings
VOLUME=60
#mpc volume $VOLUME # adjust this to suit your speakers/amplifier
mpc clear # clear current playlist
mpc add http://relay3.slayradio.org:8000/ #*Slay Radio
mpc add http://fr1.streamhosting.ch:8080 #*lounge-radio.com
mpc add http://us-tx1.streams.bassdrive.com:9000/ #*DnBHeaven.com
mpc add http://uk2.internet-radio.com:31491 #*AmbientRadio.org
mpc add http://www.partyvibe.com:8010/ #*PARTY VIBE RADIO
mpc add http://streamer.psyradio.org:8120 #*psyradio chillout
mpc add http://live.coolradio.rs/cool128
mpc add http://big2.bigportal.ba:8100/big2
ç¹ã«é»åé³æ¥œã®ããã«æšå¥šã§ããã¹ããªãŒãã³ã°ã©ãžãªå±ãããå Žåã¯ãã³ã¡ã³ããæžã蟌ãã§ãã ãã:)
管çãšæ§æãç°¡åã«ããããã«ãympdãããžã§ã¯ãããWebã€ã³ã¿ãŒãã§ã€ã¹ãè¿œå ããŸããããããªæãã§ãã
ãã®çµæãæåŸã®/etc/rc.localãã¡ã€ã«ã¯æ¬¡ã®ããã«ãªããŸãã
sleep 30
/home/ubuntu/addradio.sh > /dev/null 2>&1 &
/home/ubuntu/wifi-radio/Linux/control > /dev/null 2>&1 &
/home/ubuntu/ympd --webport 80 > /dev/null 2>&1 &
ã¯ããã¯ããç§ã¯Ubuntuã§systemdãšrc.localã䜿çšããã®ãæªãããšãç¥ã£ãŠããŸãããããŠä»ã®äœãšããäœãšããäœãšããããããç§ã¯ããã䜿ãããã®ã§äœ¿ããŸãã
çµæ
ãã¡ãããã©ãžãªã¯æ¬æ¥æå³ãããŠããã»ã©çŸãããŠå€§ããã§ã¯ãªãããšãããããŸããããç§ã¯ç§ã®æã«ããé³¥ã空ã®ãã€ãããåªããŠãããšå€æããŸãããäžæ確ãªçµæã§åã³ãããã«æ°å¹Žé延é·ãããããããããæ¹ãè¯ãã§ããããã§ããéãã§ããããšãŠãå¬ããã§ããããã§ãããããã®ããã¹ããèªãããã«ããããã©ã®ããã«èŠããŠãæ©èœãããã«ã€ããŠã®ãããªãèŠãæãæ¥ãŸããã
ãããªã¯å°ãå€ãã§ãããã¢ã³ãããšã€ãŒãµããããæ¥ç¶ãããéåžžã«ããŸãæ©èœããŠããŸãã
ã©ãã§è²ã¡ãŸããïŒ
ãããŠãæé·ããäœå°ããããŸããç§ãé·ãéå©çšããŠãããã®ãããžã§ã¯ãã®æŽŸçç©ã®1ã€ã¯ãVolumioãããžã§ã¯ãã§ããããã¯ãäžçäžã®ã©ãžãªå±ãã¹ããªãŒãã³ã°ãªã©ãèãããšãã§ãã楜ãããã¬ãŒã€ãŒã¢ã°ãªã²ãŒã¿ãŒã§ãã誰ããå æ°ã§ãç§ã®ãããžã§ã¯ããšå®å šã«ãããã³ã°ãããã¹ãŠã®ã¹ããŒã·ã§ã³ãç»é¢ã«è¡šç€ºããŸãããã³ã³ãããŒã«ãå®å šã«åœ¹ã«ç«ããªãå Žåãé€ããŠãé³å£°å¶åŸ¡ãè¿œå ããããšãã§ããŸããHabréã«é¢ããèšäºããã£ãçŽ æŽãããRhasspyãããžã§ã¯ãããããŸããå€éšãµãŒããŒã«æ¥ç¶ããã«é³å£°å¶åŸ¡ãã§ããŸãïŒ
mpdãæšãŠã䟡å€ãããå¯äžã®ãã®ã¯ããã«ããã¯ã§ããé§ ããªãå Žåã圌ã¯ãããåŸ ã£ãŠé»è©±ãåããŸããä»ã®ã¹ããŒã·ã§ã³ãªã©ã®äºåãããã¡ãªã³ã°ã¯ãããŸãããã€ãŸããæé·ã®ããã®åããããŸãããããŠããã®ãããã¯ã¯ãã¡ããã¡ãèå³æ·±ããã®ã§ãããããã®ã¢ã€ãã¢ããããŸããèªãã§ãããŠããããšãïŒ