Skip to content

Connectivity

In some configurations, the NeuralPlex comes equipped with an 802.11b/g/n module that can be set up as an Access Point (AP) or a client. To enable the WiFi module, you must append the imx8qm-np-wifi.dtbo device tree overlay to the /boot/overlays.txt file. Once appended, reboot the system and the module will be enumerated on the USB bus and will create a wlan interface. By default, the Wi-Fi module is set up as an AP, broadcasting the SSID: NeuralPlex-xxx with a passphrase: 12345678.

To set the Wi-Fi in the Access Point (AP) mode, follow the steps below:

  1. Edit the configuration file for the AP mode:
    Terminal window
    root@neuralplex:~# vi /etc/NetworkManager/system-connections/wifi-ap.nmconnection
  2. Enter the following terminal commands to enable the AP mode:
    Terminal window
    root@neuralplex:~# nmcli con down wifi-client
    root@neuralplex:~# nmcli con up wifi-ap

Now, you will be able to connect a client to the NeuralPlex.

To set the Wi-Fi in the Client mode, follow the steps below:

  1. Edit the configuration file for the client mode:
    Terminal window
    root@neuralplex:~# vi /etc/NetworkManager/system-connections/wifi-client.nmconnection
  2. Enter the following terminal commands to enable the STA mode:
    Terminal window
    root@neuralplex:~# nmcli con down wifi-ap
    root@neuralplex:~# nmcli con up wifi-client
  3. Use the command ifconfig to ensure the connection of NeuralPlex to the Access Point.

If you wish for Client mode to be the default, you must change the autoconnect parameter in both wifi-ap.nmconnection and wifi-client.nmconnection files. Setting the autoconnect=true will make that mode default. Only one of the files can have autoconnect=true.

In some configurations, the NeuralPlex comes equipped with a Bluetooth 5 module and the BlueZ software. This section describes directly configuring bluez via the bluetoothctl command line tool. The exact procedure depends on the devices involved and their input functionality. What follows is a general outline of pairing a device using bluetoothctl.

Start the bluetoothctl interactive command. Input help to get a list of available commands.

  1. (Optional) Enter power on to turn the power to the controller on if the device is set to off. It is on by default.

  2. Enter device discovery mode with scan on command if device is not yet on the list.

  3. Enter pair MAC_ADDR to do the pairing (replace MAC_ADDR with the device’s MAC address - tab completion works).

  4. If using a device without a PIN, one may need to manually trust the device before it can reconnect successfully. Enter trust MAC_ADDR to do so.

  5. Enter connect MAC_ADDR to establish a connection.

    An example session may look like this:

    bluetoothctl
    [bluetooth]# power on
    Changing power on succeeded
    [CHG] Controller 00:10:20:30:40:50 Powered: yes
    [bluetooth]# scan on
    Discovery started
    [CHG] Controller 00:10:20:30:40:50 Discovering: yes
    [NEW] Device 00:12:34:56:78:90 device name
    [CHG] Device 00:12:34:56:78:90 LegacyPairing: yes
    [bluetooth]# pair 00:12:34:56:78:90
    Attempting to pair with 00:12:34:56:78:90
    [CHG] Device 00:12:34:56:78:90 Connected: yes
    [CHG] Device 00:12:34:56:78:90 Connected: no
    [CHG] Device 00:12:34:56:78:90 Connected: yes
    Request PIN code
    [agent] Enter PIN code: 1234
    [CHG] Device 00:12:34:56:78:90 Paired: yes
    Pairing successful
    [CHG] Device 00:12:34:56:78:90 Connected: no
    [bluetooth]# connect 00:12:34:56:78:90
    Attempting to connect to 00:12:34:56:78:90
    [CHG] Device 00:12:34:56:78:90 Connected: yes
    Connection successful

The NeuralPlex has one Gigabit Ethernet interface that allows connection to the LAN network. The Ethernet interface can be configured in either DHCP client or DHCP server mode. By default, it’s configured as a DHCP client.

To set the Ethernet interface in the DHCP Server mode, follow the steps below:

  1. Edit the configuration file for the DHCP Server mode:
    Terminal window
    root@neuralplex:~# vi /etc/NetworkManager/system-connections/eth-server.nmconnection
  2. Enter the following terminal commands to enable the server mode:
    Terminal window
    root@neuralplex:~# nmcli con down eth-client
    root@neuralplex:~# nmcli con up eth-server

To set the Ethernet interface in the DHCP Client mode, follow the steps below:

  1. Edit the configuration file for the DHCP Client mode:
    Terminal window
    root@neuralplex:~# vi /etc/NetworkManager/system-connections/eth-client.nmconnection
  2. Enter the following terminal commands to enable the client mode:
    Terminal window
    root@neuralplex:~# nmcli con down eth-server
    root@neuralplex:~# nmcli con up eth-client

TODO

In some configurations, the NeuralPlex comes equipped with a LTE modem to support cellular connectivity. To enable the LTE modem, you must append the imx8qm-np-cellular-gps.dtbo device tree overlay to the /boot/overlays.txt file. Once appended, reboot the system and the modem will be enumerated on the USB bus and will create multiple /dev/ttyUSBx interfaces. ModemManager will detect the modem and automatically try to activate the connection with the network provider of the SIM card. Once activated, NetworkManager will take care of enabling the network interface, as configured in /etc/NetworkManager/system-connections/lte.nmconnection.

ModemManager
# List the available modems
root@neuralplex:~# mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] SIMCOM_SIM7600G-H
# Show the status of the modem (check the index of your modem)
root@neuralplex:~# mmcli -m 0
-----------------------------------
General | path: /org/freedesktop/ModemManager1/Modem/0
| device id: 1b85181f74c0b9fcb780b3af58e4e540926bf1f1
-----------------------------------
Hardware | manufacturer: QUALCOMM INCORPORATED
| model: SIMCOM_SIM7600G-H
| firmware revision: LE20B04SIM7600G22
| carrier config: VoLTE-ATT
| carrier config revision: 05010334
| h/w revision: 10000
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 862636055528671
-----------------------------------
System | device: /sys/devices/platform/bus@5b000000/5b110000.usb/5b130000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4
| physdev: /sys/devices/platform/bus@5b000000/5b110000.usb/5b130000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4
| drivers: qmi_wwan, option
| plugin: simtech
| primary port: cdc-wdm0
| ports: cdc-wdm0 (qmi), ttyUSB0 (ignored), ttyUSB1 (gps),
| ttyUSB4 (audio), wwan0 (net)
-----------------------------------
Status | state: failed
| failed reason: sim-missing
| power state: on
-----------------------------------
Modes | supported: allowed: 2g; preferred: none
| allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 4g; preferred: 4g
| allowed: 2g, 4g; preferred: 2g
| allowed: 3g, 4g; preferred: 4g
| allowed: 3g, 4g; preferred: 3g
| allowed: 2g, 3g, 4g; preferred: 4g
| allowed: 2g, 3g, 4g; preferred: 3g
| allowed: 2g, 3g, 4g; preferred: 2g
| current: allowed: 2g, 3g, 4g; preferred: 4g
-----------------------------------
Bands | supported: egsm, dcs, pcs, g850, utran-1, utran-4, utran-6, utran-5,
| utran-8, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5,
| eutran-7, eutran-8, eutran-12, eutran-13, eutran-18, eutran-19,
| eutran-20, eutran-25, eutran-26, eutran-28, eutran-34, eutran-38,
| eutran-39, eutran-40, eutran-41, eutran-66, utran-19
| current: egsm, dcs, pcs, g850, utran-1, utran-4, utran-6, utran-5,
| utran-8, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5,
| eutran-7, eutran-8, eutran-12, eutran-13, eutran-18, eutran-19,
| eutran-20, eutran-25, eutran-26, eutran-28, eutran-34, eutran-38,
| eutran-39, eutran-40, eutran-41, eutran-66, utran-19
-----------------------------------
IP | supported: ipv4, ipv6, ipv4v6
-----------------------------------
3GPP | imei: 862636055528671
-----------------------------------
SIM | sim slot paths: slot 1: none (active)
| slot 2: none

To set the APN of your netowrk provider, you can edit the /etc/NetworkManager/system-connections/lte.nmconnection file and enter your APN here. However, some modems ignore this section and require you to manually set the APN via AT commands.

AT Commands
# Open the AT port of the modem (ModemManager specifies which port is for AT)
root@neuralplex:~# screen /dev/ttyUSB2
# Print the modem model number
> ATI
# Set the APN
> AT+CGDCONT=1, "IPV4V6", "your-apn-here"

Once the APN has been set, ModemManager will report if the modem is registered on the network and also provide the signal strength. To test for internet connectivity, execute the ping command while specifying the network interface:

Check Internet Connectivity
# List all network interfaces
root@neuralplex:~# ifconfig
# Ping Google's server from the modem interface
root@neuralplex:~# ping -I wwan0 google.com