i have BUART, but i want connect and read data from ping1d with other - FT232RL UART-USB, because i scare BUART broken, i oder it from foreign, take a long time.
I connect pin true, but it no have data in Hercules SETUP utility
Hi @XuanTrieu, welcome to the forum
Iâm not sure what you mean by this - I donât know what âHercules SETUP utilityâ is, or why it would be relevant.
Have you tried seeing if the sonar connects as expected to our Ping Viewer software?
If thatâs not working, can you provide some more information about your setup (e.g. a photo / detailed description) and how youâre trying to communicate with the sonar?
Hercules SETUP utility is useful serial port terminal (RS-485 or RS-232 terminal).
Hercules SETUP utility | HW-group.com
data sensor transmit will display in Hercules.
Ok, but the sensor communicates via ping protocol, and it only sends data when itâs asked to. If youâre connecting to the port with Hercules but not sending any messages then the sensor will just sit there waiting for requests.
A few questions/suggestions:
- Does the device get detected when you open Ping Viewer, or does it just search for devices and not find any?
- Is it showing up at a port in Windows Device Manager?
- Your power wiring looks correct, but the data wires arenât clear - if the device is showing up at a COM port but not connecting properly then it might be worth swapping RX and TX to in case theyâre the wrong way around.
how can i sent mensenger? i read ping1d messages but i donât understand it.
-
yes, but it look like not true. Must Ping1d be in water and depth min is 50 cm?
-
it is Serial port USB(COM8)
-
I think i connect true.
Itâs possible to use in air, but youâll need to turn on debug mode to be able to set the speed of sound to an appropriate value for air (outside of debug mode Ping Viewer restricts the speed of sound to values that make sense for water).
In water, yes. In air the minimum detectable distance is more like 35 cm.
The technical details outline the supported serial baud rates, the message protocol, the message subsets from the protocol, and link the three different code library implementations that allow you to construct, send, and receive Ping messages:
If youâre wanting to send messages directly (via your own program instead of Ping Viewer) then Iâd recommend using one of the provided libraries
Given itâs working in Ping Viewer, the connections should be fine
after 1 day read document, i understand like this. is it correct.
Q1. i donât see requesr_id and check_sum in code. it not necesscary?
Q2. Can i send message â0x42, 0x52, 0x02, 0x00, 0x04BB, 0x00, 0x00â to ping1d through the Hercules.
As per the protocol specification
In general, a checksum is a verification metric, used to help ensure a message has arrived without errors/modification.
Similarly to the documented negotiation example, if you wish to request a ping1d_distance_simple
(1211) message from the sonar, you can send a general_request
(6) to do so. The components for that would be
Value (HEX) | Value (decimal) | Type | Name | Notes | Send Bytes |
---|---|---|---|---|---|
0x42 | 66 | u8 | start1 | ASCII âBâ | 0x42 |
0x52 | 82 | u8 | start2 | ASCII âRâ | 0x52 |
0x0002 | 2 | u16 | payload_length | 0x02, 0x00 | |
0x0006 | 6 | u16 | message_id | general_request | 0x06, 0x00 |
0x00 | 0 | u8 | src_device_id | 0x00 | |
0x00 | 0 | u8 | dst_device_id | 0x00 | |
0x04BB | 1211 | u8[2] | payload | requested_id | 0xBB 0x04 |
0x015B | 347 | u16 | checksum | 0x5B 0x01 |
Note that the checksum is the sum of individual bytes, so for example 0x04BB
becomes 0x04 + 0xBB = 0xBF
.
Noting the little-endian format, the correct bytes sequence for that request message is
0x42
, 0x52
, 0x02
, 0x00
, 0x06
, 0x00
, 0x00
, 0x00
, 0xBB
, 0x04
, 0x5B
, 0x01
Is your virtual machine set up to connect to USB devices?
When I run Parallels on my Mac I generally need to select which machine gets access to each device that I plug in, and also need to give explicit permission for the virtual machine to access external hardware/ports. Iâm unsure whether there are similar constraints/requirements on Windows with VirtualBox.
i try write program in orangpi in armbian with NANO GNU:
from brping import Ping1D
p = Ping1D()
p.connect_serial(' /dev/ttyUSB0', 115200)
data = p.get_distance()
print("Distance: %s\tConfidence: %s%%" % (data["distance"], data["confidence"]))
when i try python3 pingtest.py
, it error not in connect_serial(). i run with example of pingâpython, it run good.
There shouldnât be a space in the '/dev/ttyUSB0'
string.
If thatâs not the cause of the issue, please specify the error message that youâre getting