Code Monkey home page Code Monkey logo

Comments (10)

cpainchaud avatar cpainchaud commented on June 10, 2024

Hi, it seems to be a bug, I am going to look into it

from rflink32.

cpainchaud avatar cpainchaud commented on June 10, 2024

@yndtrud in the meantime would please try this workaround? run command (preferably from CLI):
10;config;set;{"mqtt":{"ca_cert":"=====MYCERTHERE====="}}

from rflink32.

yndtrud avatar yndtrud commented on June 10, 2024

Hi again!

HW: Sonoff RF2: ESP8285 => RAM: 50kb/96kb, FLASH: 1MB
Firmware: build based on pstzh->schmurtzm->pstzh->cpainchaud
I added my changes to the code, fixed (still checking) Plugin_048.c (Oregon),

Extended WebUI for myself
image

It seems to me that I will not be able to send the config via the COM port, since the certificate + mqtt settings are more than 2000 bytes > executeCliCommand-> InputBuffer_Serial[INPUT_COMMAND_SIZE] = 2000

I tried from serial2net, but:
`

  #ifdef ESP32
  static const uint16_t __buffer_size = 1024;
  #else
  static const uint16_t __buffer_size = 128;
  #endif
  uint16_t buffer_end;

`
I updated WebUI, fixed the bug, but I can't send more than 128 bytes of cert (press Save button). I do not know why =>
I have total 3000: ~1500bytes (cert) + 1500bytes (all other setting). WebUI writes everything at once. But JSON Buffer is 2048 (for ESP8285)...

from rflink32.

cpainchaud avatar cpainchaud commented on June 10, 2024

ok so we have 2 issues: UI and buffer sizes. Out of curiosity how large is your certificate?

from rflink32.

cpainchaud avatar cpainchaud commented on June 10, 2024

I have produced a new firmware with a temporary UI fix (because it's ugly right now) and tested on a 8266 device and it's working. Can you test it as well?
That said the limitation in CLI will remain the same, I am a bit afraid to eat more memory

from rflink32.

yndtrud avatar yndtrud commented on June 10, 2024

I have produced a new firmware with a temporary UI fix (because it's ugly right now) and tested on a 8266 device and it's working. Can you test it as well? That said the limitation in CLI will remain the same, I am a bit afraid to eat more memory

Cert length: 1456 bytes :(((

Can you test it as well?
yes, I will check

from rflink32.

yndtrud avatar yndtrud commented on June 10, 2024

I have produced a new firmware with a temporary UI fix (because it's ugly right now) and tested on a 8266 device and it's working. Can you test it as well? That said the limitation in CLI will remain the same, I am a bit afraid to eat more memory

Tried the latest version. the certificate is not loaded (error loading after clicking the button). No decrease in memory consumption as reported by api/status

from rflink32.

cpainchaud avatar cpainchaud commented on June 10, 2024

I found more bugs with ESP8266 architecture, related to NTP (which of course means you cannot validate a certificate). I am working on that ....

from rflink32.

cpainchaud avatar cpainchaud commented on June 10, 2024

Can you give a try at this one? https://github.com/cpainchaud/RFLink32/releases/tag/nightly-testing-only

Please clear ca_cert from your config first to save some memory:
10;config;set;{"mqtt":{"ca_cert":""}}

It's working in my lab ESP8266 so should work for you as well.

from rflink32.

yndtrud avatar yndtrud commented on June 10, 2024

Hello. Sorry for not replying for so long.

I compiled the latest version from source today.

I can install the certificate.
(And how can I delete it without erasing all flash memory?)

But doesn't work.

I noticed that when I use the DNS name of the MQTT server (it is on the local network) in the MQTT settings, RFLink cannot connect. Could you check if DNS works? By the way, my RFLink does not have access to the Internet, but a local DNS server is available (to provide access to local network resources, such as RFLink).

from rflink32.

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.