GithubHelp home page GithubHelp logo

plan44 / plan44-feed Goto Github PK

View Code? Open in Web Editor NEW
29.0 11.0 9.0 3.88 MB

OpenWrt feed containing plan44 packages

Makefile 6.97% M4 9.37% C++ 5.75% Shell 21.45% CSS 3.94% HTML 33.78% C 17.95% Roff 0.31% PHP 0.36% Rich Text Format 0.04% BitBake 0.10%
openwrt lede feed omega2 mt7688 knitting-machine ws2812 ws2813 sk6812 lorawan

plan44-feed's Introduction

plan44 feed for OpenWrt

This is my source feed for building various OpenWrt packages I wrote for projects on Onion Omega1 and Omega2.

If you have a OpenWrt build environment set up, you can use the plan44 feed by adding the line

src-git plan44 https://github.com/plan44/plan44-feed.git;master

to your feeds.conf.default (or, more correctly, to a copy of feeds.conf.default named feeds.conf).

Useful right now

The following packages are of general usefulness right now:

  • p44mbrd: a openwrt package for using the p44mbrd matter bridge daemon on OpenWrt (usually as a companion to vdcd).

  • p44-counter: a simple kernel module for counting pulses on GPIOs, including quadrature encoder signals. Will become obsolete once drivers based on newer kernel's counter infrastructure become available, but that's not yet the case for my current use cases/platforms/versions.

  • p44-ledchain: this is a kernel module written by me for the MT7688/Omega2 which makes use of the hardware PWM in the chip to drive individually addressable WS281x-type LED chains. In contrast to the ws2812_draiveris driver (see below) which does the same for AR9331/Omega1, p44-ledchain does not block IRQs at all. At this time, p44-ledchain is extensively tested with up to 4 chains with ~900 WS2815 or WS2813 each. The driver also has modes for other chips like WS2811, WS2812, RGBW SK6812 and different LED color layouts like RGB, GRB etc.

  • pagekitec: a package containing the C implementation of pagekite, which is a reverse proxy that allows reaching embedded targets from the internet (e.g. for service, maintainance, monitoring). Have a look at pagekite.net for information (pagekite is available as a hosted service but also provides the server side as a oppen source python script you can use on your own server)

  • serialfwd: a small utility I use in almost every project which allows to access a serial interface via TCP from a remote host, and also to send and receive a few hex bytes directly.

  • ws2812-draiveris: this is a WS281x LED driver that works for AR9331/Omega1, but blocks interrupts for several milliseconds per update, which is very bad behaviour for a kernel module. The author of ws2812-draivris (not me) is not to blame for this, because the AR9331 chip does not provide any hardware that could generate WS281x timing, so bitbanging and blocking IRQs is the only way to do WS281x on a AR9331. Still, it's a bit of a hack that could backfire when other parts of the system rely on fast IRQ response.

  • rcswitch: an extract of the rcswitch kernel module for use in OpenWrt from a bigger project. rcswitch provides a sysfs interface for a connected 434MHz RF module, controlling simple RF power switches.

Complete projects

The *-config packages are "umbrella" packages to be used with the p44b script for various projects of mine. The older projects are still based on OpenWrt 19.07, 18.06 or even 17.x, recently (re-)built projects are based on OpenWrt 22.03.5 or later.

These config packages include everything needed to build the project based on a clean openwrt tree, in particular the subdirectory p44build/global-patches contains patches for all changes in the openwrt tree needed to build the project.

The p44b script uses quilt to apply these meta-patches when preparing a project.

The idea behind these patches is to avoid forking the openwrt tree, but have the set of needed changes clearly documented in the umbrella *-cofig package. The global-patches can also be useful resources to port improvements for the Omega2S (such as working i2S ASoC) to other projects.

  • p44ttngw: a port of a The Things Network (TTN) LoRA gateway to the Omega2, for use with the RAK831 radio.
  • pixelboard: a lounge table with a Omega2 based tetris and game of life built into the table plate itself.
  • p44sbb: a clock based on Swiss railway splitflap displays
  • p44wiper: a DC motor controller for smooth "wiping" movements of a DC motor with a single reed contact to avoid drift.
  • p44bandit: a serial interface controller for a old BANDIT CN milling machine.
  • hermel and leth: firmware for a Omega2S based controller using the PWM outputs for driving WS2813 LED chains for some effects and a scrolling text ticker, and a 2-channel A/D converter for sensor input, used for exhibition objects.
  • hmt20: firmware for a Omega2S based controller which allows connecting up to 24 cheap NXP MFRC522 based RFID reader boards and up to 4 WS281x LED chains, used for exhibition objects.

The *d packages (vdcd, p44mbrd, pixelboard, p44featured, ...) are openwrt makefiles for the linux daemon applications that usually are the core part of one of the above projects.

There are also some ports to openwrt for things I wanted to use for a project, e.g.

  • pagekitec: C version of the pagekite reverse proxy protocol (for remote access to devices via a pagekite server)
  • hxcmodplayer: a tiny MOD player requiring very little resources, working with ASoC
  • timidity: a MIDI expander, compiling, but still WIP (does not seem to work with ASoC yet)

Work in progress!

There is and will always be some work-in-progress in this feed, so don't expect everything turnkey ready.

Note that i2c-tools is also available in the standard feeds, but in slightly different variation - I needed some modifications for my own projects so I duplicated the package. Fortunately, OpenWrt source feed management is prepared for having multiple versions of the same package - just use the -p option to choose the feed to install a particular package from:

./scripts/feeds update plan44
./scripts/feeds install -p plan44 i2c-tools

plan44-feed's People

Contributors

crispyoz avatar plan44 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plan44-feed's Issues

p44-ledchain for OpenWrt with I2S and DMA.

Thanks for your great project p44-ledchain for OpenWrt.
However I want something different. As you told p44-ledchain based on PWM bus and MT7688 does not support DMA over PWM, So your module is limited to 1K pixels on each PWM.
But I want large capacity pixels support by Omega2 board, and for this DMA is essential.
I believe I2S bus has DMA and if you build p44-ledchain driver on I2S bus we can have driver with DMA support.

Thanks & regards
jags

p44-ledchain compiling from MT7628AN Target profile.

Hello,

I have a WS2812 IC that I am trying to use on the MT7628AN.

I started a compilation process for it.

However, I get the following error.

make[4]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-5.15.134' for subdir in .; do realdir=$(readlink -f /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain); grep -F /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; [ "/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain" = "$realdir" ] || grep -F $realdir /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/$subdir/Module.symvers >> /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp; done; sort -u /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers.tmp > /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers; mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers; mv /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/Module.symvers /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/symvers/p44-ledchain.symvers grep: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/./Module.symvers: No such file or directory touch /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.built rm -rf /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain mkdir -p /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain ERROR: module '/home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/p44-ledchain.ko' is missing. make[3]: *** [Makefile:61: /home/halid/OpenWRT_Projects/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/p44-ledchain/.pkgdir/kmod-p44-ledchain.installed] Error 1 make[3]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt/package/p44-ledchain' time: package/p44-ledchain/compile#56.82#11.32#66.88 ERROR: package/p44-ledchain failed to build. make[2]: *** [package/Makefile:120: package/p44-ledchain/compile] Error 1 make[2]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt' make[1]: *** [package/Makefile:114: /home/halid/OpenWRT_Projects/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/halid/OpenWRT_Projects/openwrt' make: *** [/home/halid/OpenWRT_Projects/openwrt/include/toplevel.mk:232: world] Error 2

What am I doing wrong?

p44-ledchain: Unexpected behaviour with SK6812 LED strip

Hi and first of all thanks for the awesome "p44-ledchain" driver. I just installed it this weekend on my new Onion and was able to get my LED chain working in a couple of minutes!

I have something that I don't quite understand though. I bought this product: https://www.brack.ch/m5stack-sk6812-rgb-led-flex-strip-50-cm-1008233?query=sk6812&redirected=1. Which should be an SK6812 with RGBW LEDs.
So I installed it on the onion with the command: "insmod p44-ledchain ledchain0=0,72,4. Attached the 5V to the "+" pin, the ground to the "G" pin and Pin 18 of the Expansion Dock to the "S" pin of the LED chain. I then wrote 4 bytes to the "/dev/ledchain0": "\xFF\x00\x00\x00" and expected a red first LED. But to my suprise it was green. So I tried all 4 bytes and found out, that the 4th byte is not white but already the next LED. After testing a while with all the LEDs it seems that they only take 3 bytes (GRB) but I need to finish the stream with an additional byte of "\x00". For the whole strip that means I write 72 * 3 bytes plus an additional "\x00" in the stream to get all of them glowing in the color I want.

So my basic question is, did I misunderstand the SK6812? Is there differences in SK6812 LED strips that I didn't see in this product? Did I use your driver wrongly or is it just a little bug?

Doesn't support Omega 2 Plus

Currently doesn't support Omega 2 Plus.

Trying to compile for the ttngw firmware.

How easy is it to change to compile for + versions?

Typoe in the readme.md

"You should use a 3.3V to 5V level shifter between the Omgea2/MT7688 PWM pin "

"Omgea2" should be "Omega2"

led-chain – Flickering with Omega2 and WS2812

Hey Lukas,

first off, thanks for open sourcing all this stuff!

I'm trying to run some ws2812 LEDs with a Onion Omega2, but have some trouble controlling them. Especially when writing data to /dev/ledchain0 at higher framerates (> 2fps), I get a lot of flickering/flashes (apparently wrong data pushed to the LEDs, since they keep the wrong color until the next update). Often they're at the correct color but fully turned on instead of dimmed, sometimes color's completely off.

I'm trying to write to that file via python right now, but the same issues happen when using echo -en … directly from CLI.

Strangely the last LED always lights up correctly – no matter how many LEDs I use in total. I tested with between 1 and 30 LEDs on two different strands.

Is that a known problem with the apparently demanding timing of the 2812 LEDs or could there be a different issue with how I use the driver? Do you have any ideas or maybe encountered a similar situation?

I'm using kmod-p44-ledchain_4.4.61+0.9-2_mipsel_24kc that I downloaded from plan44.ch (found a link in some forum thread...)

I'd appreciate any ideas on how to debug this.
Best,
Benjamin.

adding feed

Hello, I have an issue wen I try to add your feeds repo,

"src-git plan44 ssh://[email protected]/home/plan44/sharedgit/plan44-public-feed.git;master"

It's a ssh protocol, and when I try to update it, it want a password

Can you help me,

Thanks,

p44-ledchain MT7628AN not effect WS2812 chip.

Hello,

I was having a compilation problem with the issue below and I solved it. I am trying to enable p44-ledchain with an example configuration.

ledchain0, non-inverted, led count, ws2812 IC

insmod p44-ledchain ledchain0=0,4,1

dmesg output;

[ 1440.518084] ledchain: pwm_base=0xB0005000
[ 1440.526283] ledchain: v8 - Device: /dev/ledchain0
[ 1440.535594] ledchain: - PWM channel    : 0
[ 1440.543741] ledchain: - PWM buffer size: 48
[ 1440.552023] ledchain: - Number of LEDs : 4
[ 1440.560142] ledchain: - Inverted       : 0
[ 1440.568252] ledchain: - LED type       : WS2812 GRB
[ 1440.577909] ledchain: - Max retries    : 3
[ 1440.586021] ledchain: - Max Tpassive   : 0 nS (0=chip default)

I'm trying to try, but unfortunately the LEDs are not responding. What am I missing?

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.