Skip to content

Connecting to your Moku:Lab

shanaek edited this page Apr 13, 2018 · 5 revisions

To connect to your Moku:Lab via any of the Moku:Lab software packages (pymoku, moku-MATLAB or Moku:LABVIEW), you must first ensure it can be detected by your computer. Depending on which software package you are using to connect, you will also require the device IP address, name or serial number. This tutorial demonstrates how you can:

  • Confirm your Moku is detectable by your PC
  • Obtain your Moku's serial number, device name and IP address.

Before you begin, ensure that you have physically connected the Moku:Lab to your PC using one of the network connection options (Ethernet, WiFi or USB), and that it is powered ON.

Follow the steps below for your operating system.

Table of contents

  1. Windows or MacOS
  2. Linux
  3. What Now?
  4. Troubleshooting

Windows or MacOS

Discovery with pymoku

If you have already installed the Moku:Lab Python library (pymoku), Moku:Lab discovery is as simple as opening a terminal and running:

$: moku list

This will print out a list of all active Moku:Lab's on the network, and their device information.

PyMoku 2.3.0
Name                 Serial              IP
-------------------------------------------
TurtleOne             65540  192.168.69.247
Moku                  41130  192.168.69.211
Bode                  41178   192.168.69.60

Windows users will be required to install Apple Bonjour Printer Services.

If your Moku:Lab is not listed in the available services, try the following Bonjour Browser method, or refer to the Troubleshooting section.

Discovery with Bonjour Browser

If you don't already have it, download and install Bonjour Browser.

Once installed:

  1. Open the Bonjour Browser application.

  2. Press the Reload Services button to refresh the list of available network services.

  3. In the Available Bonjour services pane, scroll down to the service(s) with Type field _moku._tcp. If more than one Moku is connected on the network you will find multiple entries with this service type.

    Note: If you do not see any such service listed, refer to Troubleshooting below.

  4. Select the entry that has the same serial number as your Moku:Lab device (the serial number can be read off the base of your Moku:Lab). Once you have selected the correct service, you can read off your Moku:Lab's Device Name and IP Address.

Linux

Install dependencies

If you haven't already, install the dnssd compatibility libraries. To do this for Ubuntu, run the following on a command line:

$: sudo apt-get install libavahi-compat-libdnssd1

Discovery with pymoku

If you have already installed the Moku:Lab Python library (pymoku), Moku:Lab discovery is as simple as opening a terminal and running:

$: moku list

This will print out a list of all active Moku:Lab's on the network, and their device information.

PyMoku 2.3.0
Name                 Serial              IP
-------------------------------------------
TurtleOne             65540  192.168.69.247
Moku                  41130  192.168.69.211
Bode                  41178   192.168.69.60

Discovery with Avahi

Alternatively, you can manually use the avahi library to discover all Moku:Lab services on the network. Just replace 41144 with your device's serial number (found on the base of your Moku:Lab), remembering to omit any leading zeros:

$: avahi-browse _moku._tcp -r | grep -B4 'device.serial=41144'

If your Moku:Lab service successfully resolves, this will print information about your device to the terminal window. E.g.

= eth0 IPv4 TurtleOne                  _moku._tcp  	local
 hostname = [moku_7_65540.local]
 address = [192.168.69.247]
 port = [27182]
 txt = ["device.colour=black" "network.wifi.addr=0.0.0.0" ...
 ...

If your Moku:Lab service does not resolve, then the device is unable to be detected on your network. Refer to the Troubleshooting section.

What now?

Now that your Moku:Lab is successfully connected to your PC, take control of it using any of the Moku:Lab software packages:

Troubleshooting

Unable to resolve Moku's Bonjour service

If you are unable to resolve your Moku:Lab's Bonjour service using the above methods, try the following:

  1. Check that your Moku:Lab is powered on by observing that status LED on the front panel is on and blue/white in colour.
  2. If you are connecting your Moku over :
    • Ethernet - ensure your Moku:Lab's Ethernet port is physically connected to your network's router and it is active (indicated by a green flashing light at the base of the port).
    • Wireless - ensure your Moku is in wireless mode so the status LED is blue, and your computer is connected to the same wifi network (in access point mode the network name will contain your Moku's serial number i.e. Moku-41144).
    • USB - ensure you have plugged the Moku:Lab's micro-USB port into the USB port of your PC. For Linux users, you will have to change the USB-Ethernet network settings to "Link Local" for IPv4 and IPv6. NOTE: Only ONE Moku:Lab may be connected over USB at a time.
  3. Contact your network administrator to ensure that your network allows Bonjour services.
  4. If you are still unable to detect your Moku:Lab on the network, contact Liquid Instruments: support@liquidinstruments.com