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 hashes)

Uploaded Source

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