Per Vices Noctar User manual

PER VICES CORPORATION
NOCTAR USER MANUAL


Change Log
2012-12-12: Rev A: Initial Release
2013-01-04: Rev B: Cleaning up some sections, fixing typos, im-
proving readability, note on input GPIO.
2013-01-23: Rev C: Adding section on testing ADC outputs.
Adding IQ matching section. More cleanup and readability.
2013-02-03: Rev D: Adding additional notes on how decimation
and interpolation works.
2013-03-06: Rev E: Updating troubleshooting notes, including
driver permissions and creation.
2013-07-31: Rev F: Cleaning up minor typos in the product de-
scription.
2015-01-20: Rev G: Adding step-by-step installation instructions
for Ubuntu, including preliminary instructions for FM demo.
2015-01-21: Rev H: Adding additional instructions on configuring
permissions.


Preface
Noctar
Noctar is a wide band, high gain, direct conversion quadrature
software defined radio transceiver and signal processing platform.
Using analog and digital conversion, it can capture up to 200MHz of
bandwidth from DC to 4GHz, and rapidly communicate that infor-
mation over an 8Gbps high speed PCIe bus.
Noctar represents our first step towards building a low cost,
distributed, wireless communications infrastructure - something to
enable application developers to implement any wireless device in
software.
Congratulations!
Congratulations on your purchase of the Per Vices Noctar Transceiver!
This manual is intended to provide you with useful information re-
garding the safe operation and use of your new Transceiver. It may
be updated from time to time - you’ll always be able to find the latest
version on the Per Vices website1.1http://www.pervices.com
We hope you enjoy using Noctar. In building Noctar, we
aimed to provide a highly capable device at the lowest possible price.
Our belief is that there are significant resource barriers impeding the
widespread adoption of Software Defined Radio (SDR) technology.
These barriers come in the form of the high capital cost necessary
to purchase specialized equipment, and the extensive experience
necessary to successfully operate such devices.
This product is our second step towards reducing the cost barrier.
We’ve tweaked the RF chain, improved shielding, added IO, and
improved performance - in short, we have tried to pack in as much
functionality as possible at a comparatively low price.
Faced with a number of conflicting requirements, we have en-
devoured to satisfy the broadest use cases possible, while trying to
reduce the complexity necessary to operate Noctar. Our goal is to
help you best utilize the flexibility afforded by SDR technology.

8 per vices corporation
Our hope is that you will find Noctar to be a useful and de-
pendable companion in your engineering, development, and research
efforts.
We welcome your feedback; please feel free to contact us at:
A note on Langford We originally intended to call our
product φ, but we ended up changing
our name to avoid stepping on toes...
However, to ensure compatibility with
our earlier products, and to simplify
development efforts, we continue to
use ’Langford’ within our drivers and
utilities.
When reading this manual, or using the code examples, drivers, or
utilities, you may come across references to Langford. You may
find yourself wondering who, or what, Langford refers to. The
quick answer is Noctar is part of the SDR series formally known as
φ; for all intents and purposes you can safely assume that Langford
refers to Noctar.

Obligatory Warnings
The following section contains important safety and regulatory infor-
mation. Please pay attention to the following disclaimers, warnings,
and cautions.
This device is intended for engineering, research, or science laboratory use
only - it is not for open office or residential use! This device has not been tested or ap-
proved by any agency or approvals
body for Electrical Safety, Electromag-
netic Compatibility, or Telecommuni-
cations at the time of distribution! You
use this device at your own risk.
Disclaimer
This product is provided «As Is». Per Vices is under no obligation
to provide updates, upgrades, support, or maintenance of any kind.
Per Vices specifically disclaims any and all warranties and guar-
antees, express, implied or otherwise, arising with respect to the use
of this product including, but not limited, to the warranty of mer-
chantability, the warranty of fitness for a particular purpose, and any
warranty of non-infringement of the intellectual property rights of
any third party. Per Vices neither assumes or authorizes any person
to assume for it any other liability.
Your use of this device is at your own risk. Per Vices shall not be
liable for you for any damages, direct or indirect, incurred or arising
from the use of this product. In no event will Per Vices be liable
for loss of profits, loss of use, loss of data, business interruption,
nor for punitive, incidental, consequential, or special damages of
any kind, however caused, and on any theory of liability, whether in
contract, strict liability, or tort (including negligence or otherwise),
arising in any way out of the use of this product, even if advised of
the possibility of such damages.
Product Functionality
Every effort has been made to ensure that the device you receive is
fully functional - each device is fully tested prior to shipping. How-
ever, risk of damage or loss is transferred immediately upon delivery
to you - we do not generally accept returns or refunds on successfully
delivered packages.

10 per vices corporation
If you have any problems, please contact: solutions@pervices.com
Specifications
Every effort has been made to test and measure the validity of this
equipment. However, we cannot guarantee the accuracy of specifica-
tions, and they may change at any time.
Warnings
WARNING
RISK OF ELECTRIC SHOCK
Do not attempt to modify or touch this device while powered.
Ensure host computer is properly grounded during operation.
Disconnect AC power during installing or removal.
WARNING
HOT SURFACE
This circuit board may become very hot during operation.
Contact should be avoided.
WARNING
LABORATORY USE ONLY
This device has not been approved by any agency or approvals
body for Electrical Safety, Electromagnetic Compatibility, or
Telecommunications at the time of distribution. Research use only!
ATTENTION
OBSERVE ESD PRECAUTIONS
This device contains electrostatically sensitive components: it
may be damaged by static discharges. Observe ESD precautions &
proper grounding when handling, installing, or removing device.

noctar user manual 11
ATTENTION
RF TRANSMITTER
This device is capable of RF transmission on bands or frequencies
subject to regulatory oversight. Operators are responsible to ensure
use of this device meets local regulatory and legal standards, as
they may apply to you and the band of interest.
This device is intended for test and measurement use only.


Specifications
Noctar is a wide band, high gain, direct conversion quadrature
transceiver and signal processing platform. Using analogue and As Noctar is capable of Digital
Down/Up Conversion, superhet ar-
chitectures can be implemented using
Digital Down/Up Conversion on the
FPGA.
digital conversion, it is capable of processing up to signal bandwidths
up to 200MHz from 100kHz to 4GHz. Noctar is compatible with
GnuRadio, and includes open source drivers.
Absolute Maximum Ratings
Stresses beyond those listed in table 1, Absolute Ratings, may cause
permanent damage to the device. These ratings are stress specifica-
tions only; functional operation of the product at these conditions
is not implied - exposure to absolute maximum rating conditions
for extended periods of time may affect reliability and is not recom-
mended.
Specification min max units
Operating Temperature 5 85 C
Storage Temperature 0 70 C
Input RF Power 15 dBm
Table 1: Absolute Ratings: Ex-
posure or sustained operation
at absolute ratings may per-
manently damage Noctar.
This device is passively cooled
- ensure adequate airflow or
cooling during extended opera-
tion.
Observed Performance
The specifications listed in table 2on page 15 detail observed perfor-
mance under typical conditions. They are intended as a loose guide
to what we have observed during internal testing; please contact us if
you require specific specifications.
RF Chain
Simulated RF chain performance, based on component specifications,
yield the following simulated performance. As both the receive and
transmission RF chains have variable stages, table 3on page 16 uses
midpoint references for attenuation and gain stages.

14 per vices corporation
Operating System
We test all devices on a 64 bit Arch Linux system running GnuRadio
and the 3.4kernel. We do not support the Linux 2.6kernel. We have
also successfully used Noctar on 64 bit Ubuntu systems.
Some users have reported problems compiling our drivers on
VM’s or 32 bit machines, especially those using Ubuntu, so we rec-
ommend avoiding 32 bit systems or VMs when using our product. During early testing, we suc-
cessfully installed our drivers
on a 32 bit Arch Linux ma-
chine, so it should be possible,
if you’re willing to get your
hands dirty.
Mechanical
A mechanical drawing in included in the Appendix.

noctar user manual 15
Specification min nom max units
Temperature
Card Operating Temperature 60 C
Analogue
RF Tuning (ADF4351)35 4400 MHz
Dyn. Range (RX,TX) 10 50 dB
Power Gain (RX, High Stage) @2GHz -23 43 dB
Power Gain (RX, Low Stage) @ 125MHz -4.5+55.5dB
Nominal RF Input Power -15 dBm
TX Power (Low) @ 10MHz +15 dBm
Digital
PCIe x4, v1.1Data Rate (full duplex) 8Gbps
ADC resolution 12 bits
ADC Sample Rate (per IQ Channel) 125 MSPS
DAC resolution 16 bits
DAC Sample Rate (per IQ Channel) 250 MSPS
Decimation (2n), for values of n=[0,5]0 32 -
Interpolation (2n), for values of n=[0,5]0 32 -
Internal Reference (20 MHz)
Frequency Calibration (20oC) -1.0 1.0ppm
Internal Frequency Stability -0.28 +0.28 ppm
2)
We use a 5bit word to set or clear interpolation bits. Decimation or
Interpolation is implemented as a cascade; each stage checks the state
of one of the five bits in the decimation word.
If the bit is set, the stage takes the data and carries out one decima-
tion (or interpolation) by two. If the bit is clear, than the stage simply
passes the information through.
For example, if the interpolation word is set to (TxIntEn = 5’b01011 =
0xb), then three interpolation stages are set (0,1, and 3), resulting in a
total interpolation of 8(2^3).
3) I suspect that you’re setting the interpolation stages to 4. This cor-
responds to TxIntEn=5’b00100, which only enables the 2nd stage, and
corresponds to an interpolation of 2.
To help figure this out, you can work backwards, using dd, to help
set the stages. With 0interpolation, your maximum bandwidth is
limited by the bus (~700MBps), so you’re going to lose packets. How-
ever, with an interpolation of 0xf, you should be able to view the
correct result;
langford_util /dev/langford TxIntEn 0xf
I hope this helps - if I am wrong, and this does not help fix the prob-
lem, please let me know! I’m really eager to help work with you to
fix this.
Table 2: Observed Performance.
These specifications reference
observations taken during in-
ternal use and development.
Please note the Dynamic Range
section for more information.

16 per vices corporation
Specification DC 2GHz units
Input
RF Input Power -12 dBm
Analysis Bandwidth 100 MHz
Rx Chain
SFDR 63.5dB
SNR 71.6dB
Input Rx Sensitivity -73.6dBm
Input P1dB 1-7dBm
Tx Chain
Power Gain 25 14 dB
SFDR 67 71 dB
Table 3: These specifications
are intended to serve as a very
general guide, with variable
gain and attenuation stages set
at midpoints. As variable stages
are adjusted, performance may
vary considerably.

Installation
Installation comprises four steps;
1. Physically disconnecting mains power to your computer and
inserting the card into a PCIe slot.
2. Installing the software drivers and utilities.
3. (Optionally) Copying the initialization routines to a location
where it will automatically load with your computer.
4. (Optionally) Installing GnuRadio2. This allows you to immedi- 2If you are using ArchLinux, you’ll find
a build script for GnuRadio within the
folder called ’arch’. Use it by running:
makepkg -p gnuradio.PKGBUILD
ately start playing with Noctar.
Physical Installation
Noctar comes in a PCIe form factor, and comes programmed.Turn
off your computer and physically disconnect the AC power cable. If you’re wondering why we’re em-
phasizing the disconnection of mains
power, it’s because we speak from
experience. Learn from our mistakes!
Open up your computer, and install the card in a free x4(or greater)
PCIe slot. See your computer manufacturer for specific instructions.
Reverse these steps for removal.
Driver and Utility Installation
The installation procedure is relatively straightforward;
1. Obtain a copy of the Noctar drivers. You can download them from
the Per Vices site, or use the ones that may have been shipped with
your device.33We recommend downloading the
latest drivers from:
http://www.pervices.com.
2. Run make to build the drivers, then switch to a root user (or sudo)
and run make install. > cd /langford_driver
> make
> su -l
Password:
# make install
Figure 1: Sample installation
routine; make the drivers, then
install them as root. On Ubuntu
systems, we’ve found compi-
lation sometimes requires root
priviledges (otherwise you get
an error). To get around this,
log on as root prior to running
make, and make install.
This will install the kernel module, and creates the necessary
character device (/dev/langford) which shall be used for RX/TX.
Rarely, make install may fail due to a known race condition (mknod
running before insmod is complete). If this is the case, try running
make install again.
You may encounter permissions prob-
lems. Once everything is set, you
should be able to access and write to
the device with user privileges. If you
encounter problems, chown/chmod as
appropriate and let us know!

18 per vices corporation
Auto loading Initialization Routines
You will have to initialize the device (by running langford_init) every
time you restart your computer! You can make this easier by copying
this file to your init scripts.
Ubuntu Installation
Ubuntu is not presently supported. Nevertheless, if you’re new to
Ubuntu, here’s a step-by-step guide on getting yourself set up.
There are three to this proceedure: updating your computer and
installing dependencies, compiling and installing the driver, and
running a test script.
Updating and installing packages
1. Open up a new terminal window.
2. Update and upgrade all the existing packages on your computer.
(a) To do this, first we have to update the list of packages, then we
have to upgrade any out-of-date packages. Type the following
two commands into your terminal, and wait for each command
to complete prior to moving to the next one:
$ sudo apt-get update
$ sudo apt-get upgrade
3. We now need to install the linux kernel headers and sources,
along with wget (a command line download program) and gnura-
dio.
(a) In your terminal, type;
$ sudo apt-get install -y linux-headers-generic linux-source
$ sudo apt-get install -y gnuradio wget
4. Reboot your computer.
At this point, we should have updated your computer, and in-
stalled the latest kernel header and source code.
To eliminate the possibility of problems, take this time to reboot
your computer! This will avoid us building a kernel module for an
out-of-date computer.

noctar user manual 19
Compiling and Installing the langford drivers You may have to re-run the above
commands if you update your kernel.
1. Open a new terminal window, and navigate to your home direc-
tory by typing:
$ cd ~
2. We shall now download the langford driver package. Use the
following command to download the latest driver to your home
directory using wget;
$ wget http://pervices.com/bin/drivers/langford-latest.tar
3. We now need to extract that file, so we type:
$ tar xf langford-latest.tar
This will create a new langford_driver directory in your home
directory.
4. On Ubuntu, we sometimes need to run the commands as root to
avoid possible problems.
(a) Therefore, we’ll generate a root prompt, then enter the direc-
tory we created as root, and compile and install the sources.
The following commands open a bash session as root, enter
the newly created langford_driver directory, and compiles and
installs the kernel drivers.
$ sudo bash
# cd langford_driver/
# make
# make install
Adjusting permissions
The "langford" group is generally created when compiling the kernel
modules, and ensures that your user will have all the permissions
required to modify and use the noctar driver. This group is created to
ensure that only authorized users (that is, users within the group) are
able to configure or transmit on the radio device.
What follows is the procedure to add "langford" as a secondary
group to your user and ensure valid permissions are set.
1. Open a terminal.
2. Associate your user with the langford group (as a secondary
group). If your user name is complicated - for
example, it has a space or funny ascii
character in the name - you may need
to escape the offending character by
placing a ’\’ before the character.
For example, if your username is: "foo
bar", then you’ll have to type "foo\ bar"
whenever we type the user name in our
examples above.
(a) To do this properly, we need to know your user name. If you
don’t know your exact user name, you can find it by opening a
terminal (as a regular user) and typing the following:

20 per vices corporation
$ whoami
(b) Once you know your user name, we’ll associate it with the
langford group using the usermod command. For example, if
your user name is "foo", we’ll type:
$sudo useradd -G langford foo
This command uses the -G flag to add a secondary group
called "langford" to the username "foo".
3. At this point, we should have resolved any permission errors.
Next, what we’re going to do is ensure that you are able to access
and run all the required files within the langford-driver directory.
This step aims to ensure that any remaining permission errors are
avoided.
(a) To this we’re going to open a terminal and go to your home
directory. Then, we’re going to recursively give your user per-
mission to the langford-driver directory.
$ cd ~
$ sudo chown foo:foo -R ./langford-driver
i. The above code assumes that your username is «foo» - re-
place it with your actual username prior to running the com-
mand.
Initializing the driver + running a test script If you later have problems running or
using noctar, make sure that you’re
properly initialized the device using the
«langford_init» command.
At this point, we have successfully installed the kernel module, and
configured the permissions. An important note is that, prior to run-
ning or using Noctar, we need to initialize it. Therefore:
1. Initialize noctar by running langford_init as root. Type the follow-
ing into a terminal to create the charactor device in /dev/langford
and load the kernel module:
# sudo langford_init
2. Run the langford_rx test script (found within the langford_driver
directory).
To do this, enter the langford_driver directory (in our case, that
was in ~/langford_driver), and enter the test directory. Using the
above proceedures, this should be found in your home directory:
$ cd ~/langford_driver/test $ ./langford_rx_500MHz.sh
3. This should bring up a command that configures the langford_device,
and brings up a gnuradio-companion interface with a graph al-
ready created. To use it, you’ll have to generate and execute the
flow graph.
Table of contents