Skip to content

Embedded Devices

The NeuralPlex is equipped with several embedded devices, which add multiple functionalities. This section describes each of those embedded devices.

The NeuralPlex can have a GNSS receiver to support concurrent reception of up to 3 GNSS (GPS, Galileo, GLONASS, BeiDou). The GNSS receiver provides the location using NMEA data (UART interface on the NeuralPlex) available on the path: /dev/ttyLP1. To enable the GNSS receiver, you must append the <machine>-cellular-gps.dtbo device tree overlay to the /boot/overlays.txt file. Once appended, reboot the system and execute the following commands below:

View output from GNSS Receiver
root@neuralplex:~# echo 0 > /proc/sys/kernel/sysrq
# Enable GPS (Verify the specific GPIO chip with gpioinfo)
root@neuralplex:~# gpioset -c6 26=0
# Open Screen with baud rate at 38400
root@neuralplex:~#screen /dev/ttyLP1 38400

You can also utilize the GNSS Reciver in your Qt application by using the QtSerialPort and QNmeaPositionInfoSource library:

m_serialPort = new QSerialPort();
m_serialPort->setPortName("/dev/ttyLP1");
if (m_serialPort->open(QIODevice::ReadOnly))
{
qDebug() << "GNSS Serial Port opened";
m_serialPort->setBaudRate(QSerialPort::Baud38400);
m_nmeaSource = new QNmeaPositionInfoSource(QNmeaPositionInfoSource::RealTimeMode);
m_nmeaSource->setDevice(m_serialPort);
m_nmeaSource->setPreferredPositioningMethods(QNmeaPositionInfoSource::AllPositioningMethods);
m_nmeaSource->setUserEquivalentRangeError(5.1);
m_nmeaSource->setUpdateInterval(1000);
connect(m_nmeaSource, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
connect(m_nmeaSource, SIGNAL(updateTimeout()), this, SLOT(updateTimeout()));
connect(m_nmeaSource, SIGNAL(error(QGeoPositionInfoSource::Error)), this, SLOT(error(QGeoPositionInfoSource::Error)));
m_nmeaSource->startUpdates();
}

The NeuralPlex has a high-performance AM/FM tuner. When the scan for an FM/AM station is made, NeuralPlex tunes to the station within the threshold of field strength. The Alsa library in the Reference App controls the selection between audio output from Linux OS and the AM/FM radio tuner.

The NeuralPlex also ships with a tuner command-line binary that talks to the tuner chip directly over I2C. It is useful for bringing up the tuner hardware and testing it outside of the Reference App.

-d (device) and -a (address) are always required and identify the I2C bus and slave address of the tuner:

Basic tuner usage
root@neuralplex:~# tuner -d 2 -a 0x61

The most commonly used options are:

OptionDescription
-d, --device <path>I2C bus number, for example 2 for /dev/i2c-2.
-a, --address <hex>I2C slave address of the tuner, for example 0x61.
-i, --initUploads the tuner firmware and waits for the chip to become ready. Required after every power-on since the firmware isn’t retained across reboots.
-b, --band <name>Selects the band to tune on: FM, AM_EU, AM_US, WB (weather band), or standby. Defaults to FM.
-f, --frequency <khz>Tunes to the given frequency, in KHz (for example 101100 for 101.1 MHz FM).
-V, --verbosePrints the raw I2C commands and responses, useful for debugging.

A typical first run after boot loads the firmware, selects the FM band, and tunes to a station in one command:

Initialize the tuner and tune to an FM station
root@neuralplex:~# tuner -d 2 -a 0x61 -i -b FM -f 101100

On subsequent calls, once the firmware has already been loaded, you can omit -i and just change band or frequency:

Retune without reloading firmware
root@neuralplex:~# tuner -d 2 -a 0x61 -f 88500