Access to a Serial Port using Java RXTX library

Jenny Murphy jenny.murphy at episensor.com
Thu Sep 8 09:07:38 UTC 2016


Just one final update on this.

For 64 bit architectures it is very important to build the sources from the
rxtx-2.2pre2 release.

Using the older 2.1-7r2 version you will run into the following problem
when serial communication starts :

# A fatal error has been detected by the Java Runtime Environment:


#  SIGSEGV (0xb) at pc=0x00007fb8b4caec4b, pid=5401, tid=140431283873536


# Problematic frame:

# C  [librxtxSerial.so+0x6c4b]  read_byte_array+0x3b

But it is solved in  rxtx-2.2pre2.
My serial comms are working great now.


On 7 September 2016 at 15:06, Loïc Minier <loic.minier at ubuntu.com> wrote:

> Great; now we even have google juice for other people trying to use RXTX
> with snaps, thanks!  :-)
>
> On Wed, Sep 7, 2016 at 4:04 PM, Jenny Murphy <jenny.murphy at episensor.com>
> wrote:
>
>> Hi,
>> No, actually the configure file in RXTX needed to be modified to support
>> java 1.7 :
>>
>>
>> case $JAVA_VERSION in
>> 1.2*|1.3*|1.4*|1.5*)
>> #fix_parameters $JPATH/jre/lib/javax.comm.properties
>> CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head
>> -n1`
>> RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
>> JHOME=$JPATH/"jre/lib/ext"
>>
>> So the paths were not being set up correctly for me.
>>
>> I changed it to
>> case $JAVA_VERSION in
>> 1.2*|1.3*|1.4*|1.5*|1.7*)
>>
>> Thanks a million for your suggestion.
>>
>> Jenny
>>
>>
>> On 7 September 2016 at 15:01, Loïc Minier <loic.minier at ubuntu.com> wrote:
>>
>>> Hi,
>>>
>>> I'm guessing the Java version change solved the rebuilding problem?
>>>
>>> Cheers,
>>> - Loïc Minier
>>>
>>> On Wed, Sep 7, 2016 at 3:32 PM, Jenny Murphy <jenny.murphy at episensor.com
>>> > wrote:
>>>
>>>> Hi all,
>>>>  This is solved . The problem was to do with the Java versions
>>>> supported by RXTX.
>>>> Jenny
>>>>
>>>> On 7 September 2016 at 12:51, Jenny Murphy <jenny.murphy at episensor.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>  I am having some difficulty building RXTX (get unsatisfied link
>>>>> errors with the new shared objects and jar file).
>>>>> Is there an other alternative to workaround my original problem with
>>>>> the permissions to use lock file?
>>>>> Thanks.
>>>>>
>>>>>
>>>>> On 6 September 2016 at 12:48, Loïc Minier <loic.minier at ubuntu.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Jenny,
>>>>>>
>>>>>> The INSTALL file
>>>>>> <https://github.com/rxtx/rxtx/blob/development/INSTALL> suggests
>>>>>> that RXTX implements custom locking which requires OS integration; because
>>>>>> you want your app to be the only one accessing the serial port(s), you
>>>>>> should build RXTX with --disable-lockfiles to disable this feature of the
>>>>>> library.
>>>>>>
>>>>>> Cheers,
>>>>>> - Loïc
>>>>>>
>>>>>> On Tue, Sep 6, 2016 at 1:34 PM, Jenny Murphy <
>>>>>> jenny.murphy at episensor.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>  I have a java application running in a .snap package.
>>>>>>> The java application is going to access the serial port and uses the
>>>>>>> RXTX Java library to do this. The RXTX jar is included in the .snap.
>>>>>>>
>>>>>>> When it runs I get the following error :
>>>>>>>
>>>>>>> check_group_uucp(): error testing lock file creation Error
>>>>>>> details:Permission deniedcheck_lock_status: No permission to create lock
>>>>>>> file.
>>>>>>> please see: How can I use Lock Files with rxtx? in INSTALL
>>>>>>>
>>>>>>>
>>>>>>> Anyone have any experience of this ?
>>>>>>>
>>>>>>> Thanks in advance.
>>>>>>> Jenny
>>>>>>>
>>>>>>> --
>>>>>>> *Jenny Murphy*
>>>>>>> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
>>>>>>> jenny.murphy at episensor.com <jenny.murphy at episensor.com>  t | +353
>>>>>>> (0) 61 512 511  w | http://www.episensor.com
>>>>>>>
>>>>>>> --
>>>>>>> Snapcraft mailing list
>>>>>>> Snapcraft at lists.snapcraft.io
>>>>>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>>>>>> an/listinfo/snapcraft
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> - Loïc
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Jenny Murphy*
>>>>> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
>>>>> jenny.murphy at episensor.com <jenny.murphy at episensor.com>  t | +353 (0)
>>>>> 61 512 511  w | http://www.episensor.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Jenny Murphy*
>>>> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
>>>> jenny.murphy at episensor.com <jenny.murphy at episensor.com>  t | +353 (0)
>>>> 61 512 511  w | http://www.episensor.com
>>>>
>>>
>>>
>>>
>>> --
>>> - Loïc
>>>
>>
>>
>>
>> --
>> *Jenny Murphy*
>> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
>> jenny.murphy at episensor.com <jenny.murphy at episensor.com>  t | +353 (0) 61
>> 512 511  w | http://www.episensor.com
>>
>
>
>
> --
> - Loïc
>



-- 
*Jenny Murphy*
*EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
jenny.murphy at episensor.com <jenny.murphy at episensor.com>  t | +353 (0) 61
512 511  w | http://www.episensor.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160908/19ba7812/attachment.html>


More information about the Snapcraft mailing list