This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RS485 USB - SignalK NMEA Serial input log
#1
Hi,

I have connected a depth sounder to an RS485 USB dongle to the Raspberry pi.
It works when I check with this command:

Code:
sudo screen /dev/ttyUSB2 4800

Sudo cat is also fine by the way. It only works with baudrate 4800 by the way.

It outputs this:


Code:
pi@openplotter:~ $ sudo cat /dev/ttyUSB2
SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28

I have tried assigning the serial port within OP to Kplex as an input.
I also tried the other way, manually add a serial connection in SignalK for port /dev/ttyUSB2 with the correct baudrate: 4800
In addition to this I've set the SignalK NMEA converter plugin to check the depth sentences.

However, there is no SignalK sentence being generated, and no value for the depth.
The log for the connection says this:


Code:
Mar 29 11:51:51 false
Mar 29 11:51:51 initing!
Mar 29 11:51:51 nmea0183
Mar 29 11:51:51 Error: Device or resource busy, cannot open /dev/ttyUSB2


It only has the "cannot open" error when I check the "checksum logging" for the connection.
I have de-assigned the serial in OP to none, so I know the port is not being used by any other process.

Anybody have any idea how i can get the depth sounder to work? I feel I am getting close.

Kind regards,

Jamos
Reply
#2
I you do not you get data without using sudo you have a permission problem.

kplex or SK use the default user.
Reply
#3
(2020-03-30, 07:17 PM)Sailoog Wrote: I you do not you get data without using sudo you have a permission problem.

kplex or SK use the default user.

Dear Sailoog, thank you for your answer.
I think you're right. Tested it by de-assigning the serial port again, performing the command with and without sudo:


Code:
pi@openplotter:~ $ cat /dev/ttyUSB2
cat: /dev/ttyUSB2: Device or resource busy
pi@openplotter:~ $ sudo cat /dev/ttyUSB2
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28


Do you have an idea of how I can solve this? I don't know what process is using the serial port even though it is not being assigned in OP.
I don't know how to give the "extra" permission to the default user.

Hope you can help me out.
Reply
#4
Hello, 

you should add ONE serial input ONLY to ONE App!

1.
Before kplex the only way to include serial input was SignalK.Server. The setting seems okay, but be shure to set the config there to "NMEA0183". I am not shure if the BAUD rate will matter, but 4800 is the lowest Standard here. If you get correct Data it is okay. For USB-GPS i use 4800 or 19200 normally. Most USB-devices set the Rate someway automatically.

2.
Your Depth NMEA Data looks some way disturbed, the Depth Numbers should be readable as Numbers in the Data, in your date there are empty ", , ,7, ,M ". It should look as something like: "xxx,1,4,M,yyy" for 1,4 Meter.
Otherwise the $SDDxxxand the Checksum at the End is correct, so your Baudrate is ok. Is your Boat swimming or on Drydock?


3.
I would alias your USBxxx to something more readable in OP-Serial: usb.depth.
Then in OP-Serial connect it with NMEA0183 with 4800Baud to signalk. 
No setting in kplex. No other connections to this port.

If you see the Dxxx Strings in OpenCPN NMEA Monitor all is correct. 
If you don´t see the Depth Data then the Problem is in the Sensor itself (No Water, dirty etc.)

Good Look
Reply
#5
(2020-03-31, 09:59 AM)holgerw Wrote:
Quote:you should add ONE serial input ONLY to ONE App!

I'll make sure that this is the case.

Quote:1.
Before kplex the only way to include serial input was SignalK.Server. The setting seems okay, but be shure to set the config there to "NMEA0183". I am not shure if the BAUD rate will matter, but 4800 is the lowest Standard here. If you get correct Data it is okay. For USB-GPS i use 4800 or 19200 normally. Most USB-devices set the Rate someway automatically.

The dongle supports more baudrate, but it only shows the data with cad or screen when I set it to 4800.

Quote:2.
Your Depth NMEA Data looks some way disturbed, the Depth Numbers should be readable as Numbers in the Data, in your date there are empty ", , ,7, ,M ". It should look as something like: "xxx,1,4,M,yyy" for 1,4 Meter.
Otherwise the $SDDxxxand the Checksum at the End is correct, so your Baudrate is ok. Is your Boat swimming or on Drydock?

Good one! It's on a dry dock, I thought it might be broken or something, does it need to be in the water to work optimally?

Quote:3.
I would alias your USBxxx to something more readable in OP-Serial: usb.depth.
Then in OP-Serial connect it with NMEA0183 with 4800Baud to signalk. 
No setting in kplex. No other connections to this port.

Will try it!
Quote:If you see the Dxxx Strings in OpenCPN NMEA Monitor all is correct. 
If you don´t see the Depth Data then the Problem is in the Sensor itself (No Water, dirty etc.)

I hear the sensor clicking, but the data usually doesn't come up with numbers as in your example. And if it does, it's a wrong number. But, maybe this has to do with the fact I am on drydock at the moment.


Quote:Good Look


Thanks for your answers! I'll keep trying and report back.

I've tried all the suggestions. I only have the serial connection in SignalK, I tried the serial connection for the OP friendly name and the USB path with the 4800 baudrate. When saving the connection the "claim error" still came, even after restarting SignalK. Only after a reboot of the raspberry does the error go away. It doesn't give the error after that, but it doesn't report a plugin status also, only the connection activity is shown but no plug-in status.

There is no number of deltas/second for the connection reported, so I guess no signalk sentence is created.
In OpenCPN when adding the depth, it constantly says 999m and sometimes 63m. In the OpenCPN NMEA stream I cannot see any depth sentences coming through.

Starting to have the idea the sensor might be broken, or that it doesn't work on shore. I'll try to fill a bucket with water then Big Grin

Jup, it was the fact that it doesn't work on land... duuh!
Bucket with water and sentences come through immediately. You can hear also a more constant tick sound. The slow ticks are more of a probing thing i think, more constant ticks are real soundings coming through. Feel a little bit stupid...
Reply
#6
Congrats - it worked.

If it is not any problem, i would like if you post some Excerpt from your correct
NMEA Data here - to help others.


Keep well in C-Times.
Holger
Reply
#7
No problem at all:

Wrong:

$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28
$SDDPT,,*57
$SDDBT,,f,,M,,F*28

Correct:

$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04
$SDDPT,0.3,*7A
$SDDBT,1.2,f,0.3,M,0.2,F*04

Stay safe as well Wink

Kind regards, Jamos
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)