Skip to content

Commit 077c298

Browse files
authored
Merge pull request #2 from cslrfid/develop
1.0.2 Final Updates
2 parents a30777a + 8871345 commit 077c298

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,79 @@
11
# CslCs108LinuxJavaApp
22
CS108 Linux Java Bluetooth Demo App and SDK
3+
4+
This application provides demonstrations to the programming interface made available on the CS108 handheld reader for configuring, controlling, and accessing the RFID reader. The development was based on the CS108 Java API for the Ubuntu Linux desktop.
5+
6+
[Product Information](https://www.convergence.com.hk/cs108/)
7+
<br>
8+
9+
## Pre-requsite
10+
11+
The development environment consists of the following:
12+
- Ubuntu version 16.04 (this is the recommended version that has been validated. Other distributions should also work)
13+
- NetBean IDE 8.1 or later
14+
- BlueZ v5.45 or later
15+
16+
## Setting Up the Environment
17+
18+
You can copy the packet content to a local folder such as [CS108-Linux-Java-Demo-Build-x.x.x]. Within the package, there should be two sub-folders:
19+
20+
*CS108JavaLibrary_170811_VX.X.X*
21+
- Contains the source code of the custom library for accessing the CS108 device.
22+
23+
*CS108JavaDemoApp_170811_VX.X.X*
24+
- Contains the source code of the demo application with user interface built with Java Swing class library.
25+
26+
You will also need JDK 8. First, open a terminal, add Oracle’s PPA then update your package repository:
27+
28+
```bash
29+
$ sudo add-apt-repository ppa:webupd8team/java
30+
$ sudo apt-get update
31+
```
32+
33+
To install Oracle JDK8, enter the following command:
34+
35+
```bash
36+
$ sudo apt-get install oracle-java8-installer
37+
```
38+
39+
After installing JDK8, you can confirm the location where Java is installed by the following command:
40+
41+
```bash
42+
$ sudo update-alternatives –config javac
43+
```
44+
45+
You should see the path where the Java compiler is located. In this case, Java path should be /usr/lib/jvm/java-8-oracle
46+
47+
You can now download NetBean IDE for Java SE from [NetBeans](https://netbeans.org/downloads). The installer should be a .sh file to be executed.
48+
49+
You can navigate to the folder of the sh file and execute by:
50+
51+
```bash
52+
$ ./netbeans-8.2-javase-linux.sh
53+
```
54+
55+
The installer will check your Java runtime and if any previous installation on the system. If everything is okay, the installation wizard will be launched.
56+
57+
Provide the installation path and also the location of the JDK that we have obtained earlier.
58+
59+
<img></img>
60+
61+
The wizard will then bring you to the installation process and get NetBeans installed. You will also need the Bluetooth protocol stack – BlueZ installed on the machine. You can do that with the following command:
62+
63+
```bash
64+
$ sudo apt-get install bluez
65+
```
66+
You can also get Bluetooth Manager for Bluetooth device management with the following command:
67+
```bash
68+
$ sudo apt-get install blueman
69+
```
70+
71+
After that, you can launch NetBeans and select File->Open Project. Navigate to the folder the demo app is located and select Open Project
72+
73+
<img src="app_img/CS108-LinuxJava.png" width="600"/>
74+
<br>
75+
76+
You can now build and debug the CS108JavaDemoApp project, along with further customizations. Please refer to the CS108 Bluetooth Linux Java API Specifications for further details.
77+
78+
79+

app_img/CS108-LinuxJava.png

208 KB
Loading

0 commit comments

Comments
 (0)