I'm trying to first of all list ports on Ubuntu 14.04 LTS but not all ports are detected, it only displays tty. I want to access the hidraw one, see below.
I have read/write permission on the lock file for everyone.
- File RXTXcomm.jar should go under JDKDIR/jre/lib/ext/
- The necessary library (e.g.. for Linux 32bit, the librxtxSerial.so) should go under JDKDIR/jre/bin/
- librxtxSerial.so in lib/bin also
The librxtxSerial.so is for x86_64 (my computer: Intel i7 4790k Running Ubuntu 64 bit)
dpkg --print-architecture
amd64
uname -a
Linux KrantzUbuntu 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 222:08:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
When I list connected ports in the terminal I get those:
/dev/hidraw4 - Broadcom_Corp_BCM20702A0_54271EFCD756
/dev/input/event14 - Broadcom_Corp_BCM20702A0_54271EFCD756
/dev/input/mouse1 - Broadcom_Corp_BCM20702A0_54271EFCD756
/dev/input/event2 - Logitech_Gaming_Mouse_G400
/dev/input/mouse0 - Logitech_Gaming_Mouse_G400
/dev/hidraw0 - Logitech_Gaming_Mouse_G400
/dev/usb/hiddev0 - Logitech_Gaming_Mouse_G400
/dev/hidraw1 - Logitech_Gaming_Mouse_G400
/dev/input/event3 - CM_Storm_Quickfire_TKL_6keys
/dev/hidraw2 - CM_Storm_Quickfire_TKL_6keys
/dev/input/event4 - CM_Storm_Quickfire_TKL_6keys
/dev/hidraw3 - CM_Storm_Quickfire_TKL_6keys
The on I want to use later on is the /dev/hidraw4 one, which is a Bluetooth mobile phone.
I have recompiled the RXTXCommDriver class search for more ports on Linux and added:
if(osName.equals("Linux"))
{
String[] Temp = {
"sr",
"hidraw",
"usb",
"input",
"sr0",
"ttyS", // linux Serial Ports
"ttySA", // for the IPAQs
"ttyUSB", // for USB frobs
"rfcomm", // bluetooth serial device
"ttyircomm", // linux IrCommdevices (IrDA serial emu)
};
CandidatePortPrefixes=Temp;
}
But still doesn't list hidraw.