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 reciever, you must append the imx8qm-np-cellular-gps.dtbo device tree overlay to the /boot/overlays.txt file. Once appended, reboot the system and execute the following commands below:
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 38400root@neuralplex:~#screen /dev/ttyLP1 38400You 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();}AM/FM Radio Tuner
Section titled “AM/FM Radio Tuner”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. To control it via C++ in the Reference App, use the following code:
Tuner *tuner = new Tuner();engine.rootContext()->setContextProperty("tuner", tuner);