Using Multiple Coder Devices (Lab Setup)

Jason Striegel edited this page Sep 11, 2013 · 7 revisions

A new Coder device will announce itself at the http://coder.local/ URL, with wireless configuration available on the CoderConfig network. With multiple devices, as you'll want each Coder device to have its own URL and config network. Setting up a network with more than one Coder device, as you may wish to do in a lab or classroom, is possible with just a bit of planning and up-front configuration.

Give each device a unique hostname

Instead of coder.local, each device will need a unique host name. In a lab, you might want this to be coder01.local, coder02.local, coder03.local, and so on.

The hostname for a Coder device is read at boot time from coder_settings/hostname.txt on the SD Card boot partition.

hostname.txt

This file can be edited from a laptop or PC using a standard text editor. By default, it contains the word coder. Change this to coder01 for the first device, coder02 for the second device, and so on to give each device a unique host name.

editing hostname.txt

Once you've saved your changes, boot Coder with the updated SD Card. It will announce its mDNS url at http://[hostname].local.

Give each device an identifiable Coder name

In Coder's settings, the default Coder name is Coder. This name will appear on the sign in screen and is helpful for identifying the Coder device you are connected to. With multiple devices, you will probably want to change this to reflect the hostname.

Log in to each device, click the gear icon, and then set the Coder name for each device. Ie. Coder01, Coder02, Coder03, and so on.

changing coder name

With this change, when you connect to http://coder01.local/, you'll see "Coder01" at the top of your screen.

custom coder login

Give each device a unique wireless config network (optional)

If you are configuring your devices with a wireless connection, you'll want to make sure they each have a unique config network. By default, they will all try to make a CoderConfig network during setup, and they will conflict with each other.

To give each device a unique config network, you can prepare your SD Card with a special file that will preset its wireless settings. This wpa_supplicant.txt file describes the devices wireless settings, including the fallback network used for configuration. Configured correctly, this file will be loaded by Coder at boot, incorporated into its system settings, and then removed from the boot device to prevent continual reconfiguration on reboot.

Here's how to set your Coder's config network:

Put the Coder SD card in your Laptop or PC.
Copy coder_settings/reset_files/wpa_supplicant.txt to coder_settings/wpa_supplicant.txt

duplicate wpa_supplicant.txt

Edit the new coder_settings/wpa_supplicant.txt in your text editor.

Look for the following section:

  #####
  # This creates a device adhoc network if no connection is found.
  # Change ssid to something else to make Coder boot on another
  # Ad-hoc network if it can't find a WiFi connection.
  #####
  network={
      ssid="CoderConfig"
      mode=1
      key_mgmt=NONE
      id_str="staticadhoc"
  }

And change the ssid to reflect the device's unique hostname.

edit wpa_supplicant.txt

Save your changes and boot Coder with the new SD Card. It will incorporate these settings into its wireless configuration, and when it can't find a network it will create the ad hoc network you specified, in this example, the Coder device will create a network called Coder01Config.

Label your Coder devices and SD Cards

Make sure to write the hostname on each Coder's SD Card. That way you'll know which is which, and you'll know which url to connect to when the device is booted. :)