Aller au contenu


firened

Inscrit(e) (le) 12 juil. 2020
Déconnecté Dernière activité hier, 18:17
*****

Sujets que j'ai initiés

how to use the e3372h with stick firmware (instead of hilink firmware)

16 novembre 2025 - 03:20

The e3372h comes in multiple versions as well 2 different firmwares.
 
How to tell them apart:
A. the hilink firmware is plug and play on raspbian. Once inserted, run `ifconfig` and you'll see a new `eth1` interface. Usually with an assigned IP of 192.168.8.100.
 
B. the stick firmware, once inserted, run `ifconfig` and you'll see a new `wwan0` interface, as well as these new devices: /dev/cdc-wdm0 , /dev/cdrom and probably /dev/sg0 , /dev/sg1 and /dev/sr0 .
 
How to set them up:
A. hilink firmware is plug and play
 
B. stick firmware needs setup. I found 2 methods that are supposed to work:
B.1. using mbimcli:
This does not work reliably. It fails silently from time to time.
B.1.1. Run
sudo apt install libmbim-utils
sudo mbimcli -d /dev/cdc-wdm0 --query-device-caps
sudo mbim-network /dev/cdc-wdm0 start
B.1.2. If it works (takes up to 90 seconds), automatically start it on boot:
Run
sudo nano /etc/mbim-network.conf
Insert
APN="internet"
USERNAME=""
PASSWORD=""
IP="dhcp"
Apn `internet` might be different for your ISP.

B.1.3.
sudo nano /etc/systemd/system/mbim-network.service
Insert
[Unit]
Description=MBIM network connection
After=network.target usb-devices.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/bin/mbim-network /dev/cdc-wdm0 start
ExecStop=/usr/bin/mbim-network /dev/cdc-wdm0 stop
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
B.1.4. Enable service:
sudo systemctl daemon-reload
sudo systemctl enable --now mbim-network.service
B.2. using network-manager
sudo apt update
sudo apt install modemmanager modem-manager-gui-help network-manager
nmcli connection add type gsm ifname cdc-wdm0 con-name stick apn internet (gsm.pin ****)
sudo nmcli connection modify stick connection.autoconnect yes
nmcli connection up stick
Entry apn `internet` might be different for your ISP.

4G Antenna tests for mobile data connections like e3382h

16 novembre 2025 - 02:58

(*Typo in Title. Should be Huawei e3372h)

 

In this Thread: various external antennas for 4G connections and their RSSI signal reception strength.
 
1) huawei e3372h hilink firmware how to read  
2) huawei e3372h stick firmware how to read  
3) antenna tests 
 
1) signal strength hilink fw
Run command:

HUAWEIROUTERIP='192.168.8.1'
RESPONSE=`curl -s -X GET http://$HUAWEIROUTERIP/api/webserver/SesTokInfo`
COOKIE=`echo "$RESPONSE" | grep SessionID= | cut -b 10-147`
TOKEN=`echo "$RESPONSE" | grep TokInfo | cut -b 10-41`
curl --silent -b $COOKIE -c $COOKIE -H "X-Requested-With: XMLHttpRequest" http://$HUAWEIROUTERIP/api/monitoring/status --header "__RequestVerificationToken: $TOKEN" --header "Content-Type:text/xml"

Source: https://forums.raspb...c.php?p=2116154

2) signal strength stick fw

sudo mbimcli -d /dev/cdc-wdm0 --query-signal-state

3) antenna tests

Fichier joint  20251005_155509.jpg   148,48 Ko   5 téléchargement(s)
Fichier joint  20251005_154618.jpg   125,93 Ko   3 téléchargement(s)
Fichier joint  20251005_154940.jpg   145,71 Ko   3 téléchargement(s)
Fichier joint  20251005_160250.jpg   91,65 Ko   4 téléchargement(s)
Fichier joint  20251005_155200.jpg   164,47 Ko   1 téléchargement(s)
Fichier joint  20251005_155344.jpg   118,68 Ko   2 téléchargement(s)


Fichier joint  20251115_164614.jpg   102,21 Ko   3 téléchargement(s)
Fichier joint  20251115_165432.jpg   86,36 Ko   3 téléchargement(s)
Fichier joint  20251115_171842.jpg   71,48 Ko   2 téléchargement(s)
Fichier joint  20251115_171640.jpg   96,12 Ko   3 téléchargement(s)
Fichier joint  20251115_171403.jpg   75,61 Ko   4 téléchargement(s)
Fichier joint  20251115_170727.jpg   77,52 Ko   4 téléchargement(s)
Fichier joint  20251115_170424.jpg   85,03 Ko   4 téléchargement(s)
Fichier joint  20251115_170204.jpg   92,37 Ko   4 téléchargement(s)


Add your own antenna tests into the comments ↓


Thermal camera on internet controlled robot

25 octobre 2024 - 10:33

feel free to try the thermal camera and robot «CakeOnIce» (online during GMT day) on https://vigibot.com

got the infiray p2 pro thermal camera.
connected to PC it works like a webcam.
it recalibrates every 10s with an audible click, so i needed a way to turn it off when not in use.

i used uhubctl from https://github.com/m...raspberry-pi-4b
off:
sudo uhubctl -l 1-1 -a off  
sudo uhubctl -l 2 -a off
all 4 usb are switched together, turning off the usb microphone meant restarting the vigibot client every time.

fortunately the 4B allows usb host on the "power in" type c, to which i connected the microphone to keep it powered. `otg_mode=1`
https://forums.raspb...ic.php?t=246348

wrote a script `vim thermal_power_manager.sh`:
#!/bin/bash                              
# Function to handle cleanup on SIGTERM
cleanup() {
    echo "Stopping FFmpeg process..."
    kill $ffmpeg_pid
    wait $ffmpeg_pid 2>/dev/null

    echo "Disabling power to USB hub and thermal camera..."
    uhubctl -l 1-1 -a 0 > /dev/null
    uhubctl -l 2 -a 0 > /dev/null
    exit 0
}

# Enable power to USB hub and thermal camera
echo "Enabling power to USB hub and thermal camera..."
uhubctl -l 1-1 -a 1 > /dev/null
uhubctl -l 2 -a 1 > /dev/null

# Start FFmpeg stream
sleep 2
echo "Starting FFmpeg stream..."
ffmpeg -loglevel warning -i /dev/video1 -c:v h264_omx -profile:v baseline -b:v 1500000 -flags:v +global_header -bsf:v dump_extra -f rawvideo -vf 'scale=640x480' tcp://127.0.0.1:8043 &
ffmpeg_pid=$!

# Trap SIGTERM signal and execute the cleanup function
trap cleanup SIGTERM SIGINT

# Wait for the FFmpeg process to finish
wait $ffmpeg_pid

# Disable USB hub power for thermal camera after ffmpeg exits
uhubctl -l 1-1 -a 0 > /dev/null
uhubctl -l 2 -a 0 > /dev/null

echo "Stream stopped and USB power disabled."
exit 0
compiled it `shc -f thermal_power_manager.sh`, `chmod +x thermal_power_manager.sh.x`

and added to CMDDIFFUSION in /boot/robot.json

Fichier joint  IMG_20241022_144754.jpg   133,07 Ko   19 téléchargement(s)Fichier joint  1729602622182_firened_CakeOnIce.mp4   1,14 Mo   67 téléchargement(s)

[Guide] How to use DECTalk, the Moonbase Alpha Voice, on your robot

03 avril 2024 - 12:39

DECTalk TTS (moonbase alpha voice) runs on raspberry pi

for web
https://webspeak.terminal.ink/

Install, Compile fails on 3A, works on 4B:
https://github.com/dectalk/dectalk

invoke locally:
echo "[dah<300,30>][dah<60,30>][dah<200,25>][dah<1000,30>][dah<200,23>][dah<400,25>][dah<700,18>]" | tee ~/tts.txt

~/dectalk/dist/say -pre '[:phoneme on]' -fi ~/tts.txt -fo ~/dtmemory.wav; aplay -q -D plughw:1 ~/dtmemory.wav
In-line command documentation:
https://dectalk.gith...ds_overview.htm

create songs:
https://scruss.com/b...g-with-dectalk/

fun phrases, songs:
http://theflameofhope.co/DECTALK.html
http://theflameofhope.co/dectalk%20speak%20window/ROCK/
https://www.reddit.c..._songscommands/
https://steamcommuni.../?id=1226345628
add your own fun phrases in the comments.

see all these TTS related posts:
Amazon Alexa TTS
picoTTS
Google TTS
Enable espeak markup language
dectalk (moonbase Alpha) TTS

testing an orange pi, as an alternative to raspberry pi

22 décembre 2022 - 01:31

writing this down in case it's useful for someone in the future.

i got an "orange pi pc", it doesn't have WiFi, but there are other orange pis with wlan.

Raspbian is only supported on raspberry pi. i installed armbian on the orange pi pc.
UPS 40-pin hats fit and are electronically compatible, but the mounting holes do not align!

Fichier joint  IMG_20221214_103125.jpg   92,08 Ko   54 téléchargement(s)
Fichier joint  IMG_20221214_103219.jpg   75,36 Ko   51 téléchargement(s)

orange pi uses "parallel dvp data" and does not support raspberry pi's "MIPI CSI-2" camera modules. some people complain about bugs, but image quality would probably be ok for the supported "gc2035" and "ov5640" camera modules. orange pi has a different CSI connector too.

camera hardware support:
ov5640 70°FOV 30/60fps@?
gc2035 110°FOV 15fps@uxga
ov5647 will not work, despite what AliExpress says. ov5647 has a 15pin flex cable but orange pi pc has 24pin connector.

testing the Vigibot client:
install steps taken:
```
sudo nano /boot/armbianEnv.txt
console=display

sudo armbian-config
```

package pigpio cannot be installed.
pigpio is only supported on Raspbian:
https://github.com/N...s/issues/122993
lgpio or rgpio may be alternatives
http://abyz.me.uk/lg/rgpio.html

pigpio calls in vigiclient:
```
const GPIO = require("pigpio").Gpio;
GPIO.INPUT
gpioOutputs[i][j] = new GPIO(hard.OUTPUTS[i].GPIOS[j], {mode: GPIO.OUTPUT});
gpioOutputs[n][i].pwmFrequency(hard.PWMFREQUENCY);
gpioOutputs[n][i].servoWrite(pwm);
gpioOutputs[n][gpio].pwmWrite(Math.abs(map(pwm, -100, 100, -255, 255)));
gpio.mode(GPIO.INPUT);
gpio.digitalWrite(etat);
```

from what i see lgpio has functions for pwmWrite, digitalWrite, servoWrite too, only pwmFrequency doesn't exist, but that's not absolutely necessary.

Links collection:
http://www.orangepi.org/orangepiwiki/index.php/Orange_Pi_PC
Armbian:
https://www.armbian.com/orange-pi-pc/
https://linuxhint.co...bian-gnu-linux/



conclusion:
the orange pi, as a SBC for simple uses works well and is cheap. Armbian has similarities and differences to Raspbian, and seems to be a nice OS.
however, it appears that support for each peripheral is manufacturer dependant, in this case orange pi.
whether peripherals like camera, gpio, i2c, uart and the like will work with specific software is not clear.

regarding Vigibot, i think it's possible, but would probably take a considerable amount of effort. wifi, camera, uart, i2c is mostly handled by the OS and can perhaps work with little changes.
but it would require multiple modifications to the vigiclient code to support lgpio.