{"id":18837040,"url":"https://github.com/xreef/ebyte_lora_e22_python_raspberrypi_library","last_synced_at":"2026-03-06T00:31:12.296Z","repository":{"id":155335939,"uuid":"630974746","full_name":"xreef/EByte_LoRa_E22_python_raspberrypi_library","owner":"xreef","description":"RaspberryPi LoRa EBYTE E22 device library complete and tested. sx1262/sx1268","archived":false,"fork":false,"pushed_at":"2025-02-23T20:55:58.000Z","size":2440,"stargazers_count":16,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T06:35:27.447Z","etag":null,"topics":["e22","ebyte","lora","python","raspberrypi","sx1262","sx1268","uart"],"latest_commit_sha":null,"homepage":"https://www.mischianti.org/category/my-libraries/ebyte-lora-e22-devices/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xreef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-21T15:43:28.000Z","updated_at":"2025-02-23T20:56:02.000Z","dependencies_parsed_at":"2023-12-27T11:47:59.617Z","dependency_job_id":"8da04e7b-990f-4a04-a137-ae945b4631a2","html_url":"https://github.com/xreef/EByte_LoRa_E22_python_raspberrypi_library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xreef/EByte_LoRa_E22_python_raspberrypi_library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xreef%2FEByte_LoRa_E22_python_raspberrypi_library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xreef%2FEByte_LoRa_E22_python_raspberrypi_library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xreef%2FEByte_LoRa_E22_python_raspberrypi_library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xreef%2FEByte_LoRa_E22_python_raspberrypi_library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xreef","download_url":"https://codeload.github.com/xreef/EByte_LoRa_E22_python_raspberrypi_library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xreef%2FEByte_LoRa_E22_python_raspberrypi_library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["e22","ebyte","lora","python","raspberrypi","sx1262","sx1268","uart"],"created_at":"2024-11-08T02:33:23.859Z","updated_at":"2026-03-06T00:31:12.277Z","avatar_url":"https://github.com/xreef.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv\u003e\n\u003ca href=\"https://www.mischianti.org/forums/forum/mischiantis-libraries/ebyte-lora-e22-uart-devices-sx1262-sx1268//\"\u003e\u003cimg\n  src=\"https://github.com/xreef/LoRa_E32_Series_Library/raw/master/resources/buttonSupportForumEnglish.png\" alt=\"Support forum EByte e32 English\"\n   align=\"right\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\u003ca href=\"https://www.mischianti.org/it/forums/forum/le-librerie-di-mischianti/ebyte-e22-dispositivi-lora-uart-sx1262-sx1268/\"\u003e\u003cimg\n  src=\"https://github.com/xreef/LoRa_E32_Series_Library/raw/master/resources/buttonSupportForumItaliano.png\" alt=\"Forum supporto EByte e32 italiano\"\n  align=\"right\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n#\n# EBYTE LoRa E22 devices raspberrypi library (SX1262, SX1268)\n\n\n### Changelog\n - 2023-05-02 0.0.4 Fix message size error\n - 2023-04-25 0.0.3 Minor fixes\n - 2023-03-21 0.0.1 Fully functional library\n\n### Library usage\nHere an example of constructor, you must pass the UART interface and (if you want, but It's reccomended)\nthe AUX pin, M0 and M1.\n\n### Installation\nTo install the library execute the following command:\n\n```bash\npip install ebyte-lora-e22-rpi\n```\n\n#### Initialization\n\n```python\nfrom lora_e22 import LoRaE22\nimport serial\n\nloraSerial = serial.Serial('/dev/serial0') #, baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS)\nlora = LoRaE22('400T22D', loraSerial, aux_pin=18, m0_pin=23, m1_pin=24)\n```\n#### Start the module transmission\n\n```python\ncode = lora.begin()\nprint(\"Initialization: {}\", ResponseStatusCode.get_description(code))\n```\n\n#### Get Configuration\n\n```python\nfrom lora_e22 import LoRaE22, print_configuration\nfrom lora_e22_operation_constant import ResponseStatusCode\n\ncode, configuration = lora.get_configuration()\n\nprint(\"Retrieve configuration: {}\", ResponseStatusCode.get_description(code))\n\nprint_configuration(configuration)\n```\n\nThe result\n\n```\n# ----------------------------------------\n# HEAD :  0xc1   0x0   0x9\n#\n# AddH :  0x0\n# AddL :  0x0\n#\n# Chan :  23  -\u003e  433\n#\n# SpeedParityBit :  0b0  -\u003e  8N1 (Default)\n# SpeedUARTDatte :  0b11  -\u003e  9600bps (default)\n# SpeedAirDataRate :  0b10  -\u003e  2.4kbps (default)\n#\n# OptionSubPacketSett:  0b0  -\u003e  240bytes (default)\n# OptionTranPower :  0b0  -\u003e  22dBm (Default)\n# OptionRSSIAmbientNo:  0b0  -\u003e  Disabled (default)\n#\n# TransModeWORPeriod :  0b11  -\u003e  2000ms (default)\n# TransModeTransContr:  0b0  -\u003e  WOR Receiver (default)\n# TransModeEnableLBT :  0b0  -\u003e  Disabled (default)\n# TransModeEnableRSSI:  0b0  -\u003e  Disabled (default)\n# TransModeEnabRepeat:  0b0  -\u003e  Disabled (default)\n# TransModeFixedTrans:  0b0  -\u003e  Transparent transmission (default)\n# ----------------------------------------\n```\n\n#### Set Configuration\n\nYou can set only the desidered parameter, the other will be set to default value.\n```python\nconfiguration_to_set = Configuration('400T22D')\nconfiguration_to_set.ADDL = 0x02\nconfiguration_to_set.ADDH = 0x01\nconfiguration_to_set.CHAN = 23\n\nconfiguration_to_set.NETID = 0\n\nconfiguration_to_set.SPED.airDataRate = AirDataRate.AIR_DATA_RATE_100_96\nconfiguration_to_set.SPED.uartParity = UARTParity.MODE_00_8N1\nconfiguration_to_set.SPED.uartBaudRate = UARTBaudRate.BPS_9600\n\nconfiguration_to_set.OPTION.subPacketSetting = SubPacketSetting.SPS_064_10\nconfiguration_to_set.OPTION.transmissionPower = TransmissionPower('400T22D').\\\n                                                    get_transmission_power().POWER_10\n# or\n# configuration_to_set.OPTION.transmissionPower = TransmissionPower22.POWER_10\nconfiguration_to_set.OPTION.RSSIAmbientNoise = RssiAmbientNoiseEnable.RSSI_AMBIENT_NOISE_ENABLED\n\nconfiguration_to_set.TRANSMISSION_MODE.WORTransceiverControl = WorTransceiverControl.WOR_TRANSMITTER\nconfiguration_to_set.TRANSMISSION_MODE.enableLBT = LbtEnableByte.LBT_DISABLED\nconfiguration_to_set.TRANSMISSION_MODE.enableRSSI = RssiEnableByte.RSSI_ENABLED\nconfiguration_to_set.TRANSMISSION_MODE.enableRepeater = RepeaterModeEnableByte.REPEATER_DISABLED\nconfiguration_to_set.TRANSMISSION_MODE.fixedTransmission = FixedTransmission.FIXED_TRANSMISSION\nconfiguration_to_set.TRANSMISSION_MODE.WORPeriod = WorPeriod.WOR_1500_010\n\nconfiguration_to_set.CRYPT.CRYPT_H = 1\nconfiguration_to_set.CRYPT.CRYPT_L = 1\n\n\n# Set the new configuration on the LoRa module and print the updated configuration to the console\ncode, confSetted = lora.set_configuration(configuration_to_set)\n```\n\nI create a CONSTANTS class for each parameter, here a list:\nAirDataRate, UARTBaudRate, UARTParity, TransmissionPower, ForwardErrorCorrectionSwitch, WirelessWakeUpTime, IODriveMode, FixedTransmission\n\n#### Send string message\n\nHere an example of send data, you can pass a string \n```python\nlora.send_transparent_message('pippo')\n```\n\n```python\nlora.send_fixed_message(0, 2, 23, 'pippo')\n```\nHere the receiver code\n```python\nwhile True:\n    if lora.available() \u003e 0:\n        code, value = lora.receive_message()\n        print(ResponseStatusCode.get_description(code))\n\n        print(value)\n        time.sleep(2)\n```\n\nIf you want receive RSSI also you must enable it in the configuration\n```python\nconfiguration_to_set.TRANSMISSION_MODE.enableRSSI = RssiEnableByte.RSSI_ENABLED\n```\n\nand set the flag to True in the receive_message method\n```python\ncode, value, rssi = lora.receive_message(True)\n```\n\n\n\nResult\n\n```\nSuccess!\npippo\n```\n\n#### Send dictionary message\n\nHere an example of send data, you can pass a dictionary\n```python\nlora.send_transparent_dict({'pippo': 'fixed', 'pippo2': 'fixed2'})\n```\n\n```python\nlora.send_fixed_dict(0, 0x01, 23, {'pippo': 'fixed', 'pippo2': 'fixed2'})\n```\n\nHere the receiver code\n```python\nwhile True:\n    if lora.available() \u003e 0:\n        code, value = lora.receive_dict()\n        print(ResponseStatusCode.get_description(code))\n        print(value)\n        print(value['pippo'])\n        time.sleep(2)\n```\n\nif you want receive RSSI also you must enable it in the configuration\n```python\nconfiguration_to_set.TRANSMISSION_MODE.enableRSSI = RssiEnableByte.RSSI_ENABLED\n```\n\nand set the flag to True in the receive_dict method\n```python\ncode, value, rssi = lora.receive_dict(True)\n```\n\n\nResult\n\n```\nSuccess!\n{'pippo': 'fixed', 'pippo2': 'fixed2'}\nfixed\n```\n\n\n# This is a porting of the Arduino library for EBYTE LoRa E22 devices to Micropython\n\n\n# Soon a complete tutorial of the original library on my site www.mischianti.org\n\n - [Ebyte LoRa E22 device for Arduino, esp32 or esp8266: settings and basic usage](https://www.mischianti.org/2020/09/25/ebyte-lora-e22-device-for-arduino-esp32-or-esp8266-specs-and-basic-usage-1/)\n - [Ebyte LoRa E22 device for Arduino, esp32 or esp8266: library](https://www.mischianti.org/2021/01/28/ebyte-lora-e22-device-for-arduino-esp32-or-esp8266-library-part-2/)\n - [Ebyte LoRa E22 device for Arduino, esp32 or esp8266: configuration](https://www.mischianti.org/2022/03/29/ebyte-lora-e22-device-for-arduino-esp32-or-esp8266-configuration-3/)\n - [Ebyte LoRa E22 device for Arduino, esp32 or esp8266: fixed transmission and RSSI](https://www.mischianti.org/2022/04/04/ebyte-lora-e22-device-for-arduino-esp32-or-esp8266-fixed-transmission-broadcast-monitor-and-rssi-4/)\n - [Ebyte LoRa E22 device for Arduino, esp32 or esp8266: power saving and sending structured data](https://www.mischianti.org/2022/04/10/ebyte-lora-e22-device-for-arduino-esp32-or-esp8266-power-saving-wor-and-structured-data-5/)\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: WOR microcontroller and Arduino shield\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: WOR microcontroller and WeMos D1 shield\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: WOR microcontroller and esp32 dev v1 shield\n\n\n#### Pinout\n\n![](https://www.mischianti.org/wp-content/uploads/2019/09/sx1278-sx1276-wireless-lora-uart-module-serial-3000m-arduino-433-rf-robotedu-1705-13-robotedu@101.jpg)\n\nE22 \n\n\n\n\u003ctable class=\"wp-block-advgb-table advgb-table-frontend is-style-stripes\" style=\"border-collapse:collapse\"\u003e\u003cthead\u003e\u003ctr\u003e\u003cth style=\"background-color:#8ed1fc\"\u003ePin No. \u003c/th\u003e\u003cth style=\"background-color:#8ed1fc\"\u003e Pin item \u003c/th\u003e\u003cth style=\"background-color:#8ed1fc\"\u003e Pin direction \u003c/th\u003e\u003cth style=\"background-color:#8ed1fc\"\u003e Pin application \u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003eM0\u003c/td\u003e\u003ctd\u003eInput（weak pull-up）\u003c/td\u003e\u003ctd\u003eWork with M1 \u0026amp; decide the four operating modes.Floating is not allowed, can be ground.\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e2\u003c/td\u003e\u003ctd\u003eM1\u003c/td\u003e\u003ctd\u003eInput（weak pull-up）\u003c/td\u003e\u003ctd\u003eWork with M0 \u0026amp; decide the four operating modes.Floating is not allowed, can be ground.\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e3\u003c/td\u003e\u003ctd\u003eRXD\u003c/td\u003e\u003ctd\u003eInput\u003c/td\u003e\u003ctd\u003eTTL UART inputs, connects to external (MCU, PC) TXD outputpin. Can be configured as open-drain or pull-up input.\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e4\u003c/td\u003e\u003ctd\u003eTXD\u003c/td\u003e\u003ctd\u003eOutput\u003c/td\u003e\u003ctd\u003eTTL UART outputs, connects to external RXD (MCU, PC) inputpin. Can be configured as open-drain or push-pull output\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e\u003cbr\u003e5\u003c/td\u003e\u003ctd\u003e\u003cbr\u003eAUX\u003c/td\u003e\u003ctd\u003e\u003cbr\u003eOutput\u003c/td\u003e\u003ctd\u003ePer indicare lo stato di funzionamento del modulo e riattivare l’MCU esterno. Durante la procedura di inizializzazione di autocontrollo, il pin emette una bassa tensione. Può essere configurato come uscita open-drain o output push-pull (è consentito non metterlo a terra, ma se hai problemi, ad esempio ti si freeze il dispositivo è preferibile mettere una restistenza di pull-up da 4.7k o meglio collegarlo al dispositivo).\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e6\u003c/td\u003e\u003ctd\u003eVCC\u003c/td\u003e\u003ctd\u003e\u003cbr\u003e\u003c/td\u003e\u003ctd style=\"vertical-align:middle\"\u003ePower supply 2.3V~5.5V DC\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e7\u003c/td\u003e\u003ctd\u003eGND\u003c/td\u003e\u003ctd\u003e\u003cbr\u003e\u003c/td\u003e\u003ctd\u003eGround\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\nAs you can see you can set various modes via M0 and M1 pins.\n\n\n\u003ctable class=\"wp-block-advgb-table advgb-table-frontend is-style-stripes\"\u003e\u003cthead\u003e\u003ctr\u003e\u003cth style=\"background-color:#8ed1fc\"\u003e\u003cstrong\u003eMode\u003c/strong\u003e \u003c/th\u003e\u003cth style=\"background-color:#8ed1fc\"\u003e\u003cstrong\u003eM1\u003c/strong\u003e \u003c/th\u003e\u003cth style=\"background-color:#8ed1fc\"\u003e\u003cstrong\u003eM0\u003c/strong\u003e \u003c/th\u003e\u003cth style=\"background-color:#8ed1fc\"\u003e\u003cstrong\u003eExplanation\u003c/strong\u003e \u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003eNormal\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003eUART and wireless channel are open, transparent transmission is on (Supports configuration over air via special command)\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eWOR Mode\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003eCan be defined as WOR transmitter and WOR receiver\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003eConfiguration mode\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003eUsers can access the register through the serial port to\ncontrol the working state of the module\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eDeep sleep mode\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003eSleep mode\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\nAs you can see there are some pins that can be use in a static way, but If you connect It to the library you gain in performance and you can control all mode via software, but we are going to explain better next.\n\n### Fully connected schema\n\n#### Raspberry Pi\n![Raspberry Pi](https://www.mischianti.org/wp-content/uploads/2023/04/Raspberry-Pi-EByte-LoRa-Exx-fully-connected_bb.jpg)\n\n#### Basic configuration option\n\n\u003ctable class=\"wp-block-advgb-table advgb-table-frontend\"\u003e\u003ctbody\u003e\u003ctr class=\"alt\"\u003e\u003ctd style=\"background-color:#eeeeee\"\u003eADDH\u003c/td\u003e\u003ctd\u003eHigh address byte of module (the default 00H)\u003c/td\u003e\u003ctd\u003e00H-FFH\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd style=\"background-color:#eeeeee\"\u003eADDL\u003c/td\u003e\u003ctd\u003eLow address byte of module (the default 00H)\u003c/td\u003e\u003ctd\u003e00H-FFH\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd style=\"background-color:#eeeeee\"\u003eSPED\u003c/td\u003e\u003ctd\u003eInformation about data rate parity bit and Air data rate\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd style=\"background-color:#eeeeee\"\u003eCHAN\u003c/td\u003e\u003ctd\u003eCommunication channel（410M + CHAN*1M）, default 17H (433MHz), \u003cstrong\u003evalid only for 433MHz device\u003c/strong\u003e chek below to check the correct frequency of your device\u003c/td\u003e\u003ctd\u003e00H-1FH\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd style=\"background-color:#eeeeee\"\u003eOPTION\u003c/td\u003e\u003ctd\u003eType of transmission, packet size, allow special message\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd style=\"background-color:#eeeeee\"\u003eTRANSMISSION_MODE\u003c/td\u003e\u003ctd\u003eA lot of parameter that specify the transmission modality\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\nOPTION\n\nType of transmission, pull-up settings, wake-up time, FEC, Transmission power\n\n#### SPED detail\n\nUART Parity bit:  _UART mode can be different between communication parties_\n\n\u003ctable class=\"wp-block-advgb-table advgb-table-frontend\"\u003e\u003ctbody\u003e\u003ctr class=\"alt\"\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e4\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e3\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003eUART parity bit\u003c/td\u003e\u003ctd style=\"background-color:#fcb900\"\u003eConstant value\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e8N1 (default)\u003c/td\u003e\u003ctd\u003eMODE_00_8N1\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e8O1\u003c/td\u003e\u003ctd\u003eMODE_01_8O1\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e8 E1\u003c/td\u003e\u003ctd\u003eMODE_10_8E1\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e8N1 (equal to 00)\u003c/td\u003e\u003ctd\u003eMODE_11_8N1\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\nUART baud rate: UART baud rate can be different between communication parties, The UART baud rate has nothing to do with wireless transmission parameters \u0026 won’t affect the wireless transmit / receive features.\n\n\u003ctable class=\"wp-block-advgb-table advgb-table-frontend\"\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e7\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e6\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e5\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003eTTL UART baud rate（bps）\u003c/td\u003e\u003ctd style=\"background-color:#fcb900\"\u003e Constant value \u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1200\u003c/td\u003e\u003ctd\u003eUART_BPS_1200\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e2400\u003c/td\u003e\u003ctd\u003eUART_BPS_2400\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e4800\u003c/td\u003e\u003ctd\u003eUART_BPS_4800\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e9600 (default)\u003c/td\u003e\u003ctd\u003eUART_BPS_9600\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e19200\u003c/td\u003e\u003ctd\u003eUART_BPS_19200\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e38400\u003c/td\u003e\u003ctd\u003eUART_BPS_38400\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e57600\u003c/td\u003e\u003ctd\u003eUART_BPS_57600\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e115200\u003c/td\u003e\u003ctd\u003eUART_BPS_115200\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\nAir data rate: The lower the air data rate, the longer the transmitting distance, better anti- interference performance and longer transmitting time, The air data rate must keep the same for both communication parties.\n\n\u003ctable class=\"wp-block-advgb-table advgb-table-frontend\"\u003e\u003ctbody\u003e\u003ctr class=\"alt\"\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e2\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e1\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e0\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003eAir data rate（bps）\u003c/td\u003e\u003ctd style=\"background-color:#fcb900\"\u003e Constant value \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0.3k\u003c/td\u003e\u003ctd\u003eAIR_DATA_RATE_000_03\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1.2k\u003c/td\u003e\u003ctd\u003eAIR_DATA_RATE_001_12\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e2.4k (default)\u003c/td\u003e\u003ctd\u003eAIR_DATA_RATE_010_24\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e4.8k\u003c/td\u003e\u003ctd\u003eAIR_DATA_RATE_011_48\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e9.6k\u003c/td\u003e\u003ctd\u003eAIR_DATA_RATE_100_96\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e19.2k\u003c/td\u003e\u003ctd\u003eAIR_DATA_RATE_101_192\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e38.4k\u003c/td\u003e\u003ctd\u003eAIR_DATA_RATE_110_384\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e62.5k\u003c/td\u003e\u003ctd\u003eAIR_DATA_RATE_111_625\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n#### OPTION detail\n\n####Sub packet setting\n\nThis is the max lenght of the packet.\n\nWhen the data is smaller than the sub packet length, the serial output of the receiving end is an uninterrupted continuous output. When the data is larger than the sub packet length, the receiving end serial port will output the sub packet.\n\n\u003ctable class=\"wp-block-advgb-table advgb-table-frontend\"\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e7\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e6\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003ePacket size\u003c/td\u003e\u003ctd style=\"background-color:#fcb900\"\u003e  Constant value  \u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e240bytes (default)\u003c/td\u003e\u003ctd\u003eSPS_240_00\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e128bytes\u003c/td\u003e\u003ctd\u003eSPS_128_01\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e64bytes\u003c/td\u003e\u003ctd\u003eSPS_064_10\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e32bytes\u003c/td\u003e\u003ctd\u003eSPS_032_11\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n####RSSI Ambient noise enable\n\nThis command can enable/disable the management type of RSSI, It’s important to manage the remote configuration, pay attention isn’t the RSSI parameter in the message.\n\nWhen enabled, the C0 C1 C2 C3 command can be sent in the transmitting mode or WOR transmitting mode to read the register. Register 0x00: Current ambient noise rssi Register 0X01: rssi when the data was received last time.\n\n\u003ctable class=\"wp-block-advgb-table advgb-table-frontend\"\u003e\u003ctbody\u003e\u003ctr class=\"alt\"\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003e5\u003c/td\u003e\u003ctd style=\"background-color:#8ed1fc\"\u003eRSSI Ambient noise enable\u003c/td\u003e\u003ctd style=\"background-color:#fcb900\"\u003e Constant value \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003eEnable\u003c/td\u003e\u003ctd\u003eRSSI_AMBIENT_NOISE_ENABLED\u003c/td\u003e\u003c/tr\u003e\u003ctr class=\"alt\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003eDisable (default)\u003c/td\u003e\u003ctd\u003eRSSI_AMBIENT_NOISE_DISABLED\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n### TRANSMISSION_MODE Detail\n\n####Enable RSSI\n\nWhen enabled, the module receives wireless data and it will follow an RSSI strength byte after output via the serial port TXD\n\n####Transmission type\n\nTransmission mode: in fixed transmission mode, the first three bytes of each user’s data frame can be used as high/low address and channel. The module changes its address and channel when transmit. And it will revert to original setting after complete the process.\n\n####Enable repeater function\n\n####Monitor data before transmission\n\nWhen enabled, wireless data will be monitored before it is transmitted, which can avoid interference to a certain extent, but may cause data delay.\n\n####WOR\n\nWOR transmitter: the module receiving and transmitting functions are turned on, and a wake-up code is added when transmitting data. Receiving is turned on.\n\nWOR receiver: the module is unable to transmit data and works in WOR monitoring mode. The monitoring period is as follows (WOR cycle), which can save a lot of power.\n\n####WOR cycle\n\nIf WOR is transmitting: after the WOR receiver receives the wireless data and outputs it through the serial port, it will wait for 1000ms before entering the WOR again. Users can input the serial port data and return it via the wireless during this period. Each serial byte will be refreshed for 1000ms. Users must transmit the first byte within 1000ms.\n\n - Period T = (1 + WOR) * 500ms, maximum 4000ms, minimum 500ms\n - The longer the WOR monitoring interval period, the lower the average power consumption, but\nthe greater the data delay\n - Both the transmitter and the receiver must be the same (very important).\n\n\n\n### Send receive message\n\nFirst we must introduce a simple but usefully method to check if something is in the receiving buffer\n\n```cpp\nint available();\n```\n\nIt’s simply return how many bytes you have in the current stream.\n\n#### Normal transmission mode\n\nNormal/Transparent transmission mode is used to send messages to all device with same address and channel.\n\n![](https://www.mischianti.org/wp-content/uploads/2019/10/LoRa_E32_transmittingScenarios.jpg)\n\nLoRa E22 transmitting scenarios, lines are channels\n\n\nFixed transmission have more scenarios\n\n![](https://www.mischianti.org/wp-content/uploads/2019/10/LoRa_E32_transmittingScenarios.jpg)\n\nLoRa E22 transmitting scenarios, lines are channels\n\n\n## Thanks\n\nNow you have all information to do your work, but I think It’s important to show some realistic examples to undestand better all the possibility.\n\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: settings and basic usage\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: library\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: configuration\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: fixed transmission and RSSI\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: power saving and sending structured data\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: repeater mode and remote settings\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: WOR microcontroller and Arduino shield\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: WOR microcontroller and WeMos D1 shield\n - Ebyte LoRa E22 device for Arduino, esp32 or esp8266: WOR microcontroller and esp32 dev v1 shield\n\n-\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxreef%2Febyte_lora_e22_python_raspberrypi_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxreef%2Febyte_lora_e22_python_raspberrypi_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxreef%2Febyte_lora_e22_python_raspberrypi_library/lists"}