Page 2
Legal Notices This User Manual provides user information and is provided “as is.” Swarm Technologies and its affiliated companies, directors, officers, employees, agents, trustees or consultants (“Swarm”) assume no responsibility for any typographical, technical, content or other inaccuracies in this User Manual. Swarm reserves the right to revise this User Manual or withdraw it at any time without prior notice.
Page 3
The purchase of any Swarm products shall not be deemed to grant either directly or by implication or otherwise, any license under copyrights, patents, or patent applications of Swarm or any third party software provider, except for the normal, nonexclusive, royalty free license to use that arises by operation of law in the sale of a product.
Page 6
$PO - Power Off $PW - Power Status $RD - Receive Data Message $RS - Restart Device $RT - Receive Test $SL - Sleep mode $M138 - Modem Status $TD - Transmit data November 2021 Swarm M138 Modem Manual - Rev 1.00 6/77...
Zealand, United Kingdom, European Union, Brazil, as well as worldwide. 1.1 FCC Compliance Currently under review 1.1.4 FCC ID: The Swarm Modem is currently under test and will receive FCC ID at a later date. 1.2 ISED Compliance Currently under review 1.2.2 IC ID: The Swarm Modem is currently under test and will receive IC ID at a later date.
Currently under review 1.5 Transceiver Regulatory Certification The Swarm Modem is a regulatory approved modular transmitter that is designed to be integrated into an enclosed host system. With appropriate external connections, the host can be designed to meet full regulatory tests and sold as a regulatory certified product that meets FCC, IC, and CE requirements.
IoT applications. The Swarm Modem is a Mini-PCI Express Card that can be easily integrated into any new or existing PCB design. The Swarm Modem communicates via a standard 3.3V CMOS serial UART interface or a PC interface with a USB-to-serial converter.
The overall dimensions of the Modem and its weight are summarized in Table 3. Parameter Value Length 51.0 mm Width 30.0 mm Height 5.3 ±0.1 mm Weight 9.6 g Table 3: Modem Mechanical Dimensions and Weight. Figure 1: Modem front and back views. November 2021 Swarm M138 Modem Manual - Rev 1.00 10/77...
3.2 Environmental The environmental specifications of the Modem are summarized in Table 4 below. The Swarm Modem is not conformally coated, and as such the user needs to provide any weatherproofing for their application. Parameter Value Operating Temperature Range -40 °C to +85 °C Storage Temperature Range -40 °C to +85 °C...
4.2 Modem Pin Allocation The pin numbering scheme of the Swarm Modem is shown in Figure 4. All pins are located on the card edge of the Swarm Modem and are designed to fit in a standard mPCIE card connector. The pin function assignment is given in Tables 7 and 8. Multiple supply grounds are provided and all power pins / supply grounds are required to be connected to the power supply in order to limit the current on any one pin.
Page 14
The 1PPS signal is a one pulse per second signal synchronised with GPS. *leave open if not used HIGH when transmitting LOW when receiving *leave open if not used Table 8: Additional notes on pin numbers. November 2021 Swarm M138 Modem Manual - Rev 1.00 14/77...
The DC power interface consists of the DC power inputs as summarized in Table 9. The power requirements apply to DC power measured at the Swarm Modem user connector input and not at the output of the power supply. It is required that users incorporate the required bypass...
Page 16
Figure 5: Example current use for a Modem with a 3.3 V input from wake-up, GPS acquisition, Transmit, Receive mode, and then sleep mode. Note the two breaks in the y-axis scale. November 2021 Swarm M138 Modem Manual - Rev 1.00 16/77...
Page 17
111 μF Sum total of all inductance 1901 nH Largest capacitor 47 μF Largest inductor 1000 nH Total Input Capacitance 57 μF Table 11: Other electrical characteristics for the Modem November 2021 Swarm M138 Modem Manual - Rev 1.00 17/77...
All customer messages, data, and settings are stored in non-volatile memory. As such, after a power cycle, customer settings as well as any messages that have not yet been transmitted over the Swarm network will be retained on the Modem. The read/write lifetime of the Modem memory exceeds 20 years.
Modem. 5.1 Input Connections The Swarm Modem utilizes standard 51 mm x 30 mm mPCIe form factors that require an industry standard connector listed below. All voltage pins need to be connected in such a way to minimize ground loops, often down by using a via to a power/ground plane. A method of retaining the Modem is also required, whether it be a retaining clip or screws.
5.5V. Most customers are operating remotely and use switching regulators for high efficiency and battery applications. We have provided example parts below. The customer can use these as a baseline for starting their own designs using other suppliers. November 2021 Swarm M138 Modem Manual - Rev 1.00 21/77...
Page 22
RSSI and impeding successful transmission. We highly recommend an RF CAN over any switching regulator to eliminate the risk of radiated emissions from the switcher. An example RF CAN and proper layout is pictured below. November 2021 Swarm M138 Modem Manual - Rev 1.00 22/77...
GND. It is highly recommended that the designer use a 6-pin connector to easily accommodate a COTS TTL (USB-A to UART) cable or Tag-Connect, for example: Figure 6: Example of a Serial Debug Header, shown on the Swarm Eval Board November 2021 Swarm M138 Modem Manual - Rev 1.00...
There are many methods to level shift a signal ranging from simple mosfets and resistors to dedicated IC’s to handle the operation. Level shifting should be bi-directional. November 2021 Swarm M138 Modem Manual - Rev 1.00 24/77...
5.5 Example Design Figure 7: Schematic of a buck-boost-solar charger design for a Swarm Modem integration. Full schematic for the Swarm Eval kit available at https://swarm.space/developertools/ November 2021 Swarm M138 Modem Manual - Rev 1.00 25/77...
Page 26
Figure 8: Sample hardware reference design integration for the Swarm Modem. This is a low noise buck-boost-solar charger example with the Swarm Modem (reference design files can be found at www.swarm.space/developertools/ A 6-pin serial programming header (upper-left of image) is highly encouraged so that the Modem firmware can be easily updated in the future.
1909763-1]. This is a surface mount connector that is directly attached to the Modem. A Swarm VHF antenna must be used to ensure that the antenna is tuned appropriately to make successful transmission to the Swarm satellites. Swarm antennas are tuned for VSWR (between Swarm Bands) with a peak Δ...
Wurth: 636201050100 6.2.2 Ground Plane Requirements An antenna counterpoise or antenna ground plane is required for the Swarm Coiled ¼ Wave Antenna. Ground planes are electrically conductive surfaces that are connected to the ground conductor of the antenna that serve as a reflecting surface for radio waves.
Page 30
Figure 10: Example ¼-wave antenna with a (Swarm) 9W solar panel serving as the required 30 x 30 cm ground plane off to one side. Tested extensively in the field and works well. November 2021 Swarm M138 Modem Manual - Rev 1.00...
Touch the Modem’s antenna with your hand or with another object. The noise floor measurement should noticeably change. b. The Modem will not transmit until it has a GPS fix and it hears a Swarm Satellite. There is no risk of the Modem transmitting during this procedure if the red LED is blinking rapidly.
Each x may be any legal ASCII character in the range 0..9, A..F, or a..f. An example command is provided below to illustrate the command structure and a valid checksum. This command returns the most recent date/time message : $DT @*70 $DT 20190408195123,V*41 November 2021 Swarm M138 Modem Manual - Rev 1.00 32/77...
The bootloader may output non-NMEA formatted messages during this time. These messages include, but are not limited to: status messages, firmware update progress messages, and error messages. These messages should be ignored and are for Swarm debugging purposes only. GPS Date/Time Reference The Modem will enter its GPS acquisition state once the boot-up sequence is complete.
All messages sent to or from the Hive have an Application ID tag associated with them. The Application ID can be an arbitrary number from 0 to 64999 (Swarm reserves use of 65000 - 65535), and may be used by the user to organize messages (ex: Application ID 1000 could be used for device telemetry, 2000 for commands to the device and 3000 for emergencies).
Messages Received Management Messages to Transmit Management Power Off Power Status Receive Data Message Restart Device Receive Test Sleep Mode $M138 Modem Status Transmit Data Table 17: Table of all Modem commands November 2021 Swarm M138 Modem Manual - Rev 1.00 35/77...
$CS - Configuration Settings Retrieve and display the configuration settings for the Swarm device ID. These settings are determined by Swarm for identifying and communicating with each individual device. Since there are no variable parameters, the correct checksum has been added.
Disable or set rate of $DT messages Returns one of: Value Description $DT <YYYY><MM><DD><hh><mm><ss>,<flag>*xx The most recent $DT message. $DT <rate>*xx The current $DT rate $DT OK*xx rate updated successfully $DT ERR*xx Command input error November 2021 Swarm M138 Modem Manual - Rev 1.00 37/77...
Page 38
If <rate> is valid, no $DT messages will be sent by the device until the GPS has obtained a valid time reference to set its internal date and time, as indicated by the $M138 DATETIME*35 message . If the GPS loses its time reference, the message is sent with a flag indicating an invalid state.
Page 39
Sets the rate of date/time messages to one message every 300 seconds. Querying the rate of date/time messages: $DT ?*0f $DT 60*36 Returns a rate of one message every 60 seconds. November 2021 Swarm M138 Modem Manual - Rev 1.00 39/77...
An ERR response will be generated if the command is not entered exactly as shown with no additional spaces or characters. Example: $FV*10 $FV 2021-07-16-00:10:21,v1.1.0*74 The firmware version on the device is 1.1.0 November 2021 Swarm M138 Modem Manual - Rev 1.00 40/77...
3 Multiple spoofing indications jamming_level Value ranging from 0 to 255 indicating how much carrier wave (CW) jamming is detected. 0 = no CW jamming, 255 = strong CW jamming November 2021 Swarm M138 Modem Manual - Rev 1.00 41/77...
Page 42
Sets the rate of GPS jamming/spoofing messages to one message every 3600 seconds. Querying the rate ofGPS jamming/spoofing messages: $GJ ?*12 $GJ 10*2c Returns a rate of one message every 10 seconds. November 2021 Swarm M138 Modem Manual - Rev 1.00 42/77...
Disable or set rate of $GN messages Returns one of: Value Description The most recent $GN message <latitude>,<longitude>,<altitude>, <course>,<speed>*xx $GN <rate>*xx The current $GN rate $GN OK*xx Parameters updated successfully $GN ERR*xx Command input error November 2021 Swarm M138 Modem Manual - Rev 1.00 43/77...
Page 44
If <rate> is valid, no $GN messages will be sent by the device until the GPS has obtained a valid position reference as indicated by the $Modem POSITION*2d message . November 2021 Swarm M138 Modem Manual - Rev 1.00 44/77...
Page 45
Sets the rate of GPS messages to one message every 30 seconds. Querying the rate of GPS messages: $GN ?*16 $GN 15*2d Returns a rate of one message every 15 seconds. November 2021 Swarm M138 Modem Manual - Rev 1.00 45/77...
Display current GPIO1 mode mode Set GPIO1 pin mode Returns one of: Value Description $GP <mode>*xx The current $GP mode $GP OK*xx Parameters updated successfully $GP ERR*xx Command input error November 2021 Swarm M138 Modem Manual - Rev 1.00 46/77...
Page 47
$SL command. The pin will return to the awake state only if the sleep mode is terminated by the S or T parameter being reached, or activity is detected on the serial RX line. November 2021 Swarm M138 Modem Manual - Rev 1.00 47/77...
Page 48
Setting the GPIO1 pin mode to input and wake on a high-to-low transition: $GP 2*05 $GP OK*33 Sets the GPIO1 pin mode to input and wake on a high-to-low transition. November 2021 Swarm M138 Modem Manual - Rev 1.00 48/77...
Disable or set rate of $GS messages Returns one of: Parameter Description The most recent $GS message <hdop>,<vdop>,<gnss_sats>,<unused>, <fix>*xx $GS <rate>*xx The current $GS rate $GS OK*xx Parameters updated successfully $GS ERR*xx Command input error November 2021 Swarm M138 Modem Manual - Rev 1.00 49/77...
Page 50
If <rate> is 0, no messages will be sent. If <rate> is valid, no $GS messages will be sent by the device until the GPS has obtained a valid position reference as indicated by the $M138 POSITION*2d message . November 2021 Swarm M138 Modem Manual - Rev 1.00...
Page 51
$GS OK*30 If <rate> is valid, no $GN messages will be sent by the device until the GPS has obtained a valid position reference as indicated by the $M138 POSITION*2d message . Calling the most recent geospatial information message: $GS @*74 $GS 109,214,9,0,G3*46 Returns an HDOP of 1.09, VDOP of 2.14, the device is using 9 GNSS satellites for this solution,...
Message command succeeded $MM ERR,BADPARAM*xx Invalid command or argument to $MM command $MM ERR,DBXINVMSGID*xx Invalid message ID in D or R command $MM ERR,DBXNOMORE*xx No messages found when using R=<O|N> November 2021 Swarm M138 Modem Manual - Rev 1.00 52/77...
Page 53
ID indicate the message has not been placed in the queue and therefore has no ID. The value should be treated as a simple arbitrary number. <es> is the epoch seconds time when the message was received by the Modem. November 2021 Swarm M138 Modem Manual - Rev 1.00 53/77...
Page 54
(in ascii = “example message”). The epoch seconds at which the Modem received the message is 1584494275 (Date/Time = Wednesday, March 18, 2020 1:17:55 PM). This message is now marked as read. November 2021 Swarm M138 Modem Manual - Rev 1.00 54/77...
Page 55
$MM ERR,DBXNOMORE*03 There are no existing unread messages. Enable message notifications: $MM N=E*16 $MM OK*24 Message notifications are now enabled. Query message notifications: $MM N=?*6c $MM N=E*16 Message notifications are enabled. November 2021 Swarm M138 Modem Manual - Rev 1.00 55/77...
<msg_count> is a number indicating the number of messages that are unsent in response to the C=U command or the number of messages deleted in response to the D=U command November 2021 Swarm M138 Modem Manual - Rev 1.00 56/77...
Page 57
ID, a day of year counter, and a message of day counter. Responses that have a 0 as the message ID indicate that the message has not been placed in the queue and therefore has no ID. The value should be treated as a simple arbitrary number. November 2021 Swarm M138 Modem Manual - Rev 1.00 57/77...
Page 58
$MT 68692066726f6d20737761726d,4428826476689,1605639598*55 The unsent message (msg_id = 4428826476689) is returned. The hexadecimal data returned is 68692066726f6d20737761726d (in ascii = “hi from swarm”). The epoch seconds at which the Modem received the message is 1605639598 (Date/Time = Tuesday, November 17, 2020 6:59:58 PM).
Modem at this point. If left connected, the Modem will draw approximately 6mA on its 3.3V input. The Modem will not boot again until power has been completely removed and then restored. Example: $PO*1f $PO OK*3b $M138 BOOT,SHUTDOWN*06 November 2021 Swarm M138 Modem Manual - Rev 1.00 59/77...
The current $PW rate $PW OK*xx Parameters updated successfully $PW ERR*xx Command input error Parameter Description unused Will always show as 0.00000 temp CPU Temperature in degrees C to one decimal point (float) November 2021 Swarm M138 Modem Manual - Rev 1.00 60/77...
Page 61
Sets the rate of power status messages to one message every 30 seconds. Querying the rate of power status messages: $PW ?*18 $PW 900*1e Returns a rate of one message every 900 seconds. November 2021 Swarm M138 Modem Manual - Rev 1.00 61/77...
$RD - Receive Data Message This unsolicited message provides an ASCII-encoded hexadecimal string with the user data received from the Swarm network. Some fields also include signal quality information for the received message. Received data unsolicited messages can be enabled/disabled using the $MM command with the message notification option.
Example: $RS*01 $RS OK*25 $Modem BOOT,RESTART*59 Notes: In order to resolve the DBXTOHIVEFULL error, ensure you’re running firmware version V1.0 or greater and run the following command. $RS dbinit*3d November 2021 Swarm M138 Modem Manual - Rev 1.00 63/77...
The most recent $RT message. This is a RSSI=<rssi_background>*xx measure of the background noise environment (and is not related to rssi_sat) $RT <rate>*xx The current $RT rate $RT OK*xx Parameters updated successfully $RT ERR*xx Command input error November 2021 Swarm M138 Modem Manual - Rev 1.00 64/77...
Page 65
DC-DC power supplies on their own PCB are not injecting RF background noise into the device. November 2021 Swarm M138 Modem Manual - Rev 1.00 65/77...
Page 66
$RT rate. Querying the rate of receive test messages: $RT ?*19 $RT 5*13 Returns a rate of one message every 5 seconds. November 2021 Swarm M138 Modem Manual - Rev 1.00 66/77...
U=09:00:00 is issued, the device will wake 22 hours from now. If a date and time are specified, and that date/time is before the current date/time, $SL WAKE will be immediately issued. November 2021 Swarm M138 Modem Manual - Rev 1.00 67/77...
Page 68
GPIO1. If the GPIO1 pin is configured as an output that indicates the Modem's sleep mode, GPIO1 will transition to the appropriate state if the $SL OK message is emitted. November 2021 Swarm M138 Modem Manual - Rev 1.00 68/77...
Page 69
GPIO1 pin, the Modem will also wake with a message such as: $SL WAKE,GPIO @ 2019-04-11 18:57:55*7f Commanding the Modem to sleep until October 1st, 2021 at 4:30:00 PM: $SL U=2021-10-01 16:30:00*72 $SL OK*3b November 2021 Swarm M138 Modem Manual - Rev 1.00 69/77...
GPS signal quality, it may take several minutes before the DATETIME or POSITION message is emitted. The customer application should wait until the boot process is complete and it has received the $M138 BOOT,RUNNING*49 message before executing any commands. November 2021 Swarm M138 Modem Manual - Rev 1.00...
$RS dbinit*3d In order to send a $TD command, you must first wait for a $M138 DATETIME*35 response after power up. The Modem must wait for a valid time in order to accept a transmit command. All other commands are functional prior to receiving the $M138 DATETIME*35 response.
Page 72
Unspecified error Unable to send within requested hold time ERR,HOLDTIMEEXPIRED,<msg_id >*xx $TD ERR,NODEVICEID*4d The Swarm device ID has not yet been set - contact Swarm Support $TD ERR,NOSPACE,0*00 No space for message $TD ERR,TIMENOTSET*5b Attempt to send message before time set by $TD ERR,DBXTOHIVEFULL*1d Queue for queued messages is full.
Page 73
<hold_dur> will be ignored. Expired messages will only be removed from the outgoing database after a Swarm Modem communicates with a Satellite. <appID> is the application ID tag for the message. If this option is not specified the message will be sent with application ID 0.
Page 74
ID, a day of year counter, and a message of day counter. Responses that have a 0 as the message ID indicate the message has not been placed in the queue and therefore has no ID. The value should be treated as a simple arbitrary number. November 2021 Swarm M138 Modem Manual - Rev 1.00 74/77...
Page 75
ID (5354468575855) $TD SENT,RSSI=-99,SNR=5,FDEV=32,5354468575855*6f 4. Acknowledged message in database is marked for deletion by device. Any unsent messages will be attempted to be sent by the device at a later time. November 2021 Swarm M138 Modem Manual - Rev 1.00 75/77...
Page 76
$TD ET= 1641040496 ,"{"d":"Demo","t":"2021-02-26 15:01:22","seq":"00020"}"*45 $TD OK,5354468575919*23 $TD SENT,RSSI=-100,SNR=-3,FDEV=437,5354468575919*4d Sending a message from the device in ASCII with application ID 3000 (requires firmware version v1.1.0+): $TD AI=3000,"{"d":"Demo","t":"2021-02-26 15:33:22","seq":"00021"}"*52 $TD OK,5354468575919*23 $TD SENT,RSSI=-100,SNR=-3,FDEV=437,5354468575919*4d November 2021 Swarm M138 Modem Manual - Rev 1.00 76/77...
Page 77
Sending a message from the device in HEXASCII: $TD 49206C6F766520537761726D*4c $TD OK,5354468575916*2c $TD SENT,RSSI=-107,SNR=3,FDEV=199,5354468575916*69 November 2021 Swarm M138 Modem Manual - Rev 1.00 77/77...
Need help?
Do you have a question about the M138 and is the answer not in the manual?
Questions and answers