Sending lidar data from pixhawk to raspberry pi

Hello. I needed some help in communicating the Pixhawk with the raspberry pi. I have successfully set up the wireless connection using this link ( This was done so that I can remove the pi from my drone (and make it lighter). The drone also has an RPLidar A1 which was connected to the pi initially but now my only option is for it to be connected to the pixhawk.
I am planning to control the drone using a python file (localizing will be done after reading the lidar data). I can connect the lidar to the pixhawk using the following connection diagram in this link ( My question is, how do I send the data read (of the lidar) from the pixhawk in my python file (I am using dronekit to control it).

Thank you very much. On mission planner when I go to the messages tab it gives me this for the firmware:

2/5/2020 12:56:22 PM : u-blox 1 HW: 00070000 SW: 1.00 (59842)
2/5/2020 12:56:18 PM : PX4v3 00220028 33355119 38393235
2/5/2020 12:56:18 PM : Frame: OCTA_QUAD
2/5/2020 12:56:18 PM : PX4: 0384802e NuttX: 1bcae90b
2/5/2020 12:56:18 PM : APM:Copter V3.5.5 (27229c83)

You can get a stripped down data from proximity message that is concatening scan distances in 8 directions and send back to ground station.

But you will loose the resolution required for any type of SLAM configuration.

Yes that is fine too if i can get 8 readings. Can you please guide me on how to access these readings. If there is a link then that would be perfect.
Thanks a lot!!

Look at the wiki for proximity and avoidance