.. _starting:

===============
Getting Started
===============

.. |ohm| unicode:: U+02126 .. OHM SIGN

To test the Satlab SRX-8 transmitter, you need a lab power supply and a development computer
running Linux. The communication interfaces can be tested using either an adapter connected
to the development computer or an external subsystem.

.. figure:: img/srx8-overview.svg
   :align: center
   :width: 80%

|

.. ATTENTION::
    The SRX-8 can transmit with up to 33 dBm output. A 50 |ohm| load capable of handling this
    power **must** be connected to the transmit (TX) connector of the system.
    Transmitting without a suitable load could permanently damage the system.

    If you are transmitting using an antenna, make sure you have the proper
    licenses to transmit on the configured frequency.

To power on the system:

- Connect a 50 |ohm| load rated at minimum 2 W average power to the TX connector
  (e.g. a satellite receiver, spectrum analyzer, or dummy load). Use suitable attenuators
  if the maximum power handling capability of your load is lower than 2 W.
- Connect the supplied serial USB cable to the P2 connector and open the USB serial
  device as described in :ref:`shell`.
- Connect the desired communication interface (CAN-bus, RS-422, Ethernet) to the
  appropriate pins in the P1 connector.
- Connect the supply power to the VIN/GND pins in the P1 connector. Set the power supply
  to 15 V with a 2 A current limit, preferably using a fused output. Note that the inrush current
  might exceed 2 A when powering the device. The input voltage can be higher, but we recommend
  starting with 15 V. See the datasheet for electrical specifications.

.. ATTENTION::
    The power supply must be able to supply at least 30 W.

Once power is applied to the board, the system will output a boot log on the serial interface.

To test the communication interfaces, the ``satctl`` Linux application can be installed on the
development system. The latest version of ``satctl`` can be downloaded from `<https://resources.satlab.com/software/satctl/>`_
For CAN-bus interface, Satlab recommends the
`PEAK-System PCAN-USB dongle <https://www.peak-system.com/PCAN-USB.199.0.html?&L=1>`_.
For RS-422, the `FTDI USB-RS422-WE-1800-BT <https://ftdichip.com/products/usb-rs422-we-1800-bt/>`_
is recommended. Please ensure that the communication interfaces on the system are configured as
described in
:ref:`cspifc`. Note that CAN-bus is used by default.

.. ATTENTION::
   Although all external interfaces on the system are protected against ESD, proper precautions
   must still be observed when handling the device. Ensure proper grounding through an antistatic
   wrist strap and/or floor mat.

Serial Adapter
==============

The supplied serial adapter uses USB. To avoid running with root privileges to communicate with
the board, please add the following contents to ``/etc/udev/rules.d/99-satlab-jtag.rules``.
Create the file if it does not exist:

.. code-block:: none

    # Satlab serial adapter
    ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666"

Then run the following command to reload the ``udev`` rules::

    satlab@satlab:~$ sudo udevadm control --reload

Note that this allows **all** users on the machine to communicate with the serial adapter.
Please refer to the official `udev documentation <https://www.freedesktop.org/software/systemd/man/udev.html>`_
documentation for more advanced configurations and permission settings.
