<div>Hi Jeremy,</div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------<b style="background-color: rgb(239, 239, 239); font-family: Verdana;">From: </b><span style="background-color: rgb(239, 239, 239); font-family: Verdana;"> "jk";<jk@ozlabs.org>;</span></div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>Send time:</b> Friday, Nov 23, 2018 1:13 PM</div><div><b>To:</b> "xiuzhi"<1450335857@qq.com>; "openbmc"<openbmc@lists.ozlabs.org>; <wbr></div><div></div><div><b>Subject: </b> Re: SOL,obmc-console-client can't connect to the host OS</div></div><div><br></div>>Hi Xiuzhi,<br><br>>> I am debugging the SOL, the obmc-console-client didn't work.<br>>> My BMC and host OS runtime environments are:  <br>>> 1, BMC: <br>>> 1) obmc-console-server is good<br>>> # systemctl status obmc-console\@ttyVUART0<br>>> [[0;1;32m¡ñ[[0m obmc-console@ttyVUART0.service - Phosphor Console Muxer<br>>> listening on device /dev/ttyVUART0<br>>>    Loaded: loaded (/lib/systemd/system/obmc-console@.service;<br>>> indirect; vendor preset: enabled)<br>>>    Active: [[0;1;32mactive (running)[[0m since Fri 1998-01-02 19:42:56<br>>> UTC; 38min ago<br>>>  Main PID: 1616 (obmc-console-se)<br>>>    CGroup: /system.slice/system-obmc\<br>>> x2dconsole.slice/obmc-console@ttyVUART0.service<br>>>            ©¸©¤1616 obmc-console-server --config /etc/obmc-console.conf<br>>> ttyVUART0<br>>> <br>>> Jan 02 19:42:56 haiguang1 systemd[1]: Started Phosphor Console Muxer<br>>> listening on device /dev/ttyVUART0.<br>>> 2) /etc/ obmc-console.conf<br>>> lpc-address = 0x3f8<br>>> sirq = 4<br>>> local-tty = ttyS0<br>>> local-tty-baud = 115200<br>>> <br>>> 2, Host OS: redhat 7<br><br>>What hardware platform is this?<br>My platform is AMD X86 platform.</div><div><br>>> It seemed to lock and output nothing when I run "obmc-console-client"<br>>> on BMC. And there is nothing in the log /var/log/obmc-console.log<br><br>>This doesn't necessarily indicate a problem with the BMC though - are<br>>you sure that the host is connecting something (like a getty) to its<br>>serial device? Is there something on the host side of the serial<br>>connection? (what are you expecting to see there?)<br><br>>If the host is definitely using up that serial console, this could<br>>either be an issue with the obmc-console infrastructure, or the UART<br>>devices.<br><br>>You can split up the debugging to eliminate parts of the stack there.<br>>Try:<br><br>>  - Stop obmc-console-server<br><br></div><div>>  - from the BMC, read directly from the VUART (say,<br>    `cat /dev/ttyVUART0`)<br><br>>  - from the host, write to the UART (`echo hello > /dev/ttyS0`, <br>    changing to whatever tty is connected to the BMC, if it isn't<br>    ttyS0.).<br><br>>If that works, then you know that the UART channel is OK, and it's<br>either obmc-console, or that nothing on the host is using that serial<br>port.<br>I tried the above instruments, but can't read anything on my BMC console screen. </div><div>My AST2500 hardware uses the following gpios to connect to host hardware :</div><div><div>GPIOF5_NRTS4_LHFRAME#</div><div>GPIOF6_TXD4_LHSIRQ#</div><div>GPIOF7_RXD4_LHRST#</div></div><div>so, I append uart4 in my .dts file: </div><div><div>&uart4 {</div><div>        status = "okay";</div><div>        pinctrl-names = "default";</div><div>        pinctrl-0 = <&pinctrl_txd4_default</div><div>                     &pinctrl_rxd4_default</div><div>                     &pinctrl_ncts4_default</div><div>                     &pinctrl_nrts4_default>;</div></div><div>and this is my bmc serials information:</div><div><div>root@haiguang1:~# cat /proc/tty/driver/serial                                                      </div><div>serinfo:1.0 driver revision:                                                                       </div><div>0: uart:16550A mmio:0x1E783000 irq:31 tx:0 rx:0  RTS|CTS|DTR|DSR|CD                               </div><div>1: uart:unknown port:00000000 irq:0                                                            </div><div>2: uart:unknown port:00000000 irq:0                                                            </div><div>3: uart:16550A mmio:0x1E78F000 irq:35 tx:0 rx:0                                      4: uart:16550A mmio:0x1E784000 irq:32 tx:14139 rx:383 RTS|CTS|DTR|DSR|CD                           </div><div>5: uart:16550A mmio:0x1E787000 irq:33 tx:0 rx:0 RTS|DTR</div></div><div><div>Here ,the uart4    tx:14139 rx:383 shows it has data flow.</div><div><br></div><div>root@haiguang1:~# stty -F /dev/ttyVUART0 -a                                                        </div><div>speed 9600 baud;stty: /dev/ttyVUART0                                                               </div><div> line = 0;                                                                                         </div><div>intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;              </div><div>swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;            </div><div>flush = ^O; min = 1; time = 0;                                                                     </div><div>-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts                                            </div><div>-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany     </div><div>-imaxbel -iutf8                                                                                    </div><div>-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0                   </div><div>-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke  </div><div><br></div><div>On host OS side:</div><div>#cat /proc/tty/device/serial</div><div><div>serinfo:1.0 driver revision:</div><div>0: uart:16450 port:000003F8 irq:4 tx:17204 rx:0 RTS|DTR|DSR|CD|RI</div><div>1: uart:16450 port:000002F8 irq:3 </div><div>2: uart:unknown port:000003E8 irq:4</div><div>3: uart:unknown port:000002E8 irq:3</div></div></div><div>[root@localhost ~]#stty -F /dev/ttyS0 -a</div><div><div>speed 9600 baud; rows 24; columns 80; line = 0;</div><div>intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;</div><div>eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;</div><div>werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;</div><div>-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts</div><div>-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff</div><div>-iuclc -ixany -imaxbel -iutf8</div><div>opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0</div><div>-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt</div><div>-echoctl -echoke</div></div><div>.</div><div>I  input the  following command on one host OS console:</div><div># mgetty -r -x 9 /dev/ttyS0 & </div><div># echo "123" > /dev/ttyS0</div><div>And on BMC side:</div><div># cat /dev/ttyVUART0</div><div>I can see nothing.</div><div>But the uart4 tx and rx number increased when do:</div><div> cat /proc/tty/device/serial</div><div>before:</div><div>4: uart:16550A mmio:0x1E784000 irq:32 tx:15416 rx:498 RTS|CTS|DTR|DSR|CD</div><div>after host input: echo "123" > /dev/ttyS0</div><div>4: uart:16550A mmio:0x1E784000 irq:32 tx:16171 rx:586 RTS|CTS|DTR|DSR|CD </div><div>Why can't I see nothing on bmc side?</div><div>Which serial parameter should I use in the BMC file etc/obmc-console.conf, BMC uart4 port or Host uart0?</div><div>Best,</div><div>Xiuzhi </div><div>>Regards,<br><br><br>>Jeremy<br><br></div>