日時: | 2024-02-01 |
---|---|
作: | 時雨堂 |
資料 バージョン: | 2024.1 |
GitHub URL: | https://github.com/shiguredo/momo |
製品 URL: | https://momo.shiguredo.jp/ |
Installing Huawei E3531 Surf Stick on Linux
May be a valuable insight for more modern surf sticks like Huawei E8231 and the likes ...
Linux is currently Ubuntu, Debian or Raspbian should be similar
This Huawei Surf stick has several USB mode. It appears first as CD-ROM-like device, so that Windows users can install their driver, then switches mode to appear as "something else". By defaut, this is a network card (virtually connected to a router),
# /etc/udev/rules.d/70-huawei-e3.conf | |
# Necessary for network interface name | |
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14dc", NAME="usb0" | |
# Might be duplicate to usb_modeswitch config, however it's good to have it there | |
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/huawei_e3.conf" |
- Raspberry pi - Any
- USB Audio Adapter - USB Adapter
- USB Hub - Zebronics USB Hub
Once you connected the USB Audio device with Raspberry pi use following command to see the list of connected USB device
import cv2 | |
capture = cv2.VideoCapture(0) | |
capture.set(3, 320) #set width of frame | |
capture.set(4, 200) #set hieght of frame | |
capture.set(5, 20) #set FPS | |
capture.set(10, 20) #set brightness | |
successful = True | |
while successful: | |
successful, image = capture.read() |
These are notes while researching a way to convert a browser/website to a stream. This could be used for Facebook Live or for webrecording. TL'DR:
- I started with Phantomjs - but that didn't support the html5 video tag
- SlimerJS supports it, but there is no way to record audio directly (though this might come from desktop audio)
- So I moved to research ffmpeg/X11/XVFB to record it with linux which works
- But ffmpeg has no easy way to mix streams/overlays to I moved on to OBS with overlay browser support
- I started researching options OBS in docker and it needed best a GPU , so I move to nvidia-docker
- And so came across building game servers on EC2/AWS using GPUs and managed to run OBS inside of GPU g2x.large machine
- I tried streaming to twich , which works great and managed to restream 4K 60FPS youtube on an AWS instance
- Remote control works through OBS-Remote but OBS has kinda limit in types of features
- usb_modeswitch, usb_modeswitch-data
- libusb1
- libusb-devel(Fedora), libusb-dev(Debian based)
By default, your linux box would register your Huawei E8372 as a Mass Storage device and not (somehow) as a modem. First, make sure you have the exace same device we're talking about. This can be confirmed by looking at two values using the following command (while the dongle is plugged in): As an elevated user:
# lsusb | grep Huawei
# Multiple sources here: | |
# https://atinkerersblog.wordpress.com/2014/07/26/get-notified-when-your-raspberry-pi-is-booted-with-pushbullet/ | |
# - follow the steps to make rc.local executable below | |
# this script is a compilation of all three below | |
# https://learnraspi.com/get-notifications-raspberry-pi-pushbullet/ | |
# http://biosrhythm.com/?p=1151 | |
# http://askubuntu.com/questions/9853/how-can-i-make-rc-local-run-on-startup | |
# create the pushbullet script | |
$ sudo nano /usr/bin/notify.sh |