made package

This commit is contained in:
randogoth 2023-05-28 22:02:51 +03:00
parent 2f0e6ae895
commit 0331bd7df7
4 changed files with 36 additions and 3 deletions

View file

@ -4,6 +4,12 @@ Simple commandline raw LoRa packet transmitter for [RNode](https://unsigned.io/a
It's meant to be complementary to the packet sniffer [LoRaMon](https://github.com/markqvist/LoRaMon) and uses the latest [Python Module](https://github.com/markqvist/RNode_Firmware/tree/master/Python%20Module) that comes with the [RNode Firmware](https://github.com/markqvist/RNode_Firmware).
## Install
```
$ pip install loratransmit
```
## Usage
provide payload as command line argument or via pipe
@ -33,11 +39,11 @@ options:
Payload passed as argument
```
$ /bin/python3 loratransmit.py --freq 917500000 /dev/ttyACM0 "Hello World"
$ loratransmit --freq 917500000 /dev/ttyACM0 "Hello World"
```
Payload passed through pipe
```
$ echo "Hello World" | /bin/python3 loratransmit.py --freq 917500000 /dev/ttyACM0
$ echo "Hello World" | loratransmit --freq 917500000 /dev/ttyACM0
```

View file

@ -2,6 +2,7 @@ import os
import glob
from .loratransmit import *
from .RNode import RNodeInterface
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]

View file

@ -3,7 +3,7 @@
import sys
import select
import argparse
from RNode import RNodeInterface
from .RNode import RNodeInterface
def packetize(str):
utf8_bytes = str.encode('utf-8')

26
setup.py Normal file
View file

@ -0,0 +1,26 @@
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="loratransmit",
version="0.3.2",
author="randogoth",
author_email="randogoth@posteo.org",
description="LoRa packet transmitter for RNode hardware",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/randogoth/loratransmit",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
entry_points= {
'console_scripts': ['loratransmit=loratransmit:main']
},
install_requires=['pyserial'],
python_requires='>=3.6',
)