@crispyoz said in Project "liburtc" the library to operate external RTC devices:
Not sure where I would buy old Russian diodes here on Australia though
You can try 1N34A that's Germanium Diode too and say us result.
@Ian-Smith You just import the STL into TinkerCad and you're all set.
In TinkerCad create a new design then look at the top right for "import" then you can import the STL into that design.
I just made the TinkerCad designs public, there are two parts, "Top" and "Bottom" in separate design files. search for "Dash Case" or maybe easier search for me by username crispyoz
@Radek said in How can I pass one GPIO pin to an other?:
Yes, this is what I actually tried to ask: how can i programmatically pass GND to those two pins.
I don't think connecting pins from Omega would do the trick as I need to pass GND.
For the moment the only idea I have is to buy relays but I would rather try to avoid it of possible
Instead of relays, try making a switch with a transistor. That way, you can use the Omega's GPIO as the control signal (set the logic level), but don't have to depend on the Omega to provide the current.
We used this method for the Omega-controlled MCU reset on the Arduino Dock 2:
@Modest-Polykarpovich great project!
@Modest-Polykarpovich said in [Manual] Connection TFT display ILI9341 (custom Dash):
Or download and force upgrade firmware (filename omega2dash-vX.X.X-bXXX.bin) via util sysupgrade from repo.onioniot.com. DIDN'T TESTED!
This should work assuming your TFT <-> Omega connections are the same as the Dash
one of onion omega developer(Lazar Demin) said below reasons
Since SPI flash cannot be easily connected and disconnected like USB storage or SD cards, the Linux kernel does not support automatic detection of SPI flash devices or partitions on the devices.
Instead, the SPI flash must be defined in the Kernel Device Tree.
See how the Omega's internal flash device and partitions are defined in the device tree specification (DTS) here: https://github.com/OnionIoT/source/blob/openwrt-18.06/target/linux/ramips/dts/OMEGA2.dtsi#L103
To support an external flash, you'll need to:
Add the SPI flash & it's partitions to the DTS
build a new firmware with the modified DTS.
I have verified it clearly. but I am worrying about onion guys are saying(Onion Corporation is not responsible for any damage to your device caused by using custom firmware or packages not built and released by Onion Corporation).
can you please help me sir how to add SPI code in custom firmware for detection of external SPI bus device.
Hi all! I glad to show my template of project Hello world that uses CMake build system, it's named as myapptemplate.
My last sample was use GNU Autotools, it's a difficult system. Today we have many projects with CMake (cmake.org). For new projects I recommend use CMake. But it will have problems with cross-compilation for beginners. Let's find it out!
Step 1. Creating you own CMake project
First you have to install git and cmake applications in the host if there are none.
Next follow into you projects directory in the host, e.g. $HOME/projects and clone there my CMake template myapptemplate project. Then enter new project directory and remove .git dir from there.
git clone --single-branch --branch CMake https://bitbucket.org/hlorka/myapptemplate.git <my_app_name>
rm -rf ./.git
The files CMakeSettings.json and myapptemplate.vcxproj for MS Visual Studio IDE and can be deleted too.
Step 2A. General compilation for the host machine
It's very simple. First you have to configure and make cache CMake's files. Look at the command below:
cmake . [--config Debug]
--config Debug will append debug information (symbols) and postfix -d to the output binary file (helloworld-d).
Then you can build (compile) project, using next commands below
cmake --build . [--clean-first]
Or via Makefile (make utility)
Step 2B. Cross-compilation using OpenWRT SDK
First open file cross-compile/openwrt-mips-toolchain.cmake for modify.
Fragment of this file below:
# Локальные переменные
# Экспортируемая переменная, в скрипт `xcmake.sh`
You have to check/modify OpenWRT SDK paths.
Next run cmake with parameters:
cmake -DCMAKE_TOOLCHAIN_FILE=./cross-compile/openwrt-mips-toolchain.cmake [--config Debug] [-DREMOTE_INSTALL_IP=<remote-IP> -DREMOTE_INSTALL_USER=root]
Parameters REMOTE_INSTALL_* will make targets to help you copy binary files to the Omega via rsync. You also need SSH access by key.
To build (cross-compile) project you have to run script:
./xcmake.sh --build . [--clean-first]
Step 3 (optional). Remote-installation
If you set REMOTE_INSTALL_* parameters, after build you able using remote-install, remote-uninstall targets for example below:
cmake --build . --target remote-install
Step 4 (optional). Making IPK-package
After cross-compilation you will see files openwrt-manifest-git.mk, openwrt-manifest-local.mk in the root project directory. There are two variants of manifest (renamed Makefile).
openwrt-manifest-git.mk - variant of manifest file of project to make package that sources will be download from Git repository.
openwrt-manifest-local.mk - variant of manifest file of project to make package localy. It's useful for debugging or internal using.
To make package, first you have to create feed directory outside this project, e.g. $HOME/my-openwrt-packages. Create sub-directory in it with you project name, e.g. $HOME/my-openwrt-packages/<my_app_name>
Then make symlink there for one of the Manifest file, e.g.:
ln -sf $HOME/projects/<my_app_name>/openwrt-manifest-local.mk $HOME/my-openwrt-packages/<my_app_name>/Makefile
Next change working dir to the root of OpenWRT SDK. Open file feeds.conf.default in any text editor and append your own feed there like below string.
src-link my_packages /home/<my_user_name>/projects/my-openwrt-packages
Then run once sequence of commands:
./scripts/feeds update my_packages
./scripts/feeds install <my_app_name>
Now you can build IPK-package:
Your IPK-files you can find in the directory <OpenWRT_SDK_dir>/bin/packages/mipsel_24kc/my_packages. It will named like <my_app_name>_1.0-1_mipsel_24kc.ipk
To install package from IPK-file in the Omega, run next command:
opkg install ./<my_app_name>_1.0-1_mipsel_24kc.ipk
@crispyoz Man thanks for this! I get regular DDoS attacks on my other home-hosted servers, so there's no reason to expect my little Onion device to escape, unfortunately.
I'll check out Nginx when I get the 2Pro and I'll also try lighttpd as well as that seems to have a low resource requirement. The device will only be running the web server and SSH so I don't anticipate too many resource issues, but we'll see!
I'll post something here when it's up and running!
@asyxcv, you should compile it manualy, next link will be usefull: How to compile C/C++ native applications
You are trying to use old manuals about LEDE.
Another way your project has also special manifest for the OpenWRT system (see snapcast/openWrt/Makefile.openwrt) it needs to make .ipk-files (packages) for the opkg util. But this file is old and needs to be fixed. And last: making your own packages for opkg is very difficult task for masters. More infirmations about it you can get from OpenWRT official documents, community and examples.
@Akash614 if you need a definitive answer you would need to give more specific details. @UFD is quite correct, the main issue would be that of capacity. The Pi has more RAM and a faster CPU, but if you don't require these then the Omega may well be suitable.
From your initial question:
Onion has UARTs available
Onion can run a database (I use SQLite3 on an sdcard)
You can run a web server, in fact I run 2 different web servers on my devices
So it comes down to capacity and performance.