Lantronix® SGX 5150 IoT Device Gateway / Serial Device Server setup in macOS

Last modified: Nov 9, 2025 3:00 PM
0 363 Last modified Nov 9, 2025 3:00 PM

Preliminary document subject to change


This document describes how to configure a Lantronix SGX 5150 IoT Device Gateway for the dedicated purpose of using a serial printer with current production Macs and iOS devices (iPhones and iPads). The specific printer used for developing this document shall be the Apple ImageWriter II dot matrix printer, but the particular printer model does not matter to the Lantronix device. Specific instructions for the ImageWriter series will be addressed in a future User Tip.

This setup procedure has been verified to work with Brave, Firefox, and Safari, including both desktop and mobile versions of each. Safari is preferred for its authentication advantages, but the procedure is otherwise generic and applicable to any recent browser app.



Introduction, prerequisites, and expectations


Printing to the ImageWriter will require an additional, separate, networked device functioning as a print server. A nearly turnkey procedure using a Raspberry Pi, its built-in CUPS interface and suitable driver package will be developed and addressed in that future User Tip. Since that document will incorporate instructions for using a commonly available USB to serial adapter, it is necessary to follow only those steps in that document (to be developed) before proceeding with this one. Yes, it is "backwards" in that regard, but the idea is to construct a reliable foundation before building the structure it supports. The Lantronix serial device server is an integral part of that foundation, but it is not the only option.


Certain fundamental skills may be required including the ability to obtain and use suitable cables and connectors. Depending on your taste for an elegant installation it may also require soldering some tiny connections.


Once the printer is installed on the Raspberry Pi print server — meaning, it is connected to and functioning on that device — printing from the Mac is a simple matter of adding that shared device to Printers & Scanners in the usual macOS manner. Then, File > Print is all you need to do.



0. How to use this document


Before proceeding with any installation, please read this entire User Tip from start to finish including any disclaimers that may appear.


This document is intended to augment but not supersede or contradict any manufacturer's instructions. Refer to the respective manufacturers' websites for documentation and support.


Screenshots may vary depending on the specific browser or macOS version installed.


As with any web page, links in this document are subject to change and may become outdated without notice.



1. Initial device configuration


Documentation for reference:


SGX 5150 USER GUIDE 20221213.pdf - Lantronix

SGX 5150 QUICK START GUIDE IoT Device Gateway - Lantronix


Unbox the Lantronix device, connect its two antennas and its power adapter. After a moment or two its Status LED will flash a code in a repeating pattern of two long flashes and two short flashes, indicating it is waiting for a wireless network link. If it is connected to a wired network, the pattern will be three long flashes followed by two short flashes. Refer to its documentation Table 3-3.


  • If the device is not new, you may wish to reset it to factory defaults by pressing and holding its tiny reset button with a toothpick or similar object. Wait for it to complete its startup sequence, its LEDs flashing their code, then press and hold that button for six seconds, and release. After a moment or two the LEDs will extinguish and the device will reboot.
  • Do not reset the device until it has already completed its startup sequence, and do not power it down until after it restarts and the blinking LED pattern resumes. I don't know what will happen otherwise.


The SGX5150 incorporates its own embedded web server (EWS) that exists for the sole purpose of managing the device. You can connect to that dedicated wireless network by selecting the Wi-Fi network in your Mac's menu bar. It will be named SGX-5150_something in which the last few octets are close to, but may not be exactly, the Device ID. You need to know that for reasons I will explain presently. Connect to that Wi-Fi network and load its default IP address in Safari's Unified Search Field:

192.168.0.1 


The first thing the EWS does upon connecting to that webpage is ask for authorization credentials you may not know, or may not work. For "older" devices (defined as models produced prior to January 1 2020) the Quick Start Guide suggests using admin and PASS for its username and password (respectively) so try them, but don't be surprised if they are rejected. If they don't work a different password applies to "newer" devices: Use the last eight characters of its MAC address / Device ID for its password (which may or may not be printed on the case) but they might not work either.


  • If the device MAC address is not printed on its case, the box it came in, or any other place you can find, the easiest thing might be to download and run Lantronix Provisioning Manager which queries your LAN for any Lantronix branded devices and reports their MAC addresses. (instructions to be developed)
  • Depending on the complexity of your LAN another option may be to use arp -a to scan your network for devices you do not recognize.


In fact I have yet to encounter any SGX5150 in which any of those credentials were accepted. Lantronix Technical Support also suggested using PASSWORD or L@ntr0n1x so you might as well try them, but they didn't work either. If you are successful though, skip the rest of this section and proceed to Step 2.


If you give up on the ability to log in to its EWS the next step is to Telnet to the device (Lantronix calls it the CLI for Command Line Interface) and use Telnet to assign a login password.


  • While you can use Telnet exclusively to configure the device, its EWS is much easier to navigate.
  • Telnet is considered to be an "insecure" communications tool, and Apple no longer incorporates it in macOS.
  • Older Macs may or may not have Telnet installed depending on their age and macOS version.
  • If you prefer to use a third party app in lieu of the popular but potentially troubleprone "homebrew" Telnet option I highly recommend ‎Serial on the Mac App Store which includes the Telnet protocol. Not free, but worth every cent.
  • ssh is a better option but... you don't have login credentials yet! Catch-22.
  • The reason you can use Telnet is that it does not require login credentials by default, whereas even the initially nonsecure EWS requires authentication.
  • Although you can, I recommend not altering that network, its name, IP address, or anything else about it other than the EWS's login credentials.
  • Recovering from an inability to communicate with the SGX5150's EWS typically requires a hardware reset followed by starting over from the beginning. Its hardware reset button can be disabled though, leaving you with progressively fewer recovery options.


The following example is what a successful Telnet initialization may resemble on your Mac:

john@iMac14 ~ % telnet 192.168.0.1
Trying 192.168.0.1...
Connected to 192.168.0.1.
Escape character is '^]'.


SGX5150-0080a3e0192a>enable
SGX5150-0080a3e0192a(enable)#config
SGX5150-0080a3e0192a(config)#user management
SGX5150-0080a3e0192a(config-user-management)#admin password PASS
   WARNING: Web server has been restarted. Please wait for a few seconds.
SGX5150-0080a3e0192a(config-user-management)#show
User Management Configuration:

Admin User:
   Name    :           admin
   Password:           (Configured)

Current Users:
<None>
Current Roles:
   Name    :           Administrator
   Write   :           <All>
   Execute :           <All>

   Name    :           Technician
   Write   :           <All except user management>
   Execute :           <All except factory reset>

   Name    :           User
   Write   :           <None>
   Execute :           <None>

SGX5150-0080a3e0192a(config-user-management)#write
SGX5150-0080a3e0192a(config-user-management)#exit
SGX5150-0080a3e0192a(config)#exit
SGX5150-0080a3e0192a(enable)#exit
Connection closed by foreign host.
john@iMac14 ~ % 


Explanation of the above Telnet session:


  • enable allows you to change parameters.
  • The key concept is that typing admin password PASS changes the admin login password to PASS which its documentation indicates it should have been. Of course you can use any password you desire, or no password.
    • Telnet is insecure anyway, so why not use a password everyone knows. We're talking about a printer here, so unless you deliberately enable additional features of the SGX5150 its potential for evildoers is limited.
    • You can implement Telnet login credentials, but why do that when you can disable the insecure Telnet altogether and use ssh instead.
    • More on that subject later — your present task is to configure the SGX.
    • You can disable ssh too. As you will see there are all sorts of ways of securing this thing, including permanently locking out all users (meaning, yourself) rendering the device completely and eternally tamperproof.
  • The write command writes changes to the device's flash memory.
  • The show command displays its current configuration.
  • exit backs out, or you can just close the Terminal window. The Telnet server will shut itself down after fifteen minutes of inactivity (by default).


Then, return to the EWS webpage, log in with the credentials you just provided, and proceed to configure the device as described in Step 2 that follows. Don't be intimidated – 90% of its features won't be needed for your geriatric ImageWriter. Most of the challenge will be understanding its terminology.



2. Configuring WLAN (wireless network) information


Remain connected to the SGX-5150_something wireless network. Launch Safari or your favorite web browser app and log in with the credentials you just provided.


  • For configuration purposes the SGX uses web server port 80 by default, so those credentials are sent in a nonsecure manner. For mobile Safari, you will need to disable the Not Secure Website Warning in Settings > Apps > Safari. You can disable the nonsecure port later.
  • Checking the box "remember this password" will automatically keep the connection alive even after neglecting to interact with it for a long time. Other browsers don't do that.
  • Click the Network tab at the top, then Wireless Network > Configuration and make the following changes:
  • DHCP Client > Off
  • Default Gateway > enter the IP address of your wireless router.
  • IP Address > enter an address within the IP address range of your wireless router.
    • Important: The address you choose will be the IP address you intend to use for the serial port / tunnel, so make it one you will remember. You will use that address when adding the printer to Printers & Scanners.
  • If you don't know what any of that means consult your wireless router's documentation.


Leave all the other options unchanged. Click Submit. A green bar will appear confirming the change. Do not reboot yet, because the SGX still needs to know how to connect to your wireless network.


  • Select WLAN Scan / Quick Connect and confirm the dialog with OK.


A few moments will transpire as the SGX scans your wireless network environment, looking for your router. When you see your network name (SSID), select it. WLAN Profile "New Profile" will appear at the top suggesting the wireless network configuration it proposes using.


  • Click Test Connection and confirm. A green bar will appear confirming success.
  • Click Apply, confirm, then Submit. This writes the configuration to flash memory.


As the ensuing warning states, the network you had been using to configure the SGX will cease to exist until it reboots. This can be confusing because after the SGX reboots the Mac will proceed to go about seeking a familiar wireless network in its usual manner.


If all went well you can manually select your usual wireless network — not the one named SGX-5150_something. Forget about that network for now; in fact you ought to configure your Mac's Network Settings so as not to automatically connect to it all the time.


  • Reboot the SGX: go to Status > Reboot.


"Rebooting device..." and Please point your browser to the correct IP Address will helpfully appear as a reminder of what you need to do next: manually type the IP address you just provided above, and authenticate with the credentials you provided in the previous step. Or, just cycle its power. Allow a moment for it reboot (about 75 seconds).


For the first time, more front panel LEDs will illuminate:


  • The amber WLAN LED, no longer blinking, indicates a wireless LAN connection.
  • Green LEDs to its right indicate its relative signal strength.
  • The Status LED will change its blink pattern indicating the lack of a wired LAN connection since we did not configure it yet. If you connect its Ethernet port to your router, it will change to solid green, but remember it's getting that address through DHCP by default. If you want to change it to a static IP address also, you can do that too.


Once again be sure to check the box "Remember this password" which will be the last time you ever need to provide those credentials (assuming Safari) until you change them or the IP address of the SGX since Safari correlates those credentials to that address.


This is a good opportunity to pause and review your actions taken so far. The hard part is over and only a few steps remain.



3. Configuring the serial ports and tunnel


Procedure to be developed. Those steps will describe configuring the "Tunnel" (the manner in which IP packets sent over the LAN are directed to the serial port) and the "Serial Line" (communication options for the ImageWriter printer, or any other serial device). Much of it will draw upon the following, which explains terminology specific to Lantronix devices and addresses salient points specific to configuring its serial port:


https://ltrxdev.atlassian.net/wiki/spaces/LTRXTS/pages/97944182/Updating+to+SGX5150+from+older+Wibox+units



4. Raspberry Pi configuration


Raspberry Pi print server instructions: https://tinkerdifferent.com/threads/imagewriter-ii-pi-print-server-for-modern-retro-printing.4332/


Procedure to be developed using the direct connection it describes, in lieu of wireless. AirPrint will work either way. Configuring the Raspberry Pi is so simple you might not need anything more than the above.


Include development credits:


Josh Moyer for having brought significant, broad improvements to Ghostscript's Apple devices including updates, color printing (not seen since the original Macintosh), bidirectional printing support (same) and improved compliance with Apple's own documentation (link). Josh's attention to detail exceeds Apple's own.

Chris Liddell - Artifex, the owner of Ghostscript, for keeping Apple devices included in GPL Ghostscript

Till Kamppeter - Founder, Linux OpenPrinting

Michael Sweet - Apple alumnus and architect of CUPS, the macOS / Linux standard printing system

etresoft and Grant Bennet-Alder - Apple Support Communities



5. Adding the print server to Printers & Scanners


Procedure to be developed.



6. Optional features


Procedure to be developed, to address setup parameters for NTP time server clock, time zone, DNS server, device names, client security features, firmware updates...


  • A firmware update takes about one minute to upload, followed by a normal reboot, for a total of 90 seconds or so. After updating firmware Accept Mode needs to be re-enabled (probably a bug).



7. Additional Resources


Lantronix WiBox WBX2100E Serial Device Server setup notes (deprecated)


  • The WiBox is the antiquated predecessor to the far more capable SGX5150. Be sure to read the comment / epitaph at the end.


Lantronix SGX5150 to ImageWriter II Mini-DIN 8 cable


  • The Mini-DIN connector is not common and I know of no commercially available cable that will not require adapters / gender changers etc. You can certainly cobble one together if you don't mind using them with the above schematic as a guide. Otherwise make your own.


Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.