SubGhz Chat - portapack-mayhem/mayhem-firmware GitHub Wiki

A text chat over Sub-GHz radio, with other PortaPacks and with the ESubGhz Chat app of the Flipper Zero. Messages are sent the way the Flipper's CC1101 sends them, so both can talk to each other, also encrypted: the optional AES-256-GCM encryption is the Flipper's.

This is an external app (.ppma file on the SD card), in the Transceivers menu.

Screen

  • Frequency: default 433.92 MHz, the Flipper's default. All stations in a chat must use the same frequency.
  • RF Amp / LNA / VGA: receive gains. On first start they are set low (amp off, LNA 8, VGA 10): two devices close together overload each other's receiver at higher gains, and messages get lost. Raise them for longer distances.
  • RSSI: signal strength.
  • RX / TX: what the radio is doing right now.
  • Send: opens the keyboard. A message can be up to 200 characters; it is sent in packets of up to 60 bytes.
  • Config: see Config screen.
  • Chat log: the messages, newest at the bottom. Your own messages are green, others' in the normal text colour, and join/leave notices and status lines grey.

Scrolling back

Move the cursor down onto the chat log (it gets a frame) and scroll back with the encoder or Up/Down. While scrolled back, more below shows at the bottom, and new messages do not move the text you are reading. Up on the oldest line, or Left/Right, returns to the buttons. The log keeps about 2 KB of text; the oldest lines go first. It stays when you come back from the keyboard.

Config screen

  • Name: your nickname; messages are sent as Name: text, as the Flipper does.
  • TX gain and TX RF amp: transmit power. Keep it low for devices in the same room.
  • Enable Log: writes the chat to LOGS/SUBGHZCHAT.TXT.
  • Use Small Font: shows the chat log in the compact font.
  • Announce join/leave: sends Name joined chat. shortly after the app opens and Name left chat. when you leave it, like the Flipper. On by default.
  • Encrypt: Off, Password or Hex key, with a button to enter the password or the key (64 hex digits). See Encryption.

Encryption

Encryption follows the Flipper's ESubGhz Chat exactly, so encrypted chats between a Flipper and a PortaPack work:

  • The key is the SHA-256 of the password, or the 32 bytes given as 64 hex digits.
  • Every message is sealed with AES-256-GCM: a random run ID and a counter, a fresh random IV (from receiver noise) and an authentication tag. A message that does not decrypt with your key shows as Can't decrypt: other key?; a message replayed from an earlier recording is refused.
  • The key is not saved: enter it again each time the app is opened, as on the Flipper. After a key is set, the join notice is sent again, encrypted.
  • With encryption on, unencrypted messages from others are still shown, marked (not encrypted).

Radio format

Modulation 2-FSK, ±19 kHz deviation, about 10 kbaud (CC1101 9992.6 baud)
Packet preamble, sync word 0x464C, length byte, up to 60 bytes, CRC-16
Message split into packets; unencrypted text ends in CR LF, as the Flipper sends it

Tips

  • Two devices on a table next to each other: TX gain low, RX amp off, LNA/VGA low. Most lost messages are an overloaded receiver, not too little signal.
  • Interference on 433.92 MHz (weather stations, remotes) can break a packet; send the message again.

Settings Persistence

Frequency, gains, Name, TX gain, TX RF amp, Enable Log, Use Small Font and Announce join/leave are saved to rx_subghz_chat.ini when App Settings is enabled in the global Settings menu. The encryption key is never saved.

Legal notice

Transmitting on 433.92 MHz is allowed licence-free in many countries within the SRD rules (power and duty cycle limits); check local regulations.