Giter Site home page Giter Site logo

flukso / flm02 Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 11.0 11.8 MB

Fluksometer v2 firmware

Home Page: http://www.flukso.net

C++ 1.45% C 28.81% Makefile 4.06% Shell 5.91% Lua 38.96% HTML 13.35% JavaScript 1.12% Perl 2.03% CSS 1.22% Awk 0.01% C# 0.90% Java 1.04% Visual Basic 0.69% ApacheConf 0.01% Lex 0.15% Yacc 0.31%

flm02's People

Contributors

icarus75 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flm02's Issues

Modbus CRC-16 used instead us regular CRC-16 on TX of messages coming for Jeenodes

On receive the regular CRC-16 of the jeenodes is correctly calculated on the FLM side, but on transmit a different modbus CRC-16 is used to transmit the messages back to the Jeenodes. This requires some additional code on the jeenode to check message integrity.

// Compute the MODBUS RTU CRC
uint16_t modbus_crc (volatile uint8_t buf[], int len)
{
  uint16_t crc = 0xFFFF;

  for (int pos = -1; pos < len; pos++) {
    if (pos == -1) {
      crc ^= (uint16_t)0x2D;          // Added the sync byte
    }
    else {
      crc ^= (uint16_t)buf[pos];          // XOR byte into least sig. byte of crc
    }

    for (int i = 8; i != 0; i--) {    // Loop over each bit
      if ((crc & 0x0001) != 0) {      // If the LSB is set
        crc >>= 1;                    // Shift right and XOR 0xA001
        crc ^= 0xA001;
      }
      else                            // Else LSB is not set
        crc >>= 1;                    // Just shift right
    }
  }
  // Note, this number has low and high bytes swapped, so use it accordingly (or swap bytes)
  uint8_t temp_high_value = (uint8_t)(crc >> 8);      // Save high byte value
  crc <<= 8;                                          // Store low byte value in high byte
  crc = crc | temp_high_value;

  return crc;
}

Wireless does not connect, unrecognized encryption

By default the FLM detects what kind of encryption an AP supports; this in case of WPA/WPA2, TKIP, CCMP leads to an encryption configuration "psk-mixed". This is not recognized by my current router. In my case I had to explicitly set wireless.@wifi-interface[0].encryption="psk2+tkip+ccmp" for the FLM to connect, even though WLAN detection itself worked fine.

This refers to the settings hard coded in https://github.com/flukso/flm-ui/blob/master/app/scripts/controllers/wifi.js#L80

ip6tables not enabled

I just noticed that you activated support for IPv6 but not ip6tables. I think you should change that to have a working firewall.

mosquitto memory leak, maybe halting flukso

I am running v2-5-0 on a FLM022A and using mqtt locally.
Most remote capabilities are disabled manually (update + api).

I use MQTT in the local network to scrape data from the flukso. It works but after some hours
the flukso hangs and I need to unplug / reboot it.
Over time mosquitto seems to be eating more and more RAM without any apparent reason.
When it boots, there are roughly 4000k free and it shrinks over time due to mosquitto increasing it's data section:

while true; do cat /proc/774/statm; sleep 1; done

3748 2201 308 34 0 3125 0
3766 2212 308 34 0 3143 0
3766 2212 308 34 0 3143 0
3766 2212 308 34 0 3143 0
3766 2212 308 34 0 3143 0
3766 2212 308 34 0 3143 0
3766 2212 308 34 0 3143 0
3766 2212 308 34 0 3143 0
3766 2212 308 34 0 3143 0
3783 2222 308 34 0 3160 0
3783 2222 308 34 0 3160 0
3783 2222 308 34 0 3160 0
3783 2222 308 34 0 3160 0

I saw that several memory leaks were fixed in mosquitto since the version flm02 is using:
https://github.com/eclipse/mosquitto/blob/master/ChangeLog.txt
Upgrading to a recent version would maybe solve it. Does anyone know more?

I haven't gotten around yet setting up the toolchain to build images myself, so i cannot quickly try.

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.