Skip to content

Y121 Audible and Visual Alarm Technical Manual (RS485 Modbus RTU)

This manual is intended for software development, commissioning, and maintenance of the Y121 RS485 version. For product specifications, see the Y121 Audible and Visual Alarm Specification.


Contents

  1. System Overview
  2. Communication Protocol and Frame Format
  3. Command Map and Parameter Definition
  4. Control Command Examples (0x06)
  5. Query Command Examples (0x03)
  6. Status Response Parsing
  7. Audio File and Configuration Management
  8. Wiring and Commissioning Procedure
  9. Troubleshooting

1. System Overview

ItemDescription
Control targetsVoice playback and tri-color beacon, red, yellow, and green
InterfaceRS485 half-duplex
ProtocolModbus RTU
Default address0x01
Super address0xFF, used for wildcard control on the bus
Default serial settings9600, 8N1
Default volume30 decimal

Notes:

  • Function code 0x06 is used for control commands, meaning a write single register operation.
  • Function code 0x03 is used for status queries, following read holding register semantics.
  • After a control command is received successfully, the device normally echoes the same frame as the response.

2. Communication Protocol and Frame Format

2.1 Basic Control Frame Format

[Addr][Fun][RegHi][RegLo][DataHi][DataLo][CRCL][CRCH]

FieldBytesDescription
Addr1Device address, 0x01 to 0xFE, with 0xFF available as the super address
Fun10x06 for control, 0x03 for query
RegHi + RegLo2Command register address
DataHi + DataLo2Command parameter
CRC2Modbus CRC16, low byte first

2.2 Addressing and Function Codes

Function CodeMeaningTypical Use
0x06Write single registerPlayback, pause, volume, address, baud rate, and beacon control
0x03Read registerQuery online storage, playback status, volume, file count, and audio/light status

2.3 Beacon Linkage Code XY

In high-byte linkage control, XY represents the light effect and beacon color:

  • X: light effect, where 1 = steady on, 2 = slow flash, 3 = strobe flash, 6 = off
  • Y: color, where 1 = red, 2 = yellow, 3 = green, 0 = off
XY ExampleMeaning
0x11Red steady on
0x22Yellow slow flash
0x33Green strobe flash
0x60Beacon off

3. Command Map and Parameter Definition

3.1 Control Commands (0x06)

CMD (RegLo)NameDataHi / DataLo Definition
0x01Next track0000
0x02Previous track0000
0x03Play specified track by physical orderDH DL = track number, 1 to 3000
0x04Volume up0000
0x05Volume down0000
0x06Set volume00 DL, typically 0 to 30
0x08Loop specified single trackDH DL = track number
0x09Select playback device0001 = USB drive, 0004 = FLASH
0x0BSet baud rate00 DL, see Section 3.3
0x0CChip reset0000
0x0DPlay0000
0x0EPause0000
0x0FPlay specified folder and fileDH = folder 01 to 99, DL = track 001 to 255
0x10Loop specified folder and fileSame format as 0x0F
0x11All-track loop enable0001 = on, 0000 = off
0x16Stop playback0001
0x17Loop specified folder00 DL, with DL = 01 to 63
0x18Random playback0000
0x19Current-track loop enable0000 = on, 0001 = off
0xC0Set device address00 DL, with 0x01 to 0xFE
0xC2Independent beacon control00 XY, see Section 2.3

3.2 Query Commands (0x03)

CMD (RegLo)Query ItemKey Response Meaning
0x3FOnline device statusStorage medium online status
0x42Playback statusDL = 00 stop, 01 play, 02 pause
0x43Current volumeDL is the volume value
0x49Total FLASH file countDH DL is the total file count
0x4DCurrent trackDH DL is the current track number
0x70Current audio and light statusDH = audio status, DL = light status
0xFESoftware versionVersion-related response

3.3 Baud Rate Parameter Table (CMD = 0x0B)

DL ValueBaud Rate
0x019600
0x0219200
0x0338400
0x0457600
0x05115200
0x06256000
0x0735250
0x094800

4. Control Command Examples (0x06)

The examples below use target address 01 by default, and the CRC has already been included.

4.1 Playback and Volume

FunctionRequest Frame (Hex)Description
Play track 1 in the root directory01 06 00 03 00 01 B8 0ATrack order follows physical file copy order
Play specified folder and file, 02/00101 06 00 0F 02 01 79 69Plays file 001 in folder 02
Set volume to 3001 06 00 06 00 1E E9 C3Typical volume range is 0 to 30
Stop playback01 06 00 16 00 01 A9 CEStops the current audio playback

4.2 Communication Parameters

FunctionRequest Frame (Hex)Notes
Change baud rate to 1920001 06 00 0B 00 02 79 C9Wait about 1 second, then reset or power-cycle the device
Set device address to 201 06 00 C0 00 02 08 37The new address takes effect immediately and is retained after power loss
Chip reset01 06 00 0C 00 00 49 C9Commonly used to apply parameter changes

4.3 Audio-Light Linkage and Independent Control

FunctionRequest Frame (Hex)Description
Play 01/001 with beacon off, audio alarm only01 06 60 0F 01 01 67 99RegHi = 0x60 means the beacon stays off during this playback
Turn on red beacon, steady on01 06 00 C2 00 11 E8 3ADoes not change the current audio playback state
Turn on green beacon, slow flash01 06 00 C2 00 23 69 EFIndependent light control
Turn beacon off independently01 06 00 C2 00 60 28 1EDoes not affect the current audio playback

4.4 Loop Playback

FunctionRequest Frame (Hex)Description
Loop folder 0101 06 00 17 00 01 F8 0EEnters folder loop mode
Loop specified file 02/00101 06 00 10 02 01 48 AFLocks playback to a single file
Enable current-track loop01 06 00 19 00 00 58 0DLoops the current track
Disable current-track loop01 06 00 19 00 01 99 CDTurns off current-track loop

5. Query Command Examples (0x03)

Query frames usually use the FF super address. The response frame address field returns the actual device address.

Query ItemRequest Frame (Hex)Example Response
Online device statusFF 03 00 3F 00 00 60 1801 03 02 60 08 91 82
Playback statusFF 03 00 42 00 00 F0 0001 03 02 04 01 7B 44
Current volumeFF 03 00 43 00 00 A1 C001 03 02 A1 1E 41 DC
Total FLASH file countFF 03 00 49 00 00 81 C201 03 02 00 08 B9 82
Current trackFF 03 00 4D 00 00 C0 0301 03 02 00 02 39 85
Audio and light statusFF 03 00 70 00 00 51 CF01 03 02 00 12 38 49

6. Status Response Parsing

6.1 Playback Status (CMD = 0x42)

DL ValueStatus
0x00Stopped
0x01Playing
0x02Paused

6.2 Audio and Light Status (CMD = 0x70)

FieldMeaning
Response frame addressCurrent device address
DHAudio status. 0x00 means no playback. 0x01 to 0xFF indicates the playing or last played track number.
DLLight status, encoded as effect plus color

Common DL mappings:

DL ValueLight Status
0x11Red steady on
0x12Yellow steady on
0x13Green steady on
0x21Red slow flash
0x22Yellow slow flash
0x23Green slow flash
0x31Red strobe flash
0x32Yellow strobe flash
0x33Green strobe flash
0x10 / 0x20 / 0x30 / 0x60Beacon off

7. Audio File and Configuration Management

7.1 Audio File Update

ItemRule
Connection methodConnect to a PC through Micro USB after powering off
Supported formatMP3, recommended bit rate <= 192 kbps
Sampling rate8 to 48 kHz, see the specification for details
Update orderPlayback order follows file copy time, not file name sorting
Recommended processFormat the storage first, then copy files one by one in playback order

7.2 Folder Naming Rules for 0x0F and 0x10

ItemRule
Folder names01 to 99
File names001 to 255, for example 001xxx.mp3
Maximum capacityUp to 255 tracks per folder

7.3 Configuration File (TXT)

ItemDescription
File type.txt
File quantityUp to 1 file per device
LocationRoot directory
Configurable itemsKey mode, volume, address, beacon mode
ApplicabilityThe RS485 version normally uses serial commands first, with the configuration file as a supplementary method

8. Wiring and Commissioning Procedure

8.1 Wiring Requirements (RS485)

ItemRequirement
Power supplyDC 9 to 30 V, with 12 to 24 V recommended and current >= 1 A
Bus wiringWire A+ and B- correctly
GroundingA common ground between the host and device is recommended
PolarityDo not reverse the power supply polarity

8.2 Quick Commissioning Steps

StepAction
1Connect power and RS485 wiring, then confirm the indicator status
2Set the host tool to 9600 8N1
3Send 01 06 00 03 00 01 B8 0A to test playback
4After the same frame is echoed back, test beacon control with 0xC2
5If the address or baud rate must be changed, reset the device and switch the host settings after the change

9. Troubleshooting

SymptomPossible CauseRecommended Action
No response to commandsAddress or baud rate mismatch, or A/B reversedReturn to the default settings 01 / 9600 / 8N1 and check A/B polarity
Echo received but no soundMissing files or unsupported audio formatCheck MP3 bit rate and sampling rate, then copy the files again
Playback cuts out at high volumeSupply voltage or current is insufficientUpgrade the power supply to 12 to 24 V with at least 1 A
Device appears offline after address changeHost is still using the old addressUse the new address, or query with FF if needed
Beacon status does not match expectationsXY not set correctly or previous beacon state inheritedSend an explicit 0xC2 command or include the desired beacon state in RegHi of the playback command
Wrong track playsActual file copy order does not match the intended orderFormat the storage and copy the files again in the target sequence