I am trying to connect Ping Sonar to Raspberry Pi, and this Raspberry is connected to the Topside Computer via Ethernet. The Raspberry has the Companion software installed v0.0.17, and it is also connected to Pixhawk. The sonar is connected to the Raspberry with the BLUART adapter.
I have followed all the steps to create the endpoints and routings, creating a bidirectional connection between the UDP adress 192.168.2.2:9090 and the Serial port correspondent to the Ping Sonar with a Baud Rate of 115200.
When trying to display the results of the sonar in PingViewer, I select UDP connection with the adress mentioned above, and I cannot see any results. Otherwise, this configuration works when I try the PingViewer connecting directly the sonar to the Serial port of the computer.
I have checked all the cables and connections, and I can ping the Raspberry from the topside computer.
Am I missing something to start the communication? Can you guess where the problem comes from?
The Ping Sonar should be plug and play, there is no need to do additional routing. It is possible that the route you made is conflicting with the driver built into the Companion.
I removed the additional routing and now the connection works. The problem now is that the sensor only measures few times until it is stopped. The white led (RX) is blinking every moment, but the green one (TX) stops blinking when Ping Viewer stops measuring. When this happens I need to restart both Ping Viewer and the RaspberryPi.
I think it should be a problem of the green cable (TX), its connection between male and female is quite unstable. However, it seems to me quite strange that the program is running correctly when I connect the sonar directly to the serial port of my PC. When I try to do the communication through the Raspberry, it suddenly stops.
From the log, it appears that after some time the sensor is not replying anymore.
Are you using this same cable in your desktop to test ?
I would recommend to create a new cable or to connect with the cable in your computer and move and poke the cable to check that is working without bad connection.