31 December 2021

Raspberry Pi zero W wifi does not working

 I have been google around about the issue. I have tried with different images: from 2017 to 2021, lite, desktop and full desktop. no success. 

If you have raspiberry pi zero w v1.1. wifi does not working. There must be something with linux image. I am highly double there is issue with hardware. 

The first command check whether wlan0 exist:

cmd: ifconfig -a

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 16  bytes 1922 (1.8 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 16  bytes 1922 (1.8 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


read your dmesg 

cmd: dmesg 

...

[22.408091] cfg80211: Loading compiled-in X.509 certificates for regulatory database

[   22.874323] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'

[   23.605382] brcmfmac: F1 signature read @0x18000000=0xe000915

[   23.605790] brcmfmac: brcmf_chip_recognition: SB chip is not supported

[   23.605817] brcmfmac: brcmf_sdio_probe_attach: brcmf_chip_attach failed!

[   23.605848] brcmfmac: brcmf_sdio_probe: brcmf_sdio_probe_attach failed

[   23.661229] brcmfmac: brcmf_ops_sdio_probe: F2 error, probe failed -19...

[   23.661680] usbcore: registered new interface driver brcmfmac

....

for a compare,  this is dmesg from zero 2 W.

[    8.178321] cfg80211: Loading compiled-in X.509 certificates for regulatory database

[    8.377336] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'

[    8.529369] brcmfmac: F1 signature read @0x18000000=0x1542a9a6

[    8.582584] checking generic (1eaf0000 10a800) vs hw (0 ffffffff)

[    8.582613] fb0: switching to vc4drmfb from simple

[    8.603007] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43436-sdio for chip BCM43430/2

[    8.603836] usbcore: registered new interface driver brcmfmac

[    8.625623] Console: switching to colour dummy device 80x30

[    8.637977] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])

[    8.662539] Registered IR keymap rc-cec

[    8.662796] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0

[    8.663070] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input0

[    8.665115] vc4_hdmi 3f902000.hdmi: Could not register sound card: -517

[    8.783878] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43436-sdio for chip BCM43430/2

[    8.787072] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43436-sdio for chip BCM43430/2

[    8.824737] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/2 wl0: Oct  9 2020 14:44:32 version 9.88.4.65 (test) (f149b32@shgit)  (r679549) FWID 01-f40f3270


someone post similiar issue with raspiberry pi zero w

https://forums.raspberrypi.com/viewtopic.php?t=310780

19.117632] brcmfmac: F1 signature read @0x18000000=0x1541a9a6

[ 19.136911] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 19.137399] usbcore: registered new interface driver brcmfmac ***

[ 19.176925] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt failed with error - 2

[ 19.268736] brcmfmac: brcmf_sdio_verifymemory: Downloaded RAM image is corrupted, block offset is 262144, len is 2048 ***

[ 19.269087] brcmfmac: brcmf_sdio_download_firmware: dongle image file download failed


I am quite disappoint with this board. I liked raspberry pi because of their reputaton about well support software. apparently, this is not true.

The only way to get software raspiberry pi w is via USB + Pc. 

08 May 2021

Where is UART port of XiaoMi tv box



 I want to install armbian on this old tv box. but unfortunately, I could not find any information about uart port of this model.

17 February 2021

how to setup raspberry pi as a geo(web)server part 1-- setup postgresql on the raspberry pi

 How to setup Raspberry pi 4 as a geoserver


prepare:

1. raspberry pi 4. I am using the 2GB version.

2. install ubuntu server on the pi4.

3. Internet/Wifi connection

4. basic knowledge of computer and linux terminal.


Step1. Using SSH login on the pi 4. 

1.1 start terminal

1.2 ssh login on your server

ssh ubuntu@YOURSERVERIP


step2: keep your server up to date

sudo apt install

sudo apt upgrade


step3 install postgresql


read https://tecadmin.net/install-postgresql-server-on-ubuntu/


sudo apt-get install wget ca-certificates


ok


sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'


sudo apt-get update

sudo apt-get install postgresql postgresql-contrib


result:


Success. You can now start the database server using:


    pg_ctlcluster 13 main start


install postgis extension for postgresql


sudo apt install postgis postgresql-13-postgis-2.5


check database:

1.Switch to postgres user.


sudo -i -u postgres


2. create database, 

createdb postgis25


psql -d postgis25


3. create extension postgis;

4. select postgis_version();


ctrl + d, two times return to normal terminal


install import tool gdal

sudo apt install gdal-bin


import a ESRI shapefile (WORLD boundary) to database. 

mkdir geodata

cd geodata

wget https://opendata.arcgis.com/datasets/a21fdb46d23e4ef896f31475217cbb08_1.zip


sudo apt install zip 

unzip a21fdb46d23e4ef896f31475217cbb08_1.zip


sudo -i -u postgres


ogr2ogr -f PostgreSQL PG:dbname=postgis25 -progress -lco SCHEMA=public -nlt PROMOTE_TO_MULTI 99bfd9e7-bb42-4728-87b5-07f8c8ac631c2020328-1-1vef4ev.lu5nk.shp


login into database 


psql -d postgis25


to get all tables

\dt


get the first feature


SELECT objectid,cntr_name from lu5nk limit 1;


to quit

\q


using cmd htop check raspberry resources after install postgres



[2021-05-08] Unfortunately, the project is onhold. I am using the machine for another project. Right now, I installed MotionEyeOS on it. The project is about wiring doorbell with esp32(micro python) Microcontroler. With the doorbell triggered, a call will be made to webhook or webserver, then send rich notification(timestamp with snapshot of Raspberry Pi camera) to my email or mobile.