Coder Social home page Coder Social logo

python-ebyte-e32's Introduction

Python 3 command line tool/library for controlling Ebyte LoRa modules like the E32 with GPIOs (Raspberry Pi).

reading

usage: ebyte.py read [-h] serial pin_m0 pin_m1 pin_aux

positional arguments:
  serial      Path to the serial port device.
  pin_m0      M0 GPIO pin number.
  pin_m1      M1 GPIO pin number.
  pin_aux     AUX GPIO pin number.

optional arguments:
  -h, --help  show this help message and exit


python ebyte.py read /dev/serial0 27 17 22
Version:
--------
Frequency: 868MHz
  Version: 13
 Features: 20

Address/channel:
----------------
    addh: 0x00
    addl: 0x02
 address: 0x0002
    chan: 0x02

sped:
-----
    parity_bit: 8N1 (0)
     uart_baud: 19200 (3)
 air_data_rate: 2.4k (2)

option:
-------
  transmission_mode: fixed (1)
      io_drive_mode: TXD, RXD and AUX open-collector (1)
       wake_up_time: 250ms (0)
         fec_switch: on (1)
 transmission_power: 30dBm (0)

writing

python ebyte.py write /dev/serial0 27 17 22 --fec_switch=1 --chan=15

factory reset

python ebyte.py reset /dev/serial0 27 17 22

use as library

See the code in test_raspberrypi.py if you want to use the library in your own code. If you write to the serial device, just call ebyte.wait_for_aux_pin() after every write. You can omit the AUX_PIN parameter, a delay is then used instead of waiting for the pin to go high.

python-ebyte-e32's People

Contributors

vindolin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-ebyte-e32's Issues

python3 msgpack_monitor.py

output:
120
120
126
-30
Traceback (most recent call last):
File "msgpack_monitor.py", line 18, in
for obj_ in unpacker:
File "msgpack/_unpacker.pyx", line 518, in msgpack._cmsgpack.Unpacker.next
File "msgpack/_unpacker.pyx", line 443, in msgpack._cmsgpack.Unpacker._unpack
ValueError: int is not allowed for map key

expected output was:
ofis
26.20
6.00

what should i do for it?

Line 165 - ebyte.py - raise UserWarning(f'not a valid property: {err}')

Not sure if this is me, I cloned your repository and before I make any adjustments (my pins are different [M0=22, M1=27 for the E22 based waveshare SX126x based LoRa hats.
SX1268_433M_LoRa_HAT https://www.waveshare.com/wiki/SX1268_433M_LoRa_HAT
E22-400T22S http://www.ebyte.com/downpdf.aspx?id=458
and/or
SX1262_915M_LoRa_HAT https://www.waveshare.com/wiki/SX1262_915M_LoRa_HAT
E22-900T22S https://www.ebyte.com/en/downpdf.aspx?id=467

I tried to run the command with anything (see paste below --help) and I get an error.

$ python ebyte.py --help
File "ebyte.py", line 165
raise UserWarning(f'not a valid property: {err}')
^
SyntaxError: invalid syntax

wondered if it was a permissions thing.... seems no

$ sudo python ebyte.py --help
File "ebyte.py", line 165
raise UserWarning(f'not a valid property: {err}')
^
SyntaxError: invalid syntax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.