Date: Thu, 22 Dec 2016 10:23:03 +0200 From: Achilleas Mantzios <achill@matrix.gatewaynet.com> To: Miroslav Lachman <000.fbsd@quip.cz>, freebsd-java@freebsd.org Subject: Re: can't connect GPSport 245 with BT747 Message-ID: <585B8D67.8040304@matrix.gatewaynet.com> In-Reply-To: <585A6CB5.8010608@quip.cz> References: <5859B07F.1020403@quip.cz> <585A3148.7000507@matrix.gatewaynet.com> <585A6CB5.8010608@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21/12/2016 13:51, Miroslav Lachman wrote: > Achilleas Mantzios wrote on 2016/12/21 08:37: >> On 21/12/2016 00:28, Miroslav Lachman wrote: >>> I have Holux GPSport 245 (gps tracker). It uses USB connection with >>> serial (COM) emulation. It worked on Windows with Java based >>> application BT747 http://www.bt747.org/webinstall >>> But I can't use it on my FreeBSD 10.3 based desktop PC (PC-BSD) >>> I installed package comms/rxtx. >>> >>> Device is identified as >>> >>> kernel: ugen1.4: <Silicon Labs> at usbus1 >>> kernel: uslcom0: <CP2102 USB to UART Bridge Controller> on usbus1 >>> >>> These devices are created under /dev/ >>> >>> ugen1.4 >>> >>> ttyU0.lock >>> ttyU0.init >>> ttyU0 >>> >>> cuaU0.lock >>> cuaU0.init >>> cuaU0 >>> >>> BT747 cannot connect with this device. If I enabled "GPS connection >>> debug" in settings I see this trace: > > [...] > >>> >>> >>> I don't know where ports should be configured for Java based >>> applications. >>> >>> I tired to create symlinks like tty.usbserial@ -> cuaU0 >>> or ttyUSB0@ -> cuaU0 but BT747 still doesn't see any GPS device / port. >>> >>> Can somebody help me with this problem? >>> >> >> Try to get pure serial output from the port before anything else. Unless >> you are able to identify your port and do : >> # cat /dev/ttyXYZ >> and see NMEA stream, then you won't succeed with any java (or other) app. > > It works, I can connect to the device. Just the java app cannot. > > > sudo cu -l /dev/cuaU0 -s 38400 > Password: > Connected > $GPGGA,003530.800,8960.0000,N,00000.0000,E,0,0,,137.0,M,13.0,M,,*4E > $GPGSA,A,1,,,,,,,,,,,,,,,*1E > $GPGSV,1,1,00*79 > $GPRMC,003530.800,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,,,N*73 > $GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32 > $GPGGA,003531.800,8960.0000,N,00000.0000,E,0,0,,137.0,M,13.0,M,,*4F > $GPGSA,A,1,,,,,,,,,,,,,,,*1E > $GPGSV,1,1,00*79 > $GPRMC,003531.800,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,,,N*72 > $GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32 > $GPGGA,003532.800,8960.0000,N,00000.0000,E,0,0,,137.0,M,13.0,M,,*4C > $GPGSA,A,1,,,,,,,,,,,,,,,*1E > > > > sudo cu -l /dev/ttyU0 -s 38400 > Password: > Connected > $GPGGA,000044.799,8960.0000,N,00000.0000,E,0,0,,137.0,M,13.0,M,,*44 > $GPGSA,A,1,,,,,,,,,,,,,,,*1E > $GPGSV,1,1,00*79 > $GPRMC,000044.799,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,,,N*79 > $GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32 > $GPGGA,000045.799,8960.0000,N,00000.0000,E,0,0,,137.0,M,13.0,M,,*45 > $GPGSA,A,1,,,,,,,,,,,,,,,*1E > $GPGSV,1,1,00*79 > > > I noticed that ttyU0 and cuaU0 are not accessible by my user so I changed permissions to 0666 but BT747 still don't see them: > > 24340 - isValidPort('/dev/cu.serial-0001')?: false -1 > 24341 - isValidPort('/dev/cu.SLAB_USBtoUART')?: false -1 > 24341 - isValidPort('/dev/cu.iBTAGPS-SPPslave')?: false -1 > 24341 - isValidPort('/dev/cu.usbmodem1b10')?: false -1 > 24341 - isValidPort('/dev/cu.usbmodem1d10')?: false -1 > 24341 - isValidPort('/dev/cu.usbmodem3d10')?: false -1 > 24342 - isValidPort('/dev/cu.usbmodem3a20')?: false -1 > 24342 - isValidPort('/dev/cu.usbmodem620')?: false -1 > 24342 - isValidPort('/dev/cu.usbmodemfd110')?: false -1 > 24342 - isValidPort('/dev/tty.usbmodemfd110')?: false -1 > 24342 - isValidPort('/dev/tty.usbmodemfd510')?: false -1 > 24344 - isValidPort('/dev/tty.usbserial')?: false -1 > Info: trying to open 'null' > > I don't know where these strange device names come from. If they are from rxtx package or BT747 itself and I don't know where to change them to /dev/cuaU0 or /dev/ttyU0 Some thoughts : - tweak /etc/devfs.conf - run your java app as root - run gpsd so that you can connect as a normal TCPIP client, making your app portable to many platforms > > Miroslav LAchman -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?585B8D67.8040304>