ãã€ãŠããã«ãæ¥éš°ããåã§ãããéåžžã«å®äŸ¡ãªSOHOã«ãŒã¿ãŒãå¿ èŠã§ããã èŠä»¶-5ããŒããNATããã³Wi-FiãUSBã¯æå·ããŸããã éžæã¯Upvel UR-313N4Gã«èœã¡ãŸããããã®æCitilinkã§ã°ããã860ã«ãŒãã«ãããããŸããã ã«ãŒã¿ãŒã¯è³Œå ¥ãããé±ã«1åå®å®ããŠã¶ãäžãã£ãŠãããéåžžã«å¿è匷ããã®åœ¹å²ãæãããŸããã ãŸããããŒããã©ã¯ãŒãã£ã³ã°ãæ©èœããªãã£ããããããã»ã©èŠåŽããå¿ èŠã¯ãããŸããã§ããã ããã«ãWebã€ã³ã¿ãŒãã§ãŒã¹ã¯ã³ãã³ãã©ã€ã³ã«ã¢ã¯ã»ã¹ã§ãããããé倧ãªã±ãŒã¹ã§ã¯ãåã«iptables -A PREROUTING -j DNATãèšè¿°ãã次ã®ãã³ã°ãŸã§äœæ¥ããŒãã楜ããããšãã§ããŸãã ããããç§ã¯ãã®ãããªã°ãããäŸ¡æ Œã®ããã«ç®±ããããå€ããæåŸ ããŠããŸããã§ããã ãã®åŸãç§ã®äººçã®äžã§äœããå€ãããã«ãŒã¿ãŒãé ãæ£ã«è¡ããTP-Link TR-ML3420ã«çœ®ãæããããŸããã TR-ML3420ã¯OpenWRTã§æ£åžžã«åäœããåé¡ã¯ãããŸããããUpvelã«ãŒã¿ãŒã¯OpenWRTã«ãã£ãŠå®å šã«ãµããŒããããŠããããã§ã¯ãããŸããïŒã¢ãã«å šäœã®2ã€ã®ã¿ïŒã
Upvel UR-313N4Gãç§ã«ãšã£ãŠæ®å¿µã§ã¯ãªãããšãæããã«ãªã£ããšããOpenWRTãã€ã³ã¹ããŒã«ããŠã¿ãããšã«ããŸããã äž»ãªã¿ã¹ã¯ã¯ãMegafon M21-4 3Gã¢ãã ãåäœãããããšã§ããHuaweiE3531ã§ããããŸãã Webã€ã³ã¿ãŒãã§ã€ã¹ãšUARTã®äž¡æ¹ãä»ããŠOpenWRTã§ã«ãŒã¿ãŒããã©ãã·ã¥ããçµéšããããšèšããªããã°ãªããŸããããããã¡ãŒã ãŠã§ã¢ã®ãã¡ã€ã«ãéžæããŠç¥ããããã³ã³ãœãŒã«ã«ããã3ã€ã®ã³ãã³ããå ¥åããŠç¥ãããšããããšã«ãªããŸãã ä»åã¯ããªããã®ãããªã³ãã³ããå°å ¥ãããŠããã®ããç解ãããã£ãã®ã§ãããäžè¬çã«ã¯ãMIPSã¢ãŒããã¯ãã£ã®äžè¬çãªã¢ã€ãã¢ãç¥ããããšæããŸããã
ãã¡ãããFPGAã§ã®ã¬ãããã€ãŒãµãããã«ãŒããéçºããŠããç¶èŠªã«ãã®è³æãèªãã ããMali-400ã®ãããªãã©ã€ããŒãæžãããããããšã¯ãããããã°ãããŠããããšã«æ³šæããå¿ èŠããããŸãã
ãŸããäœãã©ãã§çž«ãããGoogleã«å°ããŸãã x86ã¢ãŒããã¯ãã£ã¯ãç¹å¥ã«æºåãããã¡ãã£ã¢ã䜿çšããŠOSãèµ·åããŸããMBRãŸãã¯GPTæšæºã«åŸã£ãŠããŒã¯ãããããŒããã£ã¹ã¯ãSSDããŸãã¯ãã©ãã·ã¥ã¡ã¢ãªã§ãã¡ã€ã³ããŒãã¬ã³ãŒããšç¹å¥ã«ããŒã¯ãããããŒãããŒãã£ã·ã§ã³ããããŸãã ãã£ã¹ã¯ã®å éšæ§é ã¯ããã¡ãŒã ãŠã§ã¢ã«ãã£ãŠOSããé ãããŠãããBIOSã¯ãOSãã€ã³ã¹ããŒã«ãããŠããªããŠãæå°éã®æ©èœãæäŸããŸãã MIPSã¢ãŒããã¯ãã£ãåããã«ãŒã¿ãŒã§ã¯ããã¹ãŠã®é 眮ãç°ãªããŸãã ããŒã¿ã¯MTDããã€ã¹ã«ä¿åãããŸããMTDããã€ã¹ã¯ã³ã³ãããŒã©ã®ãªãEEPROMãããã§ããããããã®åè·¯ã«æžã蟌ããšãã¯ãåãã»ã¯ã¿ã«é »ç¹ã«æžã蟌ãŸãªãããã«ããå¿ èŠããããŸãã ããã«ãMTDã«ã¯åºå®ãããããªã倧ããªãããã¯ãµã€ãºããããããã¯æ¶å»ã§ããŸãïŒç§ã®å Žå-64 KBïŒã MTDããã€ã¹ã«ã¯ããŒãã£ã·ã§ã³ããŒãã«ã¯ãããŸããããLinuxã«ãŒãã«ãããŒãããããšãããŒãã£ã·ã§ã³ããŒãã«ã®ååšãã·ãã¥ã¬ãŒãããŸãã ãã®ã·ãã¥ã¬ãŒã·ã§ã³ã®èšå®ã¯ãã«ãŒãã«ã¢ã»ã³ããªäžããŸãã¯ããŒãæã«mtdpartsãã©ã¡ãŒã¿ãŒã䜿çšããŠèšå®ãããŸãã MTDã®æåã«ãç¶æ³ã倱æããå Žåã«æ¶å»ã§ããããŒãããŒããŒããããããã°ã©ããŒã®EEPROMãã¡ãŒã ãŠã§ã¢ã®ã¿ã圹ç«ã¡ãŸãã ããŒãããŒããŒã¯ãMTDã§ã¹ããããããã€ã¡ãŒãžãã¡ã¢ãªã«å±éããLinuxã«ãŒãã«ã«å¶åŸ¡ãæž¡ããŸãã
ä»ãå®éšããæéã§ãã ãŸããã«ãŒã¿ãŒãéããŠãã¡ã€ã³ããã-Ralink 5350Fã®ããŒã¯ã確èªããŸãã ç°¡åãªã°ãŒã°ã«æ€çŽ¢ã§ã¯ããã®ããããOpenWRTã§ãµããŒããããŠãããããªãè¯ãããšã瀺ããŠããŸã-5350ã·ãªãŒãºã®ãã¡ãŒã ãŠã§ã¢ãå«ãramipã®ã«ã¿ãã°ããã¹ãŠãããŸãããŸããããŒãã«ã¯32MB RAMããããš8MB EEPROMãããããããŸãã w3bsit3-dns.comãµã€ããæ€çŽ¢ãããšãRvelink 5350Fãããã»ãããUpvel UR-322N4GãHame MPR-A1ãããã³Zyxel Keenetic 4G IIã䜿çšããŠããããšãããããŸãã ããŠãHame MPR-A1çšã®OpenWRTãããŠã³ããŒãããã«ãŒã¿ãŒã®Webã€ã³ã¿ãŒãã§ãŒã¹ãããã©ãã·ã¥ããŠã¿ãŠãã ããã
ãã¡ãŒã ãŠã§ã¢ã¯çž«è£œãããŠããŸãããæããã«ãããã€ãã®çœ²åã¯ãã¹ããããŠããŸããã ãããã¬ãŒã䜿çšããŠãã©ãã欲ãããªãã®ãã確èªããŸãã ãŸãã倧äžå€«ãããã¯çããªãã
Webã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããã«ã«ãŒã¿ãŒãã¢ããã°ã¬ãŒãããã«ã¯ãããã€ãã®æ¹æ³ããããŸãã ããšãã°ãã«ãŒã¿ã®èµ·åæã«ããŒãããŒããåãæ¿ãããªã«ããªã¢ãŒãã䜿çšã§ããŸãã ãªã»ãããã¿ã³ãæŒãããå Žåã ä»åŸãUpvel UR-313N4Gã«ã¯ãã®ã¢ãŒãã¯ãããŸãããäžéã§ããäœãã§ããã®ã§ããããã
ãŸããå ã®ãã¡ãŒã ãŠã§ã¢ã§äœ¿çšå¯èœãªtelnetãä»ããŠã«ãŒã¿ãŒã«æ¥ç¶ããäžèŠãªããã»ã¹ã匷å¶çµäºããŠã«ãŒã¿ãŒã®ã¡ã¢ãªããã¯ãªã¢ãããtftpã§ã¡ã¢ãªã«æ°ãããã¡ãŒã ãŠã§ã¢ãããŒãããmtd_writeã³ãã³ãã§ãã©ãã·ã¥ããŸãã ãã®æ¹æ³ã¯å®éã«ã¯1åããè©Šè¡ãããªããããæªãæ¹æ³ã§ãããã¡ãŒã ãŠã§ã¢ãã«ãŒã¿ãŒãšäºææ§ããªããèµ·åã§ããªãå Žåã¯ãåºåã§ãããŒãããªãã¯ããååŸããŸããã埩å ã§ããã®ã¯UARTã®ã¿ã§ãã ããã«ããã®å ŽåãMTDã®ã©ã®ã»ã¯ã·ã§ã³ã«ãã¡ãŒã ãŠã§ã¢ãæžã蟌ãå¿ èŠããããã«ã€ããŠãé ãæ©ãŸããå¿ èŠããããŸãã å ã®ãã¡ãŒã ãŠã§ã¢ã§äœ¿çšãããŠããMTDããŒã¯ã¢ããã«ã¯ããã¡ãŒã ãŠã§ã¢ã»ã¯ã·ã§ã³ã¯ãããŸããã
UARTçµç±ã®ãã¡ãŒã ãŠã§ã¢
ãã®ãã¹ãŠãããå®éšã§ã¯UARTãä»ããŠã«ãŒã¿ãŒã«æ¥ç¶ããå¿ èŠããããã«ãŒã¿ãŒãèµ·åããç¬éããã³ã³ãœãŒã«ã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸãã 念ã®ãããç§ãã¡ã¯äžåœã«160ã«ãŒãã«ã®ããã°ã©ããŒã泚æããŸãã ããŒãããŒããŒã匷å¶çµäºããªããã°ãããã°ã©ãã¯å¿ èŠãããŸãããã圌ããèšãããã«ããç°ãªãã±ãŒã¹ããããŸããã ããŒãäžã§ãLEDãèªåã§æã£ãŠããå Žåãå³äžéšåã«ãæ¥ç¶ãããŠããªã4ã€ã®éå£éšã䞊ãã§ããŸãã ããŒãã泚ææ·±ãèŠãŠãã ãã-å·Šã®æåã®ç©Žã¯ç®ã®åºãå±€ã«äœãããŠããŸããããã¯åè·¯ã°ã©ã³ãã§ããã次ã®2ã€ã®ç©Žããæµæåšãéããã©ãã¯ã¯ããŒãã®ããæ·±ãå Žæã«è¡ãããã§ã-ãããã¯RxãšTxã§ããããŸã æ確ã§ã¯ãããŸããã äœã®é çªã§ã äžçªå³ã®ç©Žããã©ã€ã«å±€ã«ãããŸãããããå°ããã+ 3.3 Vã§ããå¯èœæ§ããããŸãããã¹ã¿ãŒãåãäžããŠé»å§ã枬å®ããŸãã Txã§ã¯+3.3 VãRx-0 Vã§ããå¿ èŠããããŸãïŒå·Šããå³ãžïŒ-0Vã§ãã 3.3Vã0Vã3.3Vã ãããã£ãŠãå·ŠåŽã®2çªç®ã¯Txã3çªç®ã¯Rxã§ãã å³åŽã®ãã³ã¯3.3Vã§ããã¯ãã ä»ãã¯ããŸãããã¢ããã¿ãŒãçŒãä»ããŸãã
ããã¢CA-42ã³ãŒãã®äžåœã®ã¯ããŒã³ãåãåºããã«ããããã°ãŒã°ã«ã§ãã³ã¢ãŠããèŠã€ããŠã¯ãã ä»ãããŸãïŒå·Šããå³ãžïŒ-ãªã¬ã³ãžãèµ€ãéã
PuttyïŒã¯ãŒã¯ã¹ããŒã·ã§ã³ã«LinuxããããWindowsã§ãåé¡ã¯ãªãã¯ãã§ãïŒãé 眮ããããŒãé床ãéžæããŸããCOMããŒãã®æšæºå€ãèšå®ããã«ãŒã¿ãŒããªã³ã«ããŠãç»é¢ã«ã¯ã©ãã«ãŒã§ã¯ãªãæå³ã®ããããã¹ããããããšã確èªããŸãã 57600ããŒã®é床ã§æ¥ç¶ããŸããã ããã§ããŒãããŒããŒã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸãããã€ãŸããã«ãŒã¿ãŒããããã¯ããæ©äŒãæžããŸãã
ããŠãããŒãããŒããŒããã©ãã·ã¥ããŠã¿ãŸãããã ã·ã¹ãã ã®éå§æã«ãæšæ¶ã衚瀺ãããŸã
Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP.
ãã®ã¡ãã¥ãŒã§æãèå³ãããã®ã¯ããã€ã³ã1-TFTPçµç±ã§ãã¡ãŒã ãŠã§ã¢ãååŸããRAMããèµ·åããããšã§ãã EEPROMã«ãã©ãã·ã¥ããããšãªããããã€ã¹ãšã®ãã¡ãŒã ãŠã§ã¢ã®äºææ§ã確èªã§ããããšãããããŸããã ç§ã«ãšã£ãŠã¯å¬ããé©ãã§ããã tftpãµãŒããŒãã€ã³ã¹ããŒã«ãïŒç§ã¯atftpdãååŸããŸããïŒãHame MPR-A1ã®ãã¡ãŒã ãŠã§ã¢ãäœæ¥ãã£ã¬ã¯ããªã«é 眮ãããã䟿å©ã«-mpr-a1.binã«ååãå€æŽããŸãã
ã«ãŒã¿ãŒãèµ·åããã³ã³ãœãŒã«ã®ãã¿ã³1ãæŒããŠãã³ã³ãã¥ãŒã¿ãŒã®ãããã¯ãŒã¯ã€ã³ã¿ãŒãã§ãŒã¹ã«ã¢ãã¬ã¹10.10.10.3ãèšå®ããããŒãããŒããŒã«å¿ èŠãªãã©ã¡ãŒã¿ãŒãå ¥åããŠããã¡ãŒã ãŠã§ã¢ãããŒãããŸãã
ãã¡ãŒã ãŠã§ã¢ãèµ·åããŸããïŒ Webã€ã³ã¿ãŒãã§ãŒã¹ãžã®ã¢ã¯ã»ã¹ããããŸããããã¯ãã»ãšãã©ã®ãã¡ãŒã ãŠã§ã¢ãæ©èœããŠããããšãæå³ããŸãã ãŸã äœãçž«ãä»ããŠããŸããïŒ LEDã§å¥åŠãªããšãèµ·ãã£ãŠããã ãã§ããWi-Fiã®ã¿ããªã³ã«ãªã£ãŠããŸãïŒãã ãããªãã«ãªã£ãŠããŠç¹ç¯ããªãã¯ãã§ãïŒããã€ãŒãµãããããŒãã®LEDã¯ç¹ç¯ããŸããã ããã«ç解ããŠããŸãã OpenWRTã¯swconfigãŠãŒãã£ãªãã£ã䜿çšããŠã¹ã€ãããæ§æããŸãã ã¹ã€ãããã§ããããšãèŠã€ãã
>swconfig dev rt2305x help switch0: rt305x(rt305x-esw), ports: 7 (cpu @ 6), vlans: 4096 --switch Attribute 1 (int): enable_vlan (VLAN mode (1:enabled)) Attribute 2 (int): alternate_vlan_disable (Use en_vlan instead of doubletag to disable VLAN mode) Attribute 3 (int): bc_storm_protect (Global broadcast storm protection (0:Disable, 1:64 blocks, 2:96 blocks, 3:128 blocks)) Attribute 4 (int): led_frequency (LED Flash frequency (0:30mS, 1:60mS, 2:240mS, 3:480mS)) Attribute 5 (none): apply (Activate changes in the hardware) Attribute 6 (none): reset (Reset the switch) --vlan Attribute 1 (ports): ports (VLAN port mapping) --port Attribute 1 (int): disable (Port state (1:disabled)) Attribute 2 (int): doubletag (Double tagging for incoming vlan packets (1:enabled)) Attribute 3 (int): untag (Untag (1:strip outgoing vlan tag)) Attribute 4 (int): led (LED mode (0:link, 1:100m, 2:duplex, 3:activity, 4:collision, 5:linkact, 6:duplcoll, 7:10mact, 8:100mact, 10:blink, 11:off, 12:on)) Attribute 5 (int): lan (HW port group (0:wan, 1:lan)) Attribute 6 (int): recv_bad (Receive bad packet counter) Attribute 7 (int): recv_good (Receive good packet counter) Attribute 8 (int): tr_bad (Transmit bad packet counter. rt5350 only) Attribute 9 (int): tr_good (Transmit good packet counter. rt5350 only) Attribute 10 (int): pvid (Primary VLAN ID) Attribute 11 (string): link (Get port link information)
äžèŠãå æ°ã¥ããããŸããLANãšWANãµãããããã©ãã£ãã¯ãåºå¥ããããã«äžå¯æ¬ ãªVLANã ãã§ãªããããã°ã©ã LEDã管çã§ããŸãã
ãã
>swconfig dev rt305x port 4 set led 12 >swconfig dev rt305x set apply
ãããŠ...äœãèµ·ãããŸããã ã©ãããåé¡ã¯ãã©ã€ããŒã®ã©ããæ·±ããšããã«ããããã§ãã OpenWRTã«ã¯ãªãŒãã³ãœãŒã¹ã³ãŒãããããŸãã gitãªããžããªã«ç§»åããããã§ãã©ã€ããŒã®ãœãŒã¹ãèŠã€ããŠç¢ºèªããŸã
446 static void esw_hw_init(struct rt305x_esw *esw) 447 { 448 int i; 449 u8 port_disable = 0; 450 u8 port_map = RT305X_ESW_PMAP_LLLLLL; 451 452 /* vodoo from original driver */ 453 esw_w32(esw, 0xC8A07850, RT305X_ESW_REG_FCT0); 454 esw_w32(esw, 0x00000000, RT305X_ESW_REG_SGC2);
ããã§ã¯ãããŒãã¥ãŒæã®éæ³ã䜿çšãããŠããããã§ãã ãããŠãŸã -ãã©ã€ããŒã³ãŒãã«ãããšãã¹ã€ããã¬ãžã¹ã¿ã«é¢ãã詳现ãªããã¥ã¡ã³ãããªããšããããææ¡ã§ããªãããšãããã«ããããŸãã ãããããã©ã€ããŒã®ãã©ã¡ãŒã¿ãŒãmodprobeã³ãã³ãã®åŒæ°ãéããŠã§ã¯ãªããæããã«ã«ãŒãã«ã«ã³ã³ãã€ã«ãããè¡ãéããŠèšå®ãããããšã¯æããã§ãã
1431 reg_init = of_get_property(np, "ralink,led_polarity", NULL);
ããŠããœãŒã¹ãèã«çœ®ããå察åŽããå ¥ãããšããŸãã 3ã€ã®ã«ãŒã¿ãŒïŒUpvel UR-322N4GãHame MPR-A1ãããã³Zyxel Keenetic 4G IIïŒã¯ãã¹ãŠãã¥ã¢ã«ããŒãã§ãã Ralink 5350ã§ãµããŒããããŠããã¢ãã«ã®ã¯ã©ãŠãã«ã¯ã5ããŒãã¢ãã«ããããŸãã WikiDevã«ã¢ã¯ã»ã¹ããŠãããšãã°D-Link 320 NRU B1ãèŠã€ããŸãã 5ããŒãã«ãŒã¿ãŒã1ã€ã®USBããŒããå¿ èŠã§ãã ãã¡ãŒã ãŠã§ã¢ãããŠã³ããŒãããã«ãŒã¿ãŒã®ã¡ã¢ãªã«ããŒãããŠèµ·åããŸãã LEDã¯æåŸ ã©ããã«æ©èœããŸãã ãšãŠãèå³æ·±ãã ããã«ã€ããŠãã©ãã·ã¥ããŸããä»ã®ãšãããHame MPR-A1ãšD-Link 320 NRU B1ã®OpenWRTã®éããèŠã€ããããšããŸãã éãã¯ãã¢ã»ã³ããªãããã¡ã€ã«-DTSã§æ¢ãå¿ èŠããããŸãã ããšãã°ãHameã®led_polarityãã©ã¡ãŒã¿ãŒã¯æå®ãããŠããããD-Linkã®å Žåã¯0x17ã§ãã ãããŠãç§ã¯æ¥µæ§ãçŽæ¥ã§ããéã§ãããšæã£ãïŒ ãã©ã€ããŒã®ãœãŒã¹ã«åã³ç»ããŸã
#define RT5350_EWS_REG_LED_POLARITY 0x168
極æ§ãèšå®ããæ¹æ³ãèŠã€ããŸã
565 /* set the led polarity */ 566 esw_w32(esw, esw->reg_led_polarity & 0x1F, RT5350_EWS_REG_LED_POLARITY);
ç¹°ãè¿ãã«ãªããŸãããã¹ã€ããã®ã¬ãžã¹ã¿ã®èª¬æããªããã°ããã£ãããããã®ã¯äœããªããšç¢ºä¿¡ããŠããŸãã
D-Link DIR-320 NRU B1ã®ãã¡ãŒã ãŠã§ã¢ãã«ãŒã¿ãŒã«æé©ã§ããããšãããããŸããã 次ã«ããã©ãã·ã¥ããå¿ èŠããããŸãã ããããããã¡ãŒã ãŠã§ã¢ããã¹ãããããã«ãååã«uImageãšããåèªãå«ãŸãããã¡ã€ã«ãéžæããããšã«æ°ä»ããã§ãããã ãã®ãããªãã¡ã€ã«ã«ã¯ãã«ãŒãã«ã€ã¡ãŒãžãšãRAMã«èªã¿èŸŒãŸããèªã¿åãå°çšã®ãã¡ã€ã«ã·ã¹ãã ã®ã¿ãå«ãŸããŸãã ãã®ãããªã€ã¡ãŒãžã¯ã¡ã¢ãªããçŽæ¥å®è¡ã§ããŸããããã¡ãŒã ãŠã§ã¢ã«ã¯ããŸãé©ããŠããŸããããã®ã€ã¡ãŒãžã«èšå®ãä¿åããå Žæã¯ãããŸããã ãããã£ãŠããã¡ãŒã ãŠã§ã¢ã®å Žåãsysupgradeæ¡åŒµæ©èœãåããã€ã¡ãŒãžãéžæããŸãããã®ãããªã€ã¡ãŒãžã®æåŸã«ãJFFS2ã»ã¯ã·ã§ã³ãæ·»ä»ãããããã«ã«ãŒã¿ãŒã®ãã¡ã€ã«ã·ã¹ãã ã«å ããããå€æŽãä¿åãããŸãã ãããã£ãŠããã©ãã·ã¥ãã¡ãŒã ãŠã§ã¢ããªããšãã¡ã¢ãªããsysupgradeã€ã¡ãŒãžãèµ·åã§ããŸããã
Upvel UR-313N4Gã«8 MBã®ãã©ãã·ã¥ãã©ã€ããããããšã¯éåžžã«è¯ãããšã§ããã€ã³ã¹ããŒã«åŸãè¿œå ããã±ãŒãžçšã«4 MBãå°ãè¶ ãã容éããããŸãã ããããTP-Link TR-ML3420ã§ã¯4MBã®ãã©ãã·ã¥ãã©ã€ããšããã«ç©ºã容éããããŸãã-ç«ã¯æ³£ããŸããã
ã«ãŒã¿ãŒãåèµ·åãã2ãæŒããŠãã¡ãŒã ãŠã§ã¢ã®ååãæå®ããŠçž«ããŸãã ã ããããã¹ãŠãããŸãããããã«èŠããïŒã€ã³ã¿ãŒãã§ã€ã¹ãã¢ããããŠãããLEDãç¹æ» ããŠãããäžè¬çã«ã人çã¯æ³¡ç«ã£ãŠããŸãã ã«ãŒã¿ãŒãMegafon M21-4ã¢ãã ã§åäœãããããšãäž»ãªç®æšãšããããšããŸã å¿ããŠããŸãããïŒ ã¢ãã ãUSBããŒãã«å·®ã蟌ã¿ãdmesgãèŠãŠâŠäœãããŸããã ã€ãŸããäœããããŸããã 2ã€ã®ãªãã·ã§ã³ããããŸãïŒã«ãŒãã«ããUSBããŒãããããå ã«ãã³ã°ããŠããå éšãã¹ãèªèããªãã£ãïŒããã§ã¯äœãããŸããïŒããŸãã¯ãã®ããŒãã®ãã©ã€ããŒããã¡ãŒã ãŠã§ã¢ã«è¿œå ããã®ãå¿ããŸããã D-Link 320 NRU B1ã«ã¯USBããŒããããããã2çªç®ã®ãªãã·ã§ã³ã®æ¹ãå¯èœæ§ãé«ããªããŸãã Googleã®ãOpenWRT usbãµããŒãããã«ãŒã¿ãŒã®WANããŒããæ§æããŠããã¡ãŒã ãŠã§ã¢ãã€ã³ã¿ãŒãããã«ã¢ã¯ã»ã¹ããŠããã±ãŒãžãã€ã³ã¹ããŒã«ããããã«ããŸãã
>opkg update >opkg install kmod-usb2 >opkg install kmod-usb-ohci
kmod-usb-ohciã®åã«kmod-usb2ã¢ãžã¥ãŒã«ãããŒãããå¿ èŠãããããããã®é åºã«ãªããŸãã
ã³ã³ãœãŒã«ã«æ¬¡ã®è¡ã衚瀺ãããŸãã
[ 121.570000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 121.600000] ehci-platform: EHCI generic platform driver [ 121.810000] phy phy-usbphy.0: remote usb device wakeup disabled [ 121.830000] phy phy-usbphy.0: UTMI 16bit 30MHz [ 121.840000] ehci-platform 101c0000.ehci: EHCI Host Controller [ 121.850000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1 [ 121.860000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000 [ 121.900000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00 [ 121.910000] hub 1-0:1.0: USB hub found [ 121.920000] hub 1-0:1.0: 1 port detected [ 122.300000] usb 1-1: new high-speed USB device number 2 using ehci-platform [ 151.680000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 151.710000] ohci-platform: OHCI generic platform driver [ 151.720000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller [ 151.730000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2 [ 151.750000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000 [ 151.820000] hub 2-0:1.0: USB hub found [ 151.830000] hub 2-0:1.0: 1 port detected
ãããŒãã·ã¹ãã ã¯USBãã¹äžã®ããã€ã¹ãèŠãã®ã§ãç¶è¡ããŸãã
次ã«ãã¢ãã ãæ¥ç¶ãããšãããžãã¯ã·ãŒã±ã³ã¹ããéä¿¡ããããã±ãŒãžãé 眮ããã¢ãã ãCD-ROM / TFã«ãŒãã¢ãŒãããCD-ROM / TFã«ãŒãã¢ãŒã+ 3 COMããŒãã«åãæ¿ããŸãã
>opkg install usb-modeswitch
ã³ã³ãœãŒã«ã«æ¬¡ã®ããã«è¡šç€ºãããŸãã
[ 278.230000] usb 1-1: USB disconnect, device number 2 [ 278.990000] usb 1-1: new high-speed USB device number 3 using ehci-platform
ãã®ãããusb-modeswitchã¯æ©èœããŸãããã¢ãã ã«ã³ãã³ããéä¿¡ãããšãã¢ãã ã¯USBãã¹ããæ¶ããŠãå¥ã®ããã€ã¹ãšããŠè¡šç€ºãããŸããã
COMããŒãã衚瀺ããã·ã¹ãã ã§äœ¿çšã§ããããã«ãããã©ã€ããŒãå«ã2ã€ã®ããã±ãŒãžãé 眮ããŸã
>opkg install kmod-usb-serial kmod-usb-serial-options
[ 326.530000] usbcore: registered new interface driver usbserial [ 326.540000] usbcore: registered new interface driver usbserial_generic [ 326.550000] usbserial: USB Serial support registered for generic [ 326.820000] usbcore: registered new interface driver option [ 326.830000] usbserial: USB Serial support registered for GSM modem (1-port) [ 326.850000] option 1-1:1.0: GSM modem (1-port) converter detected [ 326.860000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0 [ 326.870000] option 1-1:1.2: GSM modem (1-port) converter detected [ 326.890000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1 [ 326.900000] option 1-1:1.3: GSM modem (1-port) converter detected [ 326.910000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
ã¢ãã ãæ£ããæ€åºãããã·ã¹ãã ã«3ã€ã®COMããŒãã衚瀺ãããããšãããããŸãã
3Gã¢ãã ãžã®éä¿¡ã³ãã³ããšWebã€ã³ã¿ãŒãã§ã€ã¹ã®æ¡åŒµãäœæããããã«å¿ èŠãªããã±ãŒãžãé 眮ããŸãã
>opkg install comgt luci-proto-3g
Webã€ã³ã¿ãŒãã§ãŒã¹ã«å ¥ãã3Gãæ§æããããŒããšããŠ/ dev / ttyUSB0ãæå®ãããšããã¹ãŠãæ©èœããŸãã
次ã«ãLEDãåãäžããŸãã æåã«kmod-ledtrig-usbdevããã±ãŒãžãã€ã³ã¹ããŒã«ããŸã-USBãã¹äžã®ããã€ã¹ã®å¯çšæ§ã«å¿ããŠLEDãå¶åŸ¡ã§ããŸãã ãã·ã¹ãã ã->ãLEDæ§æãã¿ãã®Webã€ã³ã¿ãŒãã§ãŒã¹ã«é²ã¿ãããã§2ã€ã®LEDãå®çŸ©ããŸãã
Name: usb LED Name: d-link:green:usb Trigger: usbdev USB Device: 1-1 (HUAWEI - HUAWEI Mobile) Name: wifi LED Name: rt2800:phy0:radio Trigger: netdev Default state: on Device: wlan0 Trigger Mode: Link On, Transmit, Receive
[ä¿å/é©çš]ãã¿ã³ãã¯ãªãã¯ããŸã
ããã§ãã«ãŒã¿ãŒã®æ§æãå®äºããŸããã
ãusbãLEDã¯USBãã¹äžã®ç¹å®ã®ããã€ã¹ã¢ãã¬ã¹ïŒ1-1ïŒãåç §ãããããã¢ãã¬ã¹ãå€æŽããããšLEDãæ©èœããªãããšãä»ãå ããŠãã ããã
Telnetçµç±ã®ãã¡ãŒã ãŠã§ã¢
次ã«ãUARTã«ã¢ã¯ã»ã¹ããã«ã«ãŒã¿ãŒããã©ãã·ã¥ã§ãããã©ããã確èªããŸãã ãŸãããªã«ããªã¢ãŒããè©ŠããŠã¿ãŸããããéåžžã¯ããªã»ãããã¿ã³ãæŒããªããé»æºãæŒããšãªã³ã«ãªããŸãã ã¯ã©ã³ãããã£ãŒããããã³ã³ã³ãœãŒã«ã®è¡šç€ºïŒäœããããŸããã ã¢ãŒãã¯äœ¿çšã§ããŸããã ããŒãããŒããŒãä»ããŠå ã®ãã¡ãŒã ãŠã§ã¢ã«ããŒã«ããã¯ããããŒããã°ã確èªããŸãã
: System Boot system code via Flash. ## Booting image at bc050000 ... raspi_read: from:50000 len:40 . Image Name: Linux Kernel Image Created: 2014-06-11 7:38:15 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 3435300 Bytes = 3.3 MB Load Address: 80000000 Entry Point: 80420000 raspi_read: from:50040 len:346b24 ..................................................... Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80420000) ... ## Giving linux memsize in MB, 32
u-bootã¯ãã¢ãã¬ã¹0x00050000ããå§ãŸã64ãã€ããèªã¿åãããšãããããŸãïŒ ç¶èŠª ããã°bc050000ã§çç±ã説æããŸãïŒã 0x00050000ããéå§ããŠãuImageã€ã¡ãŒãžã¯MTDã§ãã©ãã·ã¥ãããããããŒã¯æåã®64ãã€ãã«ãããŸãã ã€ã¡ãŒãžã®ãµã€ãºãRAMã®å°æ¥ã®ã¢ãã¬ã¹ãããã³ãšã³ããªãã€ã³ããããããŒããååŸããããã®åŸãã€ã¡ãŒãžãRAMã«å±éãããå¶åŸ¡ããšã³ããªãã€ã³ãã«è»¢éãããŸãã
å ã®ãã¡ãŒã ãŠã§ã¢ãèµ·åãããŸã§åŸ ã£ãŠããã°ãèŠãŠã¿ãŸãããã
mtd .name = raspi, .size = 0x00800000 (8M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 6 MTD partitions on "raspi": 0x00000000-0x00800000 : "ALL" 0x00000000-0x00030000 : "Bootloader" 0x00030000-0x00040000 : "Config" 0x00040000-0x00050000 : "Factory" 0x00050000-0x007d0000 : "Kernel" 0x007d0000-0x00800000 : "RW_FS"
ã¢ãã¬ã¹0x00050000ããå§ãŸãã«ãŒãã«ã»ã¯ã·ã§ã³ãéå§ããããã®ã¢ãã¬ã¹ã¯u-bootãã°ã®ã¢ãã¬ã¹ãšçãããäžèŽããŸãã ãã®ãããããã«ã«ãŒã¿ãŒã®ãã¡ãŒã ãŠã§ã¢ãä¿åãããŸããããã§ã¯ãOpenWRTãèšè¿°ããŸãã ã©ã®ããã€ã¹ãã»ã¯ã·ã§ã³ã衚瀺ãããèŠãŠã¿ãŸãããïŒ
cat /proc/mtd dev: size erasesize name mtd0: 00800000 00010000 "ALL" mtd1: 00030000 00010000 "Bootloader" mtd2: 00010000 00010000 "Config" mtd3: 00010000 00010000 "Factory" mtd4: 00780000 00010000 "Kernel" mtd5: 00030000 00010000 "RW_FS"
ã«ãŒãã«ããŒãã£ã·ã§ã³ã®ãµã€ãºã¯7680 Kbã§ãããOpenWRTã€ã¡ãŒãžã¯çŽ3.5 Mbãå¿ èŠãšãããããæ°ãããã¡ãŒã ãŠã§ã¢ãå€ãããŒãã£ã·ã§ã³ã«åãŸããªãããšãæããã«ãã©ãã·ã¥ã§ããŸãã
空ãã¡ã¢ãªã®éãèŠãŠã¿ãŸãããã
>free total used free shared buffers Mem: 28300 19952 8348 0 0 Swap: 0 0 0 Total: 28300 19952 8348
çŽ3.5 MBå¿ èŠã§ãã
ã¯ãŒã¯ã¹ããŒã·ã§ã³ïŒã¢ãã¬ã¹192.168.10.100ïŒã§atftpdãå®è¡ãããã¡ãŒã ãŠã§ã¢ãã«ãŒã¿ãŒã®RAMã«ã³ããŒããŸãã
>tftp -l dir-320.bin -r dir-320.bin -g 192.168.10.100
ãŸããRW_FSããŒãã£ã·ã§ã³ãåé€ããŸãã ãã¶ãããããè¡ãå¿ èŠã¯ãããŸãããã念ã®ãããå®å šã§ãïŒ
> mtd_write erase /dev/mtd5 Unlocking /dev/mtd5 ... Erasing /dev/mtd5 ... Erase char is 255
ãã¡ãŒã ãŠã§ã¢ãæžããŸãïŒ
>mtd_write -r write dir-320.bin /dev/mdt4 Unlocking /dev/mtd4 ... Writing from dir-320.cc.sys.bin to /dev/mtd4 ...
-rã¹ã€ããã¯ãã³ãã³ããå®äºããåŸãã«ãŒã¿ãŒãåèµ·åããããšãæå³ããŸãã ããŒãã£ã·ã§ã³ããŒãã«ã¯Linuxã«ãŒãã«å ã«ã®ã¿ååšãããããããŒãã£ã·ã§ã³ããŒãã«ã調æŽããå¿ èŠã¯ãããŸããã
åèµ·ååŸãWebã€ã³ã¿ãŒãã§ãŒã¹ã«ç§»åããããã±ãŒãžkmod-usb2ãkmod-usb-ohciãkmod-usb-serialãkmod-usb-serial-optionãkmod-ledtrig-usbdevãusb-modeswitchãcomgtãluci-proto-ãé 眮ããŸã3Gãã€ã³ã¿ãŒãã§ã€ã¹ãšLEDãæ§æããŸãã
ã«ãŒã¿ãŒãã¹ããããããã¯ãããŒãéããŠãè¶ã泚ãããšãã§ããŸãã