APWeb no data is being received from the Ardupilot

Hi
I tried building this https://github.com/ArduPilot/APWeb in Ubuntu xenial running in WSL (windows sub system of linux windows 10 ) successfully.
its runs without error with below command

sudo ./web_server -p 80 -s /dev/ttyS3 -b 115200

But the web interface is not fetching any data.

Please let me know what I am missing

I am double sure about the com ports.

Thanks

I tried building this GitHub - ArduPilot/APWeb: ArduPilot web server interface in Ubuntu xenial
running in WSL (windows sub system of linux windows 10 ) successfully.
its runs without error with below command

sudo ./web_server -p 80 -s /dev/ttyS3 -b 115200

But the web interface is not fetching any data.

Are you sure of the baud rate? Can you connect mavproxy to the same port
and get data? How about screen(1)?

Also, Linux/POSIX improvements by peterbarker · Pull Request #8 · ArduPilot/APWeb · GitHub will probably make
things work much better for you - and I’d appreciate independant testing
of that PR!

Hi Peterbarker,
Thanks for a quick reply. Also you have put in lot of efforts into that branch.
I tried using your branch now. One thing I noted was returning response.

"http://127.0.0.1/ajax/sysinfo.json" { "uptime": 0, "free_mem_dma": 0, "free_mem_kernel": 0, "fc_mavlink_count": 0, "fc_mavlink_baudrate": 115200 }

baud rates are ok as it works with the same with pymavlink, mission planner and q ground control.

Also I tried some debugging with some printf and I found code is not crossing this line
https://github.com/ArduPilot/APWeb/blob/master/web_server.c#L560
and when I print the buffer I get some sequences of question mark characters().

Also Note that my hardware is APM 2.5 with ArduCopter V3.2.1 (36b405fb) firmware
Free RAM: 1999
Fw Ver: 120

baud rates are ok as it works with the same with pymavlink, mission planner and q ground control.

Good stuff.

Also I tried some debugging with some printf and I found code is not crossing this line

I assume, then the read() call is returning bytes?

The line you’ve highlighted will return true if a packet has been found in
the input stream. Pretty much the only thing that could be wrong in that
case would be a serial settings mismatch - perhaps we’re not setting the
serial port up correctly.

Can you run “stty </dev/ttyS3” after (successfully) running MAVProxy on
the port, and again after (presumably unsuccessfully…) running APWeb on
the port, please?

Peter

Wish Every one a Happy New Year

@peterbarker
I tried out this one

just updating baud rates to 115200 to the command they had in above link.
And it worked magically.

I guess it was a port that was not configured correctly.

Thanks a lot for your Help.

PS: your modification branch does work real good I would say it can be merged.