Topics

configure tnc-pi on polaric server(java app)


k - HJ4JGG
 

hi
i am configuring an app called polaric server, it's like a APRS node whit web interface and other functionalities. a java app.
using a TNC-PI v1 connected to a Rpi3b+, via serial port.

i can access to tncpi via serial0
https://user-images.githubusercontent.com/44566/96772497-d55ce300-13a8-11eb-98c3-e82308866790.png

the java app can not access the port serial0

error 
-----
okt. 21 14:19:10 ERROR (TncChannel): [rf0] Serial port /dev/serial0 not found gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269) at no.polaric.aprsd.TncChannel.connect(TncChannel.java:105) at no.polaric.aprsd.TncChannel.run(TncChannel.java:153) at java.base/java.lang.Thread.run(Thread.java:834
----

here port serial0 permission
https://user-images.githubusercontent.com/44566/96772411-b52d2400-13a8-11eb-874f-d0d5e627c5a2.png

How is the correct way to configure the port permissions so that the java application can access the port?

about polaric server
http://aprs.no/dokuwiki/doku.php/polaricserver
https://github.com/PolaricServer

Thanks for the help
juan
HJ4JGG


Jim WB9QPM
 

What speed are you using to talk to the PITNC?

Try 19200


k - HJ4JGG
 

hi

yes im using 19200

image.png


El jue., 22 oct. 2020 a las 8:16, Jim WB9QPM via groups.io (<jhudson1=consolidated.net@groups.io>) escribió:
What speed are you using to talk to the PITNC?

Try 19200






k - HJ4JGG
 

i just try to use symlink  from ttyS0  to serial0  and get this error

---
okt. 22 08:38:48 ERROR (TncChannel): [rf0] Port /dev/ttyS0 is currently in use
okt. 22 08:39:25 INFO (KissTncChannel): [rf0] Closing channel
okt. 22 08:39:26 INFO (TncChannel): [rf0] Channel closed
okt. 22 08:39:28 INFO (TncChannel): [rf0] Activating...
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: El fichero yaokt. 22 08:39:28 ERROR (TncChannel): [rf0] Serial port /dev/ttyS80 not found
gnu.io.NoSuchPortException

        at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269)
        at no.polaric.aprsd.TncChannel.connect(TncChannel.java:105)
        at no.polaric.aprsd.TncChannel.run(TncChannel.java:153)
        at java.base/java.lang.Thread.run(Thread.java:834)
okt. 22 08:39:45 INFO (KissTncChannel): [rf0] Closing channel
okt. 22 08:39:48 INFO (TncChannel): [rf0] Activating...
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: El fichero yaokt. 22 08:39:48 ERROR (TncChannel): [rf0] Serial port /dev/ttyS0 not found
-----


El jue., 22 oct. 2020 a las 8:32, k - HJ4JGG via groups.io (<kalashnikov=compelect.com.co@groups.io>) escribió:
hi

yes im using 19200

image.png


El jue., 22 oct. 2020 a las 8:16, Jim WB9QPM via groups.io (<jhudson1=consolidated.net@groups.io>) escribió:
What speed are you using to talk to the PITNC?

Try 19200






N5XMT
 

Symlinks are already set up by the raspberry pi OS.  You should have 2, /dev/ttyAMA0, and /dev/ttyS0.  One should point to /dev/serial0 and the other to /dev/serial1

On Oct 22, 2020, at 07:04, "k - HJ4JGG via groups.io" <compelect.com.co@groups.io target=_blank>kalashnikov=compelect.com.co@groups.io> wrote:
i just try to use symlink  from ttyS0  to serial0  and get this error

---
okt. 22 08:38:48 ERROR (TncChannel): [rf0] Port /dev/ttyS0 is currently in use
okt. 22 08:39:25 INFO (KissTncChannel): [rf0] Closing channel
okt. 22 08:39:26 INFO (TncChannel): [rf0] Channel closed
okt. 22 08:39:28 INFO (TncChannel): [rf0] Activating...
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: El fichero yaokt. 22 08:39:28 ERROR (TncChannel): [rf0] Serial port /dev/ttyS80 not found
gnu.io.NoSuchPortException

        at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269)
        at no.polaric.aprsd.TncChannel.connect(TncChannel.java:105)
        at no.polaric.aprsd.TncChannel.run(TncChannel.java:153)
        at java.base/java.lang.Thread.run(Thread.java:834)
okt. 22 08:39:45 INFO (KissTncChannel): [rf0] Closing channel
okt. 22 08:39:48 INFO (TncChannel): [rf0] Activating...
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: El fichero yaokt. 22 08:39:48 ERROR (TncChannel): [rf0] Serial port /dev/ttyS0 not found
-----

El jue., 22 oct. 2020 a las 8:32, k - HJ4JGG via groups.io (<kalashnikov=compelect.com.co@groups.io>) escribió:
hi

yes im using 19200




El jue., 22 oct. 2020 a las 8:16, Jim WB9QPM via groups.io (<jhudson1=consolidated.net@groups.io>) escribió:
What speed are you using to talk to the PITNC?

Try 19200






David Ranch
 


I have a few ideas for you since you sited you have the TNC-Pi running in serial port mode to a Rpi 3B+:


1) You listed the permissions of /dev/serial0 but that's only a symlink.  What is the permissions of /dev/ttyS0?

2) Is the serial console function on your Rpi still enabled if you're using the TNC-Pi in serial mode?  It must be disabled to not interfere in communicating with the TNC-Pi

3) Your cited error of "RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: El fichero yaokt. 22 08:39:28 ERROR (TncChannel): [rf0] Serial port /dev/ttyS80 not found"
talks about port /dev/ttyS80.  Why S80?  Is that a typo in your config?  Typo in your error report?

4) For the Unix account you're logged into, is it apart of the "dialout" group?  This is commonly required when not running programs via the root account.

5) Did you disable bluetooth and reconfigure the hardware BCM serial port to connect to the GPIO header?  https://www.raspberrypi.org/forums/viewtopic.php?t=253552

6) What distribution are you running on your Raspberry Pi?  Do you have gpsd or modem-manager installed?  Either of these might be trying to take over the serial port by default.


--David
KI6ZHD



On 10/22/2020 06:43 AM, k - HJ4JGG via groups.io wrote:
i just try to use symlink  from ttyS0  to serial0  and get this error

---
okt. 22 08:38:48 ERROR (TncChannel): [rf0] Port /dev/ttyS0 is currently in use
okt. 22 08:39:25 INFO (KissTncChannel): [rf0] Closing channel
okt. 22 08:39:26 INFO (TncChannel): [rf0] Channel closed
okt. 22 08:39:28 INFO (TncChannel): [rf0] Activating...
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: El fichero yaokt. 22 08:39:28 ERROR (TncChannel): [rf0] Serial port /dev/ttyS80 not found
gnu.io.NoSuchPortException

        at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269)
        at no.polaric.aprsd.TncChannel.connect(TncChannel.java:105)
        at no.polaric.aprsd.TncChannel.run(TncChannel.java:153)
        at java.base/java.lang.Thread.run(Thread.java:834)
okt. 22 08:39:45 INFO (KissTncChannel): [rf0] Closing channel
okt. 22 08:39:48 INFO (TncChannel): [rf0] Activating...
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: El fichero yaokt. 22 08:39:48 ERROR (TncChannel): [rf0] Serial port /dev/ttyS0 not found
-----

El jue., 22 oct. 2020 a las 8:32, k - HJ4JGG via groups.io (<kalashnikov=compelect.com.co@groups.io>) escribió:
hi

yes im using 19200

image.png


El jue., 22 oct. 2020 a las 8:16, Jim WB9QPM via groups.io (<jhudson1=consolidated.net@groups.io>) escribió:
What speed are you using to talk to the PITNC?

Try 19200







Randy Greig
 

Is it possible that the port is open in another application and java just says that it cannot find it?

Randy
VE3YRG



On Thu, Oct 22, 2020 at 8:55 AM k - HJ4JGG via groups.io <kalashnikov=compelect.com.co@groups.io> wrote:

hi
i am configuring an app called polaric server, it's like a APRS node whit web interface and other functionalities. a java app.
using a TNC-PI v1 connected to a Rpi3b+, via serial port.

i can access to tncpi via serial0
https://user-images.githubusercontent.com/44566/96772497-d55ce300-13a8-11eb-98c3-e82308866790.png

the java app can not access the port serial0

error 
-----
okt. 21 14:19:10 ERROR (TncChannel): [rf0] Serial port /dev/serial0 not found gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269) at no.polaric.aprsd.TncChannel.connect(TncChannel.java:105) at no.polaric.aprsd.TncChannel.run(TncChannel.java:153) at java.base/java.lang.Thread.run(Thread.java:834
----

here port serial0 permission
https://user-images.githubusercontent.com/44566/96772411-b52d2400-13a8-11eb-874f-d0d5e627c5a2.png

How is the correct way to configure the port permissions so that the java application can access the port?

about polaric server
http://aprs.no/dokuwiki/doku.php/polaricserver
https://github.com/PolaricServer

Thanks for the help
juan
HJ4JGG


k - HJ4JGG
 

hi

Randy:VE3YRG
Yes, this is one of the problems that I detect.

you cannot use pitnc_getparams or pitnc_setparams if RF is enabled on the polaric server. This will generate conflict with the port.
if you use it, polaric is not able to open it because there is a lock file from another application.

N5XMT
yes  it take me some time to get this 
im using
/dev/ttyS0  thats point to serial0

David:KI6ZHD
2. 5.    yes i enable serial port and disable serial console, so i can access tnc pi  ,
3. ttysS80 was a test to simlink another number. . . . . .
4. it's definitely a ports/user/group problem
6.
Last, no graphical environment, only console

1.
actual working permissions

it is currently working, but I really don't know which of all the changes was the solution. : D
I attach the .bash_history    here all the log   https://pastebin.com/raw/wT3HuLPe

these are the changes that i think helped fix the problem.

sudo chmod 666 /dev/serial0
sudo chown root:polaric /dev/serial0
sudo usermod -aG uucp polaric
sudo usermod -aG uucp pi
sudo chmod o+rw /dev/ttyS0


I'm going to do another laboratory to configure another rpi with tnc_pi and verify in order which commands should be used, or if there is no need to make any changes in the configuration: S

here current setup https://www.flickr.com/photos/atarvaneitor/50520108011/

Thanks for the help

pd: here a ppt about polaric APRS server
http://elafargue.github.io/aprs-box/

El 22/10/2020 a las 9:39 a. m., Randy Greig escribió:
Is it possible that the port is open in another application and java just says that it cannot find it?





On Thu, Oct 22, 2020 at 8:55 AM k - HJ4JGG via groups.io <kalashnikov=compelect.com.co@groups.io> wrote:

hi
i am configuring an app called polaric server, it's like a APRS node whit web interface and other functionalities. a java app.
using a TNC-PI v1 connected to a Rpi3b+, via serial port.

i can access to tncpi via serial0
https://user-images.githubusercontent.com/44566/96772497-d55ce300-13a8-11eb-98c3-e82308866790.png

the java app can not access the port serial0

error 
-----
okt. 21 14:19:10 ERROR (TncChannel): [rf0] Serial port /dev/serial0 not found gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269) at no.polaric.aprsd.TncChannel.connect(TncChannel.java:105) at no.polaric.aprsd.TncChannel.run(TncChannel.java:153) at java.base/java.lang.Thread.run(Thread.java:834
----

here port serial0 permission
https://user-images.githubusercontent.com/44566/96772411-b52d2400-13a8-11eb-874f-d0d5e627c5a2.png

How is the correct way to configure the port permissions so that the java application can access the port?

about polaric server
http://aprs.no/dokuwiki/doku.php/polaricserver
https://github.com/PolaricServer

Thanks for the help
juan
HJ4JGG