Re: [Ser2net-devel] logging with telnet looks garbled
Brought to you by:
cminyard
|
From: Brian V. <bri...@br...> - 2018-08-01 17:50:40
|
Sorry for the delay. Finally got some time to look at this. I found an issue in the handle_dev_fd_read() function. The tracing is assuming we are always at the start of the buffer, it needs to be incremented by curend. currently the code does this: do_trace(port, port->tr, port->dev_to_net.buf, count, SERIAL); it should look like this: do_trace(port, port->tr, port->dev_to_net.buf+curend, count, SERIAL); Also, the "dev-to-net-bufsize" parameter in the config file is not having any effect. No matter what I set it to, I always see the default 64 when I print out "port->dev_to_net.maxsize" within that same "handle_dev_fd_read()" function. I'm not sure the correct way to fix this. Let me know what you think. Again, this is all based on 3.5 code. Thanks, -Brian V. On Thu, Jul 26, 2018 at 10:01 AM, Brian Varney <bri...@br...> wrote: > Sorry, I plan to get back to it, but it could be a few days. I'll > definitely send an update when I get it resolved, but at this point since > nobody else has this problem, I am most likely just doing something wrong. > > -Brian V. > > On Thu, Jul 26, 2018 at 6:40 AM, Corey Minyard <mi...@ac...> wrote: > >> On 07/20/2018 08:44 AM, Brian Varney wrote: >> >>> Thanks for the response. I'm running 3.5, which looks like the latest. >>> >>> I should mention that the actual telnet session looks correct. It is >>> just the log file that is garbled. >>> >>> Can others confirm that telnet logs look correct on 3.5? That would be a >>> good data point. >>> >>> Such a strange problem. I'll start adding some debug prints to the code >>> to try to work out what is happening. I just thought I'd throw it out here >>> first to see if anybody has seen this before. >>> >>> >> Any resolution on this? I still can't see anything. >> >> -corey >> >> Thanks, >>> Brian V. >>> >>> >>> >>> >>> >>> On Fri, Jul 20, 2018 at 6:10 AM, Corey Minyard <mi...@ac... <mailto: >>> mi...@ac...>> wrote: >>> >>> On 07/19/2018 11:51 AM, Brian Varney via Ser2net-devel wrote: >>> >>> Hello all, >>> >>> When I use "raw" mode, the logs created by ser2net look as >>> expected. When I switch to telnet mode, the log looks garbled. >>> >>> >>> *from ser2net.conf:* >>> >>> TRACEFILE:tr1:/var/log/uart_logs/uart-\d.log >>> 3051:raw:0:/dev/ttyUSBport1:115200 NONE 1STOPBIT 8DATABITS >>> tr=tr1 >>> >>> >>> >>> *snippet from the log file in raw mode:* >>> >>> %iop >>> iop -- IOP Commands >>> iop arm ARM CPU Specific Commands >>> iop rd Read Dword(s): <iop rd Address >>> [NumDwords]> >>> iop rb Read Bytes(s): <iop rb Address >>> [NumBytes]> max of 16, shown in ascending order >>> iop wr Write Dword: <iop wr Address Data> >>> iop wnr Write Dword No Readback: <iop wnr >>> Address >>> Data> >>> iop rmw Read-Modify-Write Word: <iop rmw >>> Address >>> Data Mask> (1 in mask means write bit, 0 = don't write) >>> iop xget Download buffer from Host or >>> Local Memory >>> >>> >>> >>> *snippet from the log file after changing raw-->telnet in >>> ser2net.conf* >>> >>> %iop >>> iop -- IOP Commands >>> iop arm mmands >>> iop ammands >>> mmanmmmiop rd Read Dwordiop rd iop rd iop >>> ioi]> >>> iop rb Rea]> >>> iop rb ]> >>> i]> >>> ]>]mBytes]> max of 16, shown in ascmBytes]> max of >>> mBytes]>mBytmBm Write Dword: <iop wr Add Write Dw >>> Write Dword No Readback: < Write Dwor Wr >>> mw Read-Modify-Wrimw mw mw mwmMask> (1 in >>> mask means write bitMask> (1 in maskMask> (iop xget >>> Download biop xget iop xgetiop >>> >>> >>> Anybody know what is going on here? I'd prefer to use telnet >>> mode but need to get past this issue. >>> >>> >>> I'm not sure. What version of ser2net are you using? If it's not >>> the latest, can you try that? >>> >>> Tracing does happen on the network side, not the device side, >>> though that shouldn't matter here. >>> >>> -corey >>> >>> Thanks, >>> Brian V. >>> >>> >>> >>> >> > |