MacOS comes with a DHCP server, although it can be a little tricky to set up. This allows you to connect your computer directly to a Lightform device via an Ethernet cable.
This article explains one way to get this setup to work. Note that it requires using the command terminal, and is therefore a bit of an advanced procedure.
- If your computer is normally connected via Ethernet (to router or modem), disconnect the cable.
- Ensure the Ethernet cable is disconnected from the LF device (if any).
- Download this file: lightform-dhcp-config.plist. You will use it in the steps below.
1. Turn off the Wi-Fi on your computer (System Preferences → Network → Wi-Fi → "Turn Wi-Fi Off"). Make sure to keep this article open while you follow the rest of the steps since you will no longer have Internet access.
2. Connect the Ethernet cable from your LF device to your computer.
3. From the same network preferences tab as before, select the Ethernet connection (it should now show "Connected"). and set the following settings:
Configure IPv4: Manually IP Address: 192.168.33.1 Subnet Mask: 255.255.255.0 Router: (leave blank)
4. Click apply in the bottom right.
5. Now, open up Terminal.app (Applications → Utilities → Terminal.app). Type into the terminal:
ifconfig | grep -C 5 "192.168.33.1"
and press enter. You should see something like below. Note the top line should look something like
enX: flags ... where X could be any number (i.e.
en7). You will need this for the next step.
6. Open the file you downloaded in the pre-condition steps
lightform-dhcp-config.plist. You can open the file in any text editor, or Xcode, etc. Change the entry under
dhcp_enabled to the number you found in the previous step (i.e. if your computer shows
en0, then you would replace
en7 in the file with
en0). Save the file and go back to Terminal.
7. Copy this file to the location where MacOS can see it:
sudo cp ~/Downloads/lightform-dhcp-config.plist /etc/bootpd.plist
This action will require admin privileges, so enter your user password when prompted. Also note that the above command assumes the file is located in your downloads directory (
/Users/<username>/Downloads). If you put it somewhere else, make sure to change the command above accordingly.
8. Disable the DHCP server, then re-enable it in order to use the new configuration you just added. Disable it with:
sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/bootps.plist
And re-enable with:
sudo /bin/launchctl load -w /System/Library/LaunchDaemons/bootps.plist
9. At this point, your LF device should begin attempting to connect to your computer. It may take up to a minute. Afterward it connects, open up Lightform Creator and verify that you can see the device. Notice that it is using one of the IP addresses from the DHCP pool that we created (in the range of 192.168.33.2 - 192.168.33.254).
10. To put your computer back to "normal", simply disconnect Ethernet and turn Wi-Fi back on.
11. In order to re-enable the direct Ethernet connection, you just need to turn off Wi-Fi and re-insert the Ethernet cable into your LF device and computer again. If that doesn't work, try just disabling and re-enabling the DHCP service as shown in (6).
Please sign in to leave a comment.