made package
This commit is contained in:
parent
2f0e6ae895
commit
0331bd7df7
4 changed files with 36 additions and 3 deletions
10
README.md
10
README.md
|
|
@ -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).
|
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
|
## Usage
|
||||||
|
|
||||||
provide payload as command line argument or via pipe
|
provide payload as command line argument or via pipe
|
||||||
|
|
@ -33,11 +39,11 @@ options:
|
||||||
Payload passed as argument
|
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
|
Payload passed through pipe
|
||||||
|
|
||||||
```
|
```
|
||||||
$ echo "Hello World" | /bin/python3 loratransmit.py --freq 917500000 /dev/ttyACM0
|
$ echo "Hello World" | loratransmit --freq 917500000 /dev/ttyACM0
|
||||||
```
|
```
|
||||||
|
|
@ -2,6 +2,7 @@ import os
|
||||||
import glob
|
import glob
|
||||||
|
|
||||||
from .loratransmit import *
|
from .loratransmit import *
|
||||||
|
from .RNode import RNodeInterface
|
||||||
|
|
||||||
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||||
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import sys
|
import sys
|
||||||
import select
|
import select
|
||||||
import argparse
|
import argparse
|
||||||
from RNode import RNodeInterface
|
from .RNode import RNodeInterface
|
||||||
|
|
||||||
def packetize(str):
|
def packetize(str):
|
||||||
utf8_bytes = str.encode('utf-8')
|
utf8_bytes = str.encode('utf-8')
|
||||||
|
|
|
||||||
26
setup.py
Normal file
26
setup.py
Normal 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',
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue