Coder Social home page Coder Social logo

Comments (21)

tobiasfaust avatar tobiasfaust commented on August 17, 2024 1

Hi,
Not planned so far. But its an interesting use Case. I ordered one to test it. Please be patient some weeks.

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024 1

new release 3.2.0 is ready. Now I´m working on this

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

Hi, has there been any progress on this?

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

Hi
Unfortunally, Not yet :(
I already have the Hardware but no time to test. Actually i work on splitting the huge register.h into smaller files and able to edit them at webfrontend.

i will keep this issue on my todo List.

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

Thank you! If there is anything I can help with let me know. If it is wihin my capabilities I'm happy to help.

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

@kagehisa, please test it

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

@tobiasfaust, I checked out the dev branch and launched:

  • a build via platformIO firmware_ESP32/General/build
  • as well as a filesystem build via firmware_ESP32/Platform/Build Filesystem Image

This went without a hitch. But when I try to upload it with:

esptool -p /dev/ttyUSB0 -b 921600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x8000 partitions.bin 0x1000 bootloader.bin 0x10000 firmware.bin 0x180000 littlefs.bin

I get the following error:

esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting.......
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:de:e2:b2:1f:f8
Changing baud rate to 921600
Changed.
Enabling default SPI flash mode...
Configuring flash size...

A fatal error occurred: File littlefs.bin (length 1441792) at offset 1572864 will not fit in 2097152 bytes of flash. Use --flash->size argument, or change flashing address.

Am I using the wrong firmware target in PlatformIO? I guessed firmware ESP32 should work based on the docs.

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

The Parameter —flash_size has to adapt, depend on your Board
please Check the Output of
esptool.py --port PORT flash_id
If something like that appears:
Detected flash size: 4MB
Can you adapt the parameter like this

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

Ok, thanks! 4MB flash size worked. I'll do the Modbus connection tomorrow.

Edit:
Connected the device to my WIFI, but switching to Ethernet is not working. It is not taking over any settings at all. As soon as I save, the page gets reloaded and the option for WIFI is set again. Same for all the other settings.

@tobiasfaust : Where did you look up the required Pin numbers for connecting the RS485 module? The code states RX=2, TX=4 and RTS=5. But this does not make much sense with the pin configuration in this document. I have something in the back of my mind that the espressifIDE Pin convention was somehow different from what you would expect from the datasheets.

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

You can change pin assignment via settings what you want.
Can you Check seriell console for log Output? At my side Ethernet works well.

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

Nope that is my problem, I can't. Whenever I try to change a setting and hit save, the page gets a reload and the Settings are gone. Since debug level is initial at zero, there is nothing on the debug out terminal either. I'll try to rebuild and reflash, could be an issue with the littlels.bin, since the webpage is not shown correctly (style sheet) either...

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

Can you please Open the Webpage in source Mode and try to Open the /web/Javascript.js separately. Its ok?

please Open the Page of files section, which files in each folder will show?
Please Post some screenshots of files,- baseconfig,- modbus section

Edit: just tested, no problems while saving settings at my side ...... has to be test...

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

Hi, thanks for the hint with the Javascipt.js. Source mode tells me it is not finding anything:
Screenshot_20240214_125140

That is what I get for the files section:
Screenshot_20240214_125417_2

But it is weird, when I build the fs image I get the following output from platformIO:

Building in release mode
Building FS image from 'data' directory to .pio/build/firmware_ESP32/littlefs.bin
/regs/Deye_SUN_SG04LP3.json
/regs/Solax-MIC.json
/regs/Solax-X3.json
/regs/Solax-X1.json
/regs/Growatt-SPH.json
/regs/Sofar.json
/web/Javascript.js
/web/style.css
/web/UpdateResponse.html
/web/PageHandleFS.js
/web/UpdatePage.html
/web/JsAjax.js

So the files should be there.

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

hhh, no files are in your filesystem. Can you upload littlefs.bin again? You can check it by webpage "files"

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

I did with: esptool -p /dev/ttyUSB0 -b 115200 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x180000 littlefs.bin

And got:

esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting........
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:de:e2:b2:1f:f8
Enabling default SPI flash mode...
Configuring flash size...
Erasing flash...
Took 6.01s to erase flash block
Wrote 1441792 bytes at 0x00180000 in 141.5 seconds (81.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...`

Still no files in the system. Same behaviour as before.
It is almost as if I'm writing on a write protected device without getting an write error.

Is there a way to inspect the content of the generated littefs.bin?

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

please test upload with:

esptool.py -p COM6 -b 921600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partition-table.bin 0x1000 bootloader.bin 0x10000 firmware_file.bin 0x290000 littlefs.bin

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

Alright! That did the trick, had to replace partition-table.bin with partitions.bin and firmware_file.bin with firmware.bin but thats about it. I can now change settings. I will do the other tests from here on out.

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

Oh yes, that is only a template
I changed that in Wiki to the right one.

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

Sorry it took me so long, I came down with a pretty bad flu.
Switching to Ethernet works fine, I configured the board connections and was able to "talk" to my solax X3 inverter.
So from my side everything works fine. Thanks again for the effort!

Do you want me to add a small sentence regarding flashing the wt32-eth01 board with the greater flash size and the changed flash adress for the littlefs.bin in the corresponding wiki page?

from solaxmodbusgateway.

tobiasfaust avatar tobiasfaust commented on August 17, 2024

Hi sounds well.
Thanks for your offer, what should I Write down at the Wiki Page?

from solaxmodbusgateway.

kagehisa avatar kagehisa commented on August 17, 2024

I would just specify that this board requires the 4 MB flash size instead of 2 and the required littlefs.bin adress change.

Or just like this:
For WT32-ETH01 (and similiar boards) use the following command to flash the device via the esptool:

esptool -p /dev/ttyUSB0 -b 921600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partitions.bin 0x1000 bootloader.bin 0x10000 firmware.bin 0x290000 littlefs.bin

from solaxmodbusgateway.

Related Issues (20)

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.