@Lazar-Demin Thanks for the update.
So I thought you said that my bootloader was out of date. So I followed the instructions at:
https://docs.onion.io/omega2-docs/Web-Recovery-flash-bootloader.html
So I downloaded uboot-omega2p-20221118.bin and applied the uboot update.
To do so, I started web recovery mode, selected uBoot Update which says:
You are about to update the uBoot bootloader on the Omega. Select the .bin file from your computer and click the Update! button.
The URL in the browser now reads http://192.168.8.8/uboot.html.
I select the file previously mentioned, then click Upload!.
These are the results:
Data will be downloaded at 0x81000000 in RAM
Upgrade type: U-Boot
Upload file size: 173124 bytes
Loading: #######################################
#######################################
#######################################
####
HTTP upload is complete.
Upgrading...
****************************
* U-BOOT UPGRADING *
* DO NOT POWER OFF DEVICE! *
****************************
raspi_wait_ready: read_sr fail: 0
## Error: HTTP ugrade failed!
So I've followed the suggestion to upgrade the bootloader via the information that you suggested.
File data on my file system for uboot-omega2p-20221118.bin:
ls -l Downloads/uboot-omega2p-20221118.bin
-rw-rw-r-- 1 user user 173124 May 23 01:06 uboot-omega2p-20221118.bin
As you can see this matches exactly the byte count of the uboot upload, have I misread what you were advising?
E.g. from previous paragraph output of upgrade we see
Upload file size: 173124 bytes
... Which matches the file size of my uboot upload. I hope that's the right thing to have done?
While OpenWrt is a single user system, you can create additional users so you don't have to disclose the root user password. You can add the user by editing /etc/passwd and /etc/shadow or you can install the useradd package:
opkg install shadow-useradd
Now add a new user named "admin", but we don't want them to have shell access:
useradd admin -d /var -M -s /bin/false -p mytemporarypassword
The password is added in cleartext so you need to change it using the command:
passwd admin
Follow the prompts to set your password then you can confirm the new user has been added as required:
cat /etc/passwd
cat /etc/shadow
Since OnionOS uses ubus via rpc we need to add the user to the rpc user list. The configuration file is /etc/config/rcpd, but you can use uci commands to add the user:
uci add rpcd login
uci set rpcd.@login[-1].username='admin'
uci set rpcd.@login[-1].password='$p$admin'
uci add_list rpcd.@login[-1].read='*'
uci add_list rpcd.@login[-1].write='*'
uci commit rpcd
The username must match the username we just created and the structure of the password field causes the rpc daemon to use the system password we just created.
The "read" and "write" fields is set to an asterisk indicating that the user will have unrestricted access, the same as the root user.
You can confirm the new user had been added using a uci command:
uci show rpcd
rpcd.@login[0]=login
rpcd.@login[0].username='root'
rpcd.@login[0].password='$p$root'
rpcd.@login[0].read='*'
rpcd.@login[0].write='*'
rpcd.@login[1]=login
rpcd.@login[1].username='admin'
rpcd.@login[1].password='$p$admin'
rpcd.@login[1].read='*'
rpcd.@login[1].write='*'
Now restart the rpc daemon:
service rpcd restart
You can now login to OnionOS with the same functionality as the root user has, but the user has no console access.
@cyberai pls try running the checkCamera.py Example Python Program and posting the command line output and screenshots of the output.
This will give us a better idea of what's going on.