Skip to main content

Full duplex FSK modem

Project description

fskmodem

Python package for creating a full duplex frequency shift keying (FSK) soft modem with carrier sense collision avoidance.

Example #1

import fskmodem

# use system default alsa audio device
# use defaults: 300 baud, sync byte = 0x23 (UTF-8 '#')
modem = fskmodem.Modem()
modem.set_rx_callback(my_rx_func)

modem.send(b'hello world!')

Example #2

import fskmodem

def rx_callback(data):
    print(data.decode('utf-8'))

# find alsa audio device by description (see arecord -l)
alsa_device = fskmodem.get_alsa_dev('USB PnP')

# 1200 baud, no sync byte, manual start
modem = fskmodem.Modem(alsa_dev=alsa_device, baudrate=1200, sync_byte=None, start=False)
modem.set_rx_callback(rx_callback)
modem.start()

modem.send(b'hello world!')

Dependencies

The minimodem package is required and can be installed on Debian based systems using the following command:

apt install minimodem

Credits

The minimodem Unix application is developed by Kamal Mostafa http://www.whence.com/minimodem/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fskmodem-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file fskmodem-0.1.0.tar.gz.

File metadata

  • Download URL: fskmodem-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for fskmodem-0.1.0.tar.gz
Algorithm Hash digest
SHA256 634be521bd7bad155972f168310ca95125367b88c408fce45fe22904f99d9621
MD5 6a0ebfffe344af43c9c4cfcf49611b7d
BLAKE2b-256 5ce5c3d6175acd399b0e174cec56afd6c39d48a57ff7ca1942a258fccbaf159c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page