c++ - How to send commend to device using QSerialPort -


i trying use qserialport information sonar(echorange smart sensor), have no experience in field. settings of portname, baudrate(4800,tested others rates), databits(8bit),flowcontrol(no),parity(no) , stopbits(two), can dataflow :

const qbytearray data=m_serialport->readall(); qdebug()<< qstring(data)

but output strange.

b'\x00\x00' b'[' b'\xd7\xd7\xd7uu\xed\xedn-\xd9\x95\xeb\xb7' b'ywewq' b'\xa7\x9b\x93\xa3\x8f' b'\x8d\xa7y\xab\x99' b'\x9d\xe5\xeb\x00'

but according nmea 0183 standard, should like:

$sddpt,...

i wonder if have send device command tell data emit. tested

m_serialport->write(qbytearray("$pamtc,en,all,1,5*hh"));

m_serialport->write(qbytearray("$sddpt"))

m_serialport->write(qbytearray("$--dbt,x.x,f,x.x,m,x.x,f*hh"))

nothing change, indicator light shows device receive signal.

could tell me how example depth data in protocol below? thank in advance! http://www.tronico.fi/oh6nt/docs/nmea0183.pdf enter image description here


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -