Beruflich Dokumente
Kultur Dokumente
March 28, y
Hardware Reference
materials
SUB-20 is a versatile and efficient bridge device providing simple interconnect between PC
(USB host) and different HW devices and systems via popular interfaces such as I2C, SPI, MDIO,
RS232, RS485, SMBus, ModBus, IR and others. It is also a full "any to any" converter between all
supported interfaces and I/O features. SUB-20 is a powerful I/O controller with 32 GPIO, 8 Analog
Inputs, PWM Outputs, Edge DEtectors, LCD, Leds and push buttons.
SUB-20 system includes SW package containing driver, API Library, GUI and Command
Line based applications, C,C++,C#,VB.net, MATLAB, LabView sample code and documentation.
Working with SUB-20 does not require deep knowledge of low layers of the specific interface. All
you need to do is to call right API function at the right place. And this is really very easy as API
functions are well documented and "exampled". API set is relatively small but comprehensive.
SUB-20 is equipped with status Leds, optional LCD and buttons. All this guarantee fast and
comfortable development, field debugging and maintenance of applications including option of
standalone operation.
Reference: http://www.xdimax.com/sub20/sub20.html
User Manual: http://www.xdimax.com/sub20/doc/sub20-man.pdf
Reference: http://www.ubuntu.com/desktop
Reference: http://www.eclipse.org/
VM stands for virtual machine, this should give you an idea that we are going to be running Linux on a
virtual machine. VMware can be used to run several OS in your computer. This will get clear as we
proceed, so firstly we need to get VMware player, to do that click on the following link:
https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/7_0
and as the web page opens up , click on VMware for windows 64 bit operating systems .As we have
our player downloading , meanwhile we need to download something known as VMware tools , to get
that go to the following link:
http://softwareupdate.vmware.com/cds/vmw-desktop/player/7.1.0/2496824/windows/packages/
Since we want to install Linux on our system, it is obvious that we will need Linux installer tools
therefore click on: tools-linux-9.9.2.exe.tar
Alright we now have VMware player and VMware tools downloaded, it is now the time to setup these 2
softwares!
When the process is done, go to your start menu and you can find your VMware over there, click on it,
and then just click on License agreement and you will have your VMware player running!
Step 4 - Installing Linux Virtual machine
Once the VMware player is running, you need to click Create new virtual machine . You will then see
3 options:
1. Installer Disc
2. Installer disc image file
3. I will install the Operating system later
Like this:
We want to click the 3rd option i.e. I will install the operating system later. Go ahead and click next.
Now you will have to choose the guest operating system, so go ahead and choose Linux. Do not go
ahead and click next yet, you need to choose a version also, Linux has many versions! , so in the
version drop down menu, select Ubuntu 64-bit.
Like this:
The next step requires you to set a location for our virtual machine, you can put in anywhere you want.
Go ahead and click next.
In the next step you need to specify the disk space for Ubuntu 64-bit OS. This is really up to you, i.e.
how much space you wish to allocate. 20GB is recommended, but let us say if you want to use this OS
for a long time which means you will have quite a number of technical softwares, then maybe you can
allocate 40GB , however it is really up to you. I would go for 40GB. However this OS can run
sufficiently in 20GB space.
On the same page you need to choose one of the 2 options:
1. store virtual disk as a single image
2. spit virtual disk into multiple images
We want to select the 1st option i.e. store virtual disk as a single image. Go ahead and click next.
Like this:
Now you need to click on customize hardware to see the configurations are created for our Linux
Ubuntu software. You will now be able to see 9 devices:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Memory
processor
New CD/DVD
floppy
network adapter
USB controller
sound card
printer
display
2. On the next page, just click next, make sure you check the box saying to download third party
software and download updates while installing, it will be time consuming to do it later!
3. The next part will be a bit tricky for you as you will see two options:
Erase Disk and install Ubuntu
Something else
What we want to do is to click the 1st option that is erase disk and install Ubuntu, DO NOT
WORRY! , if you understand properly you will realise that this OS is created on a blank virtual disk,
and plus it on VMWARE, this is not going to erase your current operating system (remember we are in
a virtual machine, this is not connected to your host OS such as windows), so go ahead and click it!
4. Now go ahead and click install
5. after some time you will be asked to select your location.
6. Later you will be asked to choose the keyboard layout, go ahead and choose English (US)
7. You will then be asked to fill up your name, password, username etc.
8. You will now be prompted to restart your virtual machine, so go ahead and do that.
And congrats, you now have a second operating system on your PC!
However we need to do just one more thing. You will realise that upon maximizing the virtual machine
window, Ubuntu is not resizing itself (it is still small).
To solve this problem, we are going to need VMware tools. To do that, just follow the following steps:
1. On the top left hand corner, go ahead and click player, then click manage and then click install
VMware tools.
2. You will see a .txt file and a .tar.gz folder, what you need to do is copy this folder to the desktop.
3. Once you have the folder on the desktop, right click on it and click extract here
ECLIPSE is the Grandfather of most of IDE's, therefore getting such an IDE is also not very simple BUT.....
This document will make the installation and setup of projects a sweet piece of cake. Just follow through
line by line and you will be more than just fine. HOWEVER DO NOT EVEN SKIP ONE LINE, IT CAN MESS
UP YOUR ENTIRE INSTALLATION PROCESS.
Please note that the inverted commas are just there to let you know which command to type , do not type
the inverted commas as well while executing any command unless you are told to.
The very first step is to get a Java compiler, even if you download eclipse, you still will not be able to run a
java program because it is a must to have to compiler, to download the compiler, go to the following
website:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
As you open the link, you will see many compilers, but what we want is just one single compiler, any
guesses?
Yes, you are right! , you need to download the Linux x64 compiler. Just click on it and the download will
start.
Now by default the folder will be automatically saved in the Downloads directory, you will notice the format
of the file as tar.gz, so what you need to do is extract this folder. There are two ways to extract this:
1. Right click and click on 'extract here'
2. open up the terminal(Ctrl+Alt+Tab) and change your directory to downloads as that is where you have
saved your file , you do that by typing : cd ~/Downloads/ and then you type:
tar xvfz jdk1.8.0_40/ , and then press enter, your folder will then be extracted.
Step 3 - setting a home for our Java compiler
Now what you need to do is, you need to create a folder (directory in Linux). So type the following
command:
cd /usr/lib/
after this you will be in the lib directory and this is where you need to make the folder called java, so come
back to your terminal and type the command:
sudo mkdir java
You will then be prompted for your password and after that, you will have your java folder, so now you need
to move the extracted jdk folder over here, to do that type the following commands:
cd ~/Downloads/
Then you type:
sudo mv -u jdk1.8.0_40/ /usr/lib/java
By right, the folder should be moved in the java directory we created earlier, so let us go to this directory by
typing the command:
cd /usr/lib/java/
And then type the command:
ls
The ls command will show up the contents in that directory, so you should see something like this(refer to
the next page):
note the jdk written in blue colour , if you have that then quite good if you have that showing up, now do not
be worried by the numbers being shown on this screenshot, on this PC version 1.8.0_31 is installed, by the
time you will install it the version will already be jdk1.8.0_40. Now change to the jdk1.8.0_40 directory by
typing:
cd jdk1.8.0_40/
Step 4 - Configuring the Java compiler
Alright, now you need to copy 3 more commands in the terminal (DO PRESS THE 1 AT THE END OF THE
COMMAND AS SHOWN FOR ALL THE THREE COMMANDS) please note the spaces as well! , the first
one:
1. sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/java/jdk1.8.0_40/bin/java" 1
Now you type the following command:
2. sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/java/jdk1.8.0_40/bin/javac" 1
And the third command:
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/java/jdk1.8.0_40/bin/javaws" 1
Same thing here as well, you need to replace the version number with the current one you have.
Alright friends, not much to go now, we are almost there!
And paste it RIGHT AT THE END OF YOUR BASHRC FILE, AND REALLY RIGHT AT THE END, SCROLL
ALL THE WAY DOWN AND THEN PASTE IS THERE, look at the screenshot provided below:
You will now see a huge load of information come up (we do not need to bother what it is!) and then just to
be double sure we type one more command:
java -version
This will show up you current version. If the above 2 commands work, then well done! , you have your Java
compiler!
Now we can go ahead and install eclipse!
Click on the following link to get eclipse:
https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/SR2/eclips
e-java-luna-SR2-linux-gtk-x86_64.tar.gz
After the link opens, click on the country name next to the green arrow
And your eclipse will start downloading.
Please note, you might get different countries depending on the server, for e.g. you might get Indonesia as
well
Once the download has finished, go the Downloads directory and extract the eclipse folder right there itself,
after extraction you should have a folder just called 'eclipse' go inside it and you will see this:
Although this software is used to run java programs, we can also run C and C++ programs, we will
https://github.com/Nuand/bladeRF/wiki/Getting-Started%3A-Linux
sudo apt-get install libusb-1.0-0-dev libusb-1.0-0
ignore: build-essential cmake libncurses5-dev libtecla1 libtecla1-dev pkg-config git wget
You can check the libusb and libusb-dev versions installed on your system via:
dpkg -s libusb-1.0-0 libusb-1.0-0-dev
The libusb.h is installed in
/usr/include/libusb-1.0
And the libusb-1.0 library is in
/usr/lib
Installing libsub
http://www.xdimax.com/sub20/sub20.html
Create a new workspace directory ~/xdimax.
cd ~/xdimax
Copy the following tar file invPen.tar.gz into ~/xdimax directory.
And untar this file by double click on it and extract here.
There are 3 directories app, bin and Debug in the extracted directory invPen.
Enter Eclipse into ~/xdimax directory.
Create a new C project invPen in ~/xdimax directory.
Go into workspace project properties: C/C++ Build > Settings
Place in the GCC C Compiler Includes path /usr/include/libusb-1.0 and ../lib
Place in the GCC C Linker library path /usr/lib
Place in the usb library usb-1.0 and also the math library m
LOW_ODR setting
DRDY_HL=0
I2C_dis=0
SW_RES=0
Low_ODR=1
ie: 0000 0001
CTRL1 settings
ADDR[3:0]=0101
BDU=0
AZEN=1
AYEN=1
AXEN=1
1010 0111 = 0x57
With the above bare minimum settings, running in unfiltered filters, the following are the numbers.