@OSO-Bear Judging by the output of the program and your makefile, it looks like your program was compiled for x86 (your computer). You'll have to use an xCompile.sh script like the example to cross compile your C program.
PS it's three backticks to open a code block, and three to close it. See this link for more markdown syntax.
Harwin makes these also.
My local supplier (Electrocomp) had stock, at $0.1 each
Long strip with 60pins or more, but just trimmed to size.
(other supplier quoted $10 each and had 2 weeks delivery
so 10000% mark-up ! )
@Zheng-Han said in omega2 uhttpd php7-cgi Bad gateway:
@Mentor-Gashi try a factory restore firstboot and a clean install of onion-os and oos-app-editor it should configure php for you automatically
make sure you are at the latest firmware build oupgrade -l
Thanks, the -l flag did indeed upgrade the firmware despite the regular check was claiming the firmware was up to date.
Going to give it a try if I can get a use of it
@Matt-Gessner we don't have short term plans to work on Cloud Compile, but we do have two alternate ways to compile C programs for your Omega:
Compiling directly on the Omega
Cross compiling on your computer and transferring the binary to the Omega
Setting up the Build System
Cross Compiling Programs
Cross Compiling Programs that use External Libraries
So for the short-term, I would recommend buying a bigger SD card and exploring cross compilation
Finally found a solution:
If you use your own custom webserver to setup the omega and want to display nearby Networks.
<?php
echo shell_exec("ubus call onion wifi-scan \"{'device':'ra0'}\"");
?>
^ This DOESN'T work! because:
the php-interpreter doesn't have enaught ram to excute the command. It'll take a eternity.
Solution:
in /etc/php.ini
set memory_limit form 8M to 32M
memory_limit = 32M ; Maximum amount of memory a script may consume.
now the scan only takes about 5sec.
@Manny-Rodriguez We've actually written about using MQTT on the Omega. Check out the MQTT heading in the tip index at https://onion.io/2-bullet-tuesday/
@Marti-MG I hope I'm not too late.
If you want to use GPIO18 (PWM_CH0) only then you should remove U6 the 6 pin SOT23 marking C145 SMD IC only.
See also the official Omega-Power-Dock schematic.
After this modification Power Dock 1 remains fully functioning. You can check the battery level visually with the pover-dock command as before - but the 'battery level check' scripts will not work of course.
Power Dock Checking the Battery Level
Yes, thank you for the prompt response. The info was contained in the link you provided at the end. Perhaps others will find this in their searches more quickly than I, sam