From owner-freebsd-java@freebsd.org Wed Dec 21 11:51:22 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C3FBC89906 for ; Wed, 21 Dec 2016 11:51:22 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A024A1228 for ; Wed, 21 Dec 2016 11:51:21 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id B4A502847E; Wed, 21 Dec 2016 12:51:18 +0100 (CET) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 5301E28471; Wed, 21 Dec 2016 12:51:17 +0100 (CET) Subject: Re: can't connect GPSport 245 with BT747 To: Achilleas Mantzios , freebsd-java@freebsd.org References: <5859B07F.1020403@quip.cz> <585A3148.7000507@matrix.gatewaynet.com> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <585A6CB5.8010608@quip.cz> Date: Wed, 21 Dec 2016 12:51:17 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <585A3148.7000507@matrix.gatewaynet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2016 11:51:22 -0000 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: at usbus1 >> kernel: uslcom0: 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 Miroslav LAchman