Forum Replies Created
-
AuthorPosts
-
Hi linx9,
to have more information attach also the AUX pin, which gives an immediate response on wiring.And get the configuration of the devices to be sure are correctly configured.
Post your response on this topic.
I wait for your feedback Renzo
Hi Travis,
you must set the correct channel configuration, I think It’s channel 15.
Bye RenzoHi ps2chiper,
I try with a blue pill with 64k ROM without result.
Now I get a black pill, but can you write a mini-guide that I can follow to put in work (better with Gmail).
Thanks, RenzoHi Robert,
you can download the E220 library (beta for now, but fully working) from this topic reply.The code is pretty equal to the E22 examples.
Bye Renzo
Hi Robert,
pay attention, you have an E220 and you download from GitHub the library for E22.You must use the same example Arduino_e22_04_SendFixedTransmission for the sender and for the receiver.
But the sender needs FIXED SENDER configuration, and you must uncomment the lines
// With FIXED SENDER configuration #define DESTINATION_ADDL 3
and a receiver (same as the sender but) you must set FIXED RECEIVER and uncomment the lines
// With FIXED RECEIVER configuration #define DESTINATION_ADDL 2
Bye Renzo.
Hi Robert,
Welcome to the forum, I think you get the library from
Ebyte E220 (LLCC68) compatibility
And the example from the same topic.You need another sketch to understand that comments. I created a setConfiguration file with a long set of configuration examples to simplify your work, and I named every configuration like FIXED SENDER or FIXED RECEIVER.
I have attached the setConfiguration file.
I will release the complete library and tutorial soon.
Bye Renzo
Attachments:
You must be logged in to view attached files.I think this can be useful.
I tested It with some microcontrollers.Bye Renzo
Attachments:
You must be logged in to view attached files.9 February 2022 at 15:38 in reply to: Flash bin file from SPIFFS of ESP8266 via serial to Arduino UNO #18526Hi Martin,
from a Medium article I extract this, and I think It’s what you need.How does firmware update work on Arduino Uno?
The Arduino Uno comes with a bootloader (known as Optiboot) which implements the STK500 protocol for receiving the compiled program binaries through the UART.
Explanation on Optiboot in Updating Arduino Firmware
- On reset:
Arduino reboot from bootloader and check for the cause of the reset. If it was an internal reset (eg. reset by watchdog timer), then it directly jumps to the main application program. However, if it was an external reset, it will set up a watchdog timer which will timeout in 1 second. - Listen to UART port:
If it was an external reset, the bootloader will start an infinite loop to listen to the UART port after the watchdog timer setup. If there is no valid command dedicated to the STK500 protocol received in 1 second, the watchdog timer will timeout and cause an internal reset. However, on receiving any valid command code, the watchdog timer counter will be reset to avoid unnecessary system reset from occurring. According to the application note of STK500 Communication Protocol, the format of the command is: <Command_Code> <Data (if any)> <CRC_EOP>
List of valid and useful command codes for Optiboot: 1. STK_GET_SYNC : — 0x30 2. STK_ENTER_PROGMODE : — 0x50 3. STK_LEAVE_PROGMODE : — 0x51 4. STK_LOAD_ADDRESS : — 0x55 5. STK_PROG_PAGE : — 0x64 6. CRC_EOP : — 0x20List of useful reply codes from Optiboot: 1. STK_INSYNC : — 0x14 2. STK_OK : — 0x10
Algorithm of Optiboot in receiving compiled binaries:
- Programmer send <STK_ENTER_PROGMODE> <CRC_EOP> to Arduino to command for starting of programming mode. The bootloader will reply <STK_INSYNC> <STK_OK> if it is in sync with the programmer.
*Note: After reading through the source code of Optiboot, I found that this step is not necessary as there is no specific condition checking for this command. However, it could be used for checking whether the Arduino is in sync with the programmer or not. Alternatively, by sending <STK_GET_SYNC> <CRC_EOP> could also check whether it is in sync or not. - If the Arduino is in sync with the programmer, the programmer can then send <STK_LOAD_ADDRESS> <Low byte of address> <High byte of address> <CRC_EOP>. This command is for loading the starting address of flash memory which will be filled with the bytes of program binary codes that will be sent later.
* low byte of address = address & 0xFF
* high byte of address = address >> 8
** address starts from 0 - If <STK_INSYNC> <STK_OK> is received, the programmer can then send <STK_PROG_PAGE> <Low byte of length> <High byte of length> <Dest type> <bytes of program of the specified length> <CRC_EOP>.
* The length specified the number of bytes of program binaries to be written in the flash memory.
low byte of length = length & 0xFF
high byte of length = length >> 8
* The <Dest type> specified the location (eeprom [‘E’] or flash [default]) at which the program codes to be written. - Check for reply. If <STK_INSYNC> <STK_OK> is received, update the as address := address + (length / 2), then continue the loop from step 2 until all the program binaries are sent and written into the flash memory.
* Since the address is a word pointer, so it is updated by half of the length (byte). - After sending all program binaries, the programmer then send <STK_LEAVE_PROGMODE> <CRC_EOP> for leaving programming mode.
OTA Firmware Update on Arduino Uno through ESP8266
Figure 1: Wiring of Arduino Uno with Espresso Lite V2.0 (ESP8266). The Arduino Uno is connected with a WiFi module to enable OTA firmware update. In this project, ESP8266 WiFi module is used. A simple ESP8266 library is developed to remotely interface with the connected Arduino Uno. This library enables the OTA firmware update functionality for the Arduino by implementing STK500 protocol (as explained above) for writing the compiled binaries to the Arduino. Besides, remote debug message logging is also enabled in this library.
On the host machine, a graphical user interface (GUI) is also developed to aid the process of remotely interfacing with the connected Arduino.
The remote interfacing process is done through MQTT protocol. So, the WiFi module and the host machine must connect to a MQTT broker for communication. The library used for establishing MQTT connection on the WiFi module here is the PubSubClient by knolleary.
GitHub Link of the complete project: https://github.com/JayLooi/RemoteArduino
Demo Video
References
- https://www.wired.com/2012/08/nasa-patch/
- “AVR061: STK500 Communication Protocol” retrieved from http://ww1.microchip.com/downloads/en/AppNotes/doc2525.pdf
- https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/optiboot
- https://github.com/knolleary/pubsubclient
Bye Renzo
Hi George,
you must consider the time to read from serial, after read, the reader data are removed from the buffer.
I think it’s very difficult that you lost data.
But depending on the type of application.
Bye RenzoAlways UART version.
I want to create other libraries to use with Android and Python or java. But I need more time.
Bye RenzoI think It’s not possible, but the price of LoRa E220 it’s the same as RFM95W so you can use only that.
I don’t know if E32 SPI can communicate with RFM95W.
Bye RenzoIf I remember exists an e32 SPI version, but if you want something with good performance and less price you must get Ebyte E220.
It has a configurable encrypting key, WOR, RSSI etc. etc. module format and SMD.
I’ll release the definitive version of the library soon, here a preview
Ebyte E220 (LLCC68) compatibilityBye Renzo
Hi Javi,
It seems all ok.
But change the size of int value to 2 byte.
And type to 1 charstruct Message { char type = '1'; byte amp1[2]; byte volt1[2]; } message;
And reduce the packet size to 64bytes so It’s more responsive
configuration.OPTION.subPacketSetting = SPS_064_10;
and enable the LBT to prevent network problem
configuration.TRANSMISSION_MODE.enableLBT = LBT_ENABLED;
Bye Renzo
Hi Javi,
You can use the specified method, check the article of e32 module as reference
Ebyte LoRa E32 device for Arduino, esp32 or esp8266: power saving and sending structured data – Part 5receiveMessageUntil is only for string.
But attach your code, we try to check better.
Bye Renzo
Hi ezcGman,
I think the two modules can’t be compatible.
RFM95W is a basic lora module, e32 is more complex, have a specified protocol with data criptyng, WOR, addressing and other features.
Bye Renzo - On reset:
-
AuthorPosts