laitimes

Shh

Shh

Compile | Zheng Liyuan

Produced by | CSDN(ID:CSDNnews)

What would you do if your neighbor across the wall always played reggaeton at maximum volume on a Bluetooth speaker at 9 a.m. every morning?

A. Go knock on the door next door and politely ask them to lower the volume.

B. Contact the property and ask the property to communicate with it.

Developer Roni Bandin was faced with such a situation, and his choice was C: use the Raspberry Pi and AI technology to make an AI device that can handle the situation more creatively — when the Raspberry Pi detects reggae music, it will interfere with nearby Bluetooth speakers, distorting the audio to block out the neighbor's "loud music".

Shh

Preliminary design

According to Roni Bandin, he named the device Reggaeton Be Gone. It is mainly responsible for monitoring the audio in the room, identifying reggae music through machine learning, and once identified, triggering communication requests and data packets to the Bluetooth speaker.

In short, Reggaeton Be Gone is designed with the goal of disabling speakers that play reggae music, or at least disrupting the sound to the point where a neighbor has to turn off the speakers. With the initial idea in mind, Roni Bandin sketched out the design:

Shh

Among them, the hardware components of Reggaeton Be Gone are as follows:

Raspberry Pi 3B+: The Raspberry Pi 3B+ is the latest addition in the Raspberry Pi 3 series, featuring a 64-bit quad-core processor running at 1.4GHz with dual-band 2.4GHz and 5GHz wireless LAN, Bluetooth 4.2/BLE, faster Ethernet, and PoE capabilities via separate PoE HAT.

Shh

DFRobot Small OLED Screen: A 0.91-inch OLED display with a resolution of 128x32 pixels, an IIC interface, an operating voltage of 3.3-5V, and a maximum power consumption of about 25Ma for the full screen.

Shh

DFRobot Gravity Digital Big Button Module (Yellow): Compatible with 5/3.3V voltage, adaptable to Arduino's new generation of master DUE.

Shh

In addition to this, there is a USB microphone or a sound card with a microphone (for audio observation, the Roni Bandin uses a Behringer Xenyx302), a microSD card, a 5v 3A power supply, a jumper cable for the female to the female, and a 3D printed case front (the Roni Bandin uses a metal case that has been removed from a broken audio board). In addition, Roni Bandin adds: If you want to test with your own BT, you can also buy a cheap Bluetooth audio receiver board.

How?

circuit diagram

Once the hardware was ready, Roni Bandin first connected the parts according to the circuit diagram:

(1) The button connects to GND and GPIO 26

(2) The OLED screen is connected to VCC, GND, SDA GPIO 2 and SDL GPIO 3

(3) Connect your sound card or microphone to USB 

Shh

Software settings

He then installed the Raspberry Pi operating system (https://www.raspberrypi.com/software/), executed sudo raspi-config, and enabled SSH and i2c. Then make some necessary settings:

pip install RPi.GPIO

pip3 install Adafruit_GPIO

sudo apt install git

pip install picamera

sudo apt install python3-opencv

sudo apt-get install libatlas-base-dev libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev

git clone https://github.com/edgeimpulse/linux-sdk-python

sudo python3 -m pip install edge_impulse_linux -i https://pypi.python.org/simple

sudo python3 -m pip install numpy

sudo python3 -m pip install pyaudio

Check if the OLED screen is detected by i2cdetect -y 1, you should also run alsamixer and press F6 to select the board, F4 to change the input volume.

Shh

machine learning

On the machine learning (ML) side, Roni Bandin sets up neural networks as follows:

Shh

GTZAN is a very classic music dataset, but it doesn't have an AI classification dataset and model for the reggae music category, so Roni Bandin decided to train the model himself: "Reggaeton's classic syncopated rhythm pattern can be noisy, but it's also very good for machine learning. ”

Shh

To do this, Roni Bandin downloaded several reggae music and other types of songs and exported them to 16khz wav format and uploaded them to the Edge Impulse platform, a user-friendly development platform for machine learning on edge devices that covers the entire process from data collection to model deployment required for the TinyML learning path. He then deployed for Linux ARM, exported the eim file and passed it in to the Raspberry Pi, changing the permissions to 744. Roni Bandin said that he will release the model soon and those interested can be patient.

Python code

The Python code will take audio samples and send them to the ML model for inference. If it is recognized that the score of reggae music is above the threshold, one of the two BT connection methods is triggered. One of them uses rfconn and the other uses l2ping. The log file is saved and the device operation is displayed on the OLED screen.

The setup configuration is as follows, and Roni Bandin cautions, "It's best to use trial and error to determine the best approach, package size, and number of wires." If you can use an external BT board with an antenna, it would be great. ”

myPath="" # reggaeton be gone folder

selectedDeviceId = 1 # id of the USB mic of board

method = 1 # 1 to 3 # BT attack method

targetAddr = "" # mac address of the BT speaker

packagesSize = 0 # packet size, try around 600-1000

threadsCount = 0 # how many

threshold = 0.95 # limit to consider that the song is reggaeton

myDelay = 0.1 # delay between connections

forceFire = 1 # test purposes

model = ".eim" # model file name

How to get the MAC address of a BT speaker

Roni Bandin offers two ways to solve this problem:

(1) If you are testing with your own BT speakers, you can connect your smartphone and check your MAC from the connection information;

(2) If not, you can use the bluetoothctl command to guess the target MAC address based on information, rssi power, and other information.

Sudo Bluetooth

scan on

IN THE SECOND METHOD, THE DEVELOPER WILL OBTAIN 2 COLUMNS OF MAC ADDRESSES, AND SOMETIMES SPEAKER IDENTIFIERS, SUCH AS POCKETTUNE, AUVIO, ETC., AND THEN EXECUTE THE FOLLOWING COMMAND TO DETERMINE THE MAC ADDRESS THROUGH RSSI INFORMATION:

Sudo BTMON |Grape Rossi & Sudo Hesitul Scan

and get RSSI

At the same time, a file named log.txt will record all device actions.

Shh

End Result

At this point, the device, called Reggaeton Be Gone, is roughly complete. Roni Bandin recorded a final performance of the device: it was able to accurately identify whether the song being played was reggae music, and after determining that it was reggae, it successfully interfered with the audio from the Bluetooth speaker.

However, Roni Bandin also stresses that Reggaeton Be Gone is an experimental project that can be used as a reference for educational purposes, and that it is important to "carefully review local laws and regulations" before following suit. In addition, the device works only if it is close enough to the speaker, and not all Bluetooth speakers are vulnerable.

Reference Links:

https://www.hackster.io/roni-bandini/reggaeton-be-gone-e5b6e2

.data_color_scheme_dark{--weui-BTN-ACTIVE-MASK: rgba(255, 255, 255, .1)}.data_color_scheme_dark{--weui-BTN-DEFAULT-ACTIVE-BG: rgba(255, 255, 255, .126)}.data_color_scheme_dark{--weui-DIALOG-LINE-COLOR: rgba(255, 255, 255, .1)}.data_color_scheme_dark{--weui-BG-COLOR-ACTIVE: #373737}.data_color_scheme_dark{--weui-BG-6: rgba(255, 255, 255, .1);--weui-ACTIVE-MASK: rgba(255, 255, .1)}.data_color_scheme_dark{--weui-REDORANGE: #ff6146;--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .8);--weui-FG-HALF: rgba(255, 255, 255, .6);--weui-FG-1: rgba(255, 255, 255, .5);--weui-FG-2: rgba(255, 255, 255, .3);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;;--weui-LIGHTGREEN: #3eb575;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6); --weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .05)}.data_color_scheme_dark{--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .8);--weui-FG-HALF: rgba(255, 255, 255, .6);--weui-FG-1: rgba(255, 255, 255, .5);--weui-FG-2: rgba(255, 255, 255, .3);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;--weui-LIGHTGREEN: #3eb575;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .05)}.data_color_scheme_dark{--weui-elpsColor: rgba(255, 255, .8)}.data_color_scheme_dark{--weui-mask-elpsColor: rgba(255, 255, 255, .8);--weui-mask-gradient: linear-gradient(to right, rgba(25, 25, 25, 0), #191919 40%)}.data_color_scheme_dark{--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .8);--weui-FG-HALF: rgba(255, 255, 255, .6);--weui-FG-1: rgba(255, 255, 255, .5);--weui-FG-2: rgba(255, 255, 255, .3);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;--weui-LIGHTGREEN: #3eb575;;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .05)}.rich_media_content{color:#000000e5; font-size:var(--articleFontsize); overflow:hidden; text-align:justify}.rich_media_content{color:var(--weui-FG-HALF)}.rich_media_content{position:relative; z-index:0}.wxw-img{vertical-align:bottom}.rich_media_content:not(.old_list_style) .list-paddingleft-1,.rich_media_content:not(.old_list_style) .list-paddingleft-2,.rich_media_content:not(.old_list_style) .list-paddingleft-3{padding-left:2.2em}.rich_media_content:not(.old_list_style) .list-paddingleft-1 .list-paddingleft-2,.rich_media_content:not(.old_list_style) .list-paddingleft-2 .list-paddingleft-2,.rich_media_content:not(.old_list_style) . list-paddingleft-3 .list-paddingleft-2{padding-left:30px}.rich_media_content:not(.old_list_style) .list-paddingleft-1{padding-left:1.2em}.rich_media_content:not(.old_list_style).fix_apple_default_style .list-paddingleft-1{padding-left:1.5em}.rich_media_content.old_list_style .list-paddingleft-1,.rich_media_content.old_list_style .list-paddingleft-2,.rich_media_content.old_list_style .list-paddingleft-3{padding-left:0}.rich_media_content.old_list_style . list-paddingleft-1 .list-paddingleft-1,.rich_media_content.old_list_style .list-paddingleft-2 .list-paddingleft-2,.rich_media_content.old_list_style .list-paddingleft-3 .list-paddingleft-3{padding-left:1.2em}.code-snippet__fix{font-size:14px; margin:10px 0; display:block; color:#333; position:relative; background-color:#00000008; border:1px solid #f0f0f0; border-radius:2px; display:-ms-flexbox; display:flex; line-height:26px}.code-snippet__fix .code-snippet__line-index{counter-reset:line;-ms-flex-negative:0; flex-shrink:0; height:100%; padding:1em; list-style-type:none}.code-snippet__fix code{text-align:left; font-size:14px; display:block; white-space:pre; display:-ms-flexbox; display:flex; position:relative; font-family:Consolas,Liberation Mono,Menlo,Courier,monospace}@media(prefers-color-scheme:dark){body:not([data-weui-theme=light]) .code-snippet__fix{color:#fffc}}body,.wx-root,page{--weui-BTN-HEIGHT: 48;--weui-BTN-HEIGHT-MEDIUM: 40;---weui-BTN-HEIGHT-SMALL: 32}body{--weui-elpsLine: 2;--weui-elpsFontSize: 1rem;--weui-elpsColor: rgba(0, 0, 0, .9)}body{--weui-mask-elpsLine: 2;--weui-mask-elpsLineHeight: 1.4;--weui-mask-elpsFontSize: 1rem;--weui-mask-elpsColor: rgba( 0, 0, 0, .9);--weui-mask-gradient: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 40%)}@media(prefers-color-scheme:dark){body:not([data-weui-theme=light]){--weui-elpsColor: rgba(255, 255, .8)}}@media(prefers-color-scheme:dark){body:not([data-weui-theme=light]){--weui-mask-elpsColor: rgba(255, 255, 255, .8);--weui-mask-gradient: linear-gradient(to right, rgba(25, 25, 25, 0), #191919 40%)}}@media screen and (min-width:1024px){body: not(.pages_skin_pc) body,,body:not(.pages_skin_pc) .wx-root{--weui-BG-0: #ededed;--weui-BG-1: #f7f7f7;--weui-BG-2: #fff;--weui-BG-3: #f7f7f7;--weui-BG-4: #4c4c4c;--weui-BG-5: #fff;--weui-FG-0: rgba(0, 0, 0, .9);--weui-FG-HALF: rgba(0, 0, 0, .9);--weui-FG-1: rgba(0, 0, 0, .55);--weui-FG-2: rgba(0, 0, 0, .3);--weui-FG-3: rgba(0, 0, 0, .1);--weui-FG-4: rgba(0, 0, 0, 0, 0, .15);--weui-FG-5: rgba(0, 0, 0, .05);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #fa9d3b;--weui-YELLOW: #ffc300;--weui-GREEN: #91d300;--weui-LIGHTGREEN: #95ec69;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1485ee;--weui-PURPLE: #6467f0;--weui-WHITE: #fff;--weui-LINK: #576b95;--weui-TEXTGREEN: #06ae56;--weui-FG: #000;--weui-BG: #fff;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, .1);-- weui-TAG-TEXT-ORANGE: #fa9d3b;--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .. 1);--weui-TAG-TEXT-GREEN: #06ae56;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: #10aeff;--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(0, 0, 0, .5);--weui-TAG-BACKGROUND-BLACK: rgba(0, 0, 0, .05)}}@media screen and (min-width:1024px){body:not(.pages_skin_pc) .wx-root[data-weui-mode=care],body:not(.pages_skin_pc) body[data-weui-mode=care]{-- weui-BG-0: #ededed;--weui-BG-1: #f7f7f7;--weui-BG-2: #fff;--weui-BG-3: #f7f7f7;--weui-BG-4: #4c4c4c;;--weui-BG-5: #fff;--weui-FG-0: #000;--weui-FG-HALF: #000;--weui-FG-1: rgba(0, 0, 0, .6);--weui-FG-2: rgba(0, 0, 0, .42);--weui-FG-3: rgba(0, 0, 0, .1);--weui-FG-4: rgba(0, 0, 0, .15);--weui-FG-5: rgba(0, 0, 0, .05);--weui-RED: #dc3636;--weui-ORANGERED: #d14730;--weui-ORANGE: #e17719;--weui-YELLOW: #bb8e00;--weui-GREEN: #4f8400;--weui-LIGHTGREEN: #2e8800;--weui-FIRE: #018942;--weui-BLUE: #007dbb;--weui-INDIGO: #0075e2;--weui-PURPLE: #6265f1;--weui-WHITE: #fff;--weui-LINK: #576b95;--weui-TEXTGREEN: #06ae56;--weui-FG: #000;--weui-BG: #fff;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: #e17719;--weui-TAG-BACKGROUND-ORANGE: rgba(225, 119, 25, .1);--weui-TAG-TEXT-GREEN: #06ae56;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: ;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: ;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: ;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-GREEN: ;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-GREEN: ;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: ;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-GREEN: ;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 81, .1);--weui-TAG-TEXT-GREEN: ;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 81, .1);--weui-TAG-TEXT-GREEN: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, .1);--weui-TAG-TEXT-RED: ;--weui-TAG-BACKGROUND-ORANGE: rgba(250, 81, #007dbb;--weui-TAG-BACKGROUND-BLUE: rgba(0, 125, 187, .1);--weui-TAG-TEXT-BLACK: rgba(0, 0, 0, .. 5);--weui-TAG-BACKGROUND-BLACK: rgba(0, 0, 0, .05)}}@media screen and (min-width:1024px){body:not(.pages_skin_pc) .wx-root[data-weui-mode=care][data-weui-theme=dark],body:not(.pages_skin_pc) body[data-weui-mode=care][data-weui-theme=dark]{--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;---weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .85);--weui-FG-HALF: rgba(255, 255, 255, .65);--weui-FG-1: rgba(255, 255, 255, .. 55);--weui-FG-2: rgba(255, 255, 255, .35);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;--weui-LIGHTGREEN: #3eb575;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);;--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .05)}}@media screen and (min-width:1024px){body:not(.pages_skin_pc) .wx-root,body:not(.pages_skin_pc) body{--appmsgExtra-BG: #F7F7F7}}@media screen and (min-width:1024px){body:not(.pages_skin_pc) .wx-root[data-weui-theme=dark],body: not(.pages_skin_pc) body[data-weui-theme=dark]{--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .8);--weui-FG-HALF: rgba(255, 255, 255, .6);--weui-FG-1: rgba(255, 255, 255, .5);--weui-FG-2: rgba(255, 255, 255, .3);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;--weui-LIGHTGREEN: #3eb575;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);-- weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .) 1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .05)}}@media screen and (min-width:1024px){body:not(.pages_skin_pc) .wx-root[data-weui-theme=dark], body:not(.pages_skin_pc) body[data-weui-theme=dark]{--appmsgExtra-BG: #121212}}@media screen and (min-width:1024px){body:not(.pages_skin_pc)body:not(.pages_skin_pc){background:var(--weui-BG-2)}}@media screen and (min-width:1024px) and (prefers-color-scheme:dark){body:not(.pages_skin_pc) .wx-root[data-weui-mode=care]:not([data-weui-theme=light]),body:not(.pages_skin_pc) body[data-weui-mode=care]:not([data-weui-theme=light]){--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .85);--weui-FG-HALF: rgba(255, 255, 255, .65);--weui-FG-1: rgba(255, 255, 255, .55);--weui-FG-2: rgba(255, 255, 255, .35);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;--weui-LIGHTGREEN: #3eb575;;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .. 6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .05)}}@media screen and (min-width:1024px) and (prefers-color-scheme:dark){body:not(.pages_skin_pc) .wx-root:not([data-weui-theme=light]), body:not(.pages_skin_pc) body:not([data-weui-theme=light]){--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .8);--weui-FG-HALF: rgba(255, 255, 255, .6);--weui-FG-1: rgba(255, 255, 255, .5);--weui-FG-2: rgba(255, 255, 255, .3);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;--weui-LIGHTGREEN: #3eb575;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, .1); --weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .) 1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .05)}}@media screen and (min-width:1024px) and (prefers-color-scheme:dark){body: not(.pages_skin_pc) .wx-root:not([data-weui-theme=light]),body:not(.pages_skin_pc) body:not([data-weui-theme=light]){--appmsgExtra-BG: #121212}}@media(prefers-color-scheme:dark){body:not([data-weui-theme=light]).my_comment_empty_data{background-color:#111}}body,.wx-root{--weui-BG-6: rgba(0, 0, 0, .05);--weui-ACTIVE-MASK: rgba(0, 0, 0, .05)}body,.wx-root{--weui-REDORANGE: #ff6146;--weui-BG-0: #ededed;--weui-BG-1: #f7f7f7;--weui-BG-2: #fff;--weui-BG-3: #f7f7f7;--weui-BG-4: #4c4c4c;;--weui-BG-5: #fff;--weui-FG-0: rgba(0, 0, 0, .9);--weui-FG-HALF: rgba(0, 0, 0, .9);--weui-FG-1: rgba(0, 0, 0, .55);--weui-FG-2: rgba(0, 0, 0, .3);--weui-FG-3: rgba(0, 0, 0, .1);--weui-FG-4: rgba(0, 0, 0, .15);--weui-FG-5: rgba(0, 0, 0, .05);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #fa9d3b;--weui-YELLOW: #ffc300;--weui-GREEN: #91d300;--weui-LIGHTGREEN: #95ec69;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;;--weui-INDIGO: #1485ee;--weui-PURPLE: #6467f0;--weui-WHITE: #fff;--weui-LINK: #576b95;--weui-TEXTGREEN: #06ae56;--weui-FG: #000;--weui-BG: #fff;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: #fa9d3b;--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: #06ae56;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: #10aeff;--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .. 1);--weui-TAG-TEXT-BLACK: rgba(0, 0, 0, .5);--weui-TAG-BACKGROUND-BLACK: rgba(0, 0, 0, .05)}body,.wx-root{--weui-BG-0: #ededed;--weui-BG-1: #f7f7f7;--weui-BG-2: #fff;--weui-BG-3: #f7f7f7;--weui-BG-4: #4c4c4c;--weui-BG-5: #fff;--weui-FG-0: rgba(0, 0, 0, .9);--weui-FG-HALF: rgba(0, 0, 0, .9);--weui-FG-1: rgba(0, 0, 0, 0, .3);--weui-FG-3: rgba(0, 0, 0, .1);--weui-FG-4: rgba(0, 0, 0, .15);--weui-FG-5: rgba(0, 0, 0, .5 05);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #fa9d3b;--weui-YELLOW: #ffc300;--weui-GREEN: #91d300;--weui-LIGHTGREEN: #95ec69;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1485ee;--weui-PURPLE: #6467f0;--weui-WHITE: #fff;--weui-LINK: #576b95;--weui-TEXTGREEN: #06ae56;--weui-FG: #000;--weui-BG: #fff;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);-- weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: #fa9d3b;--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: #06ae56;--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: #10aeff;--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(0, 0, 0, .5);--weui-TAG-BACKGROUND-BLACK: rgba(0, 0, 0, .05)}.wx-root,body{--weui-BTN-ACTIVE-MASK: rgba(0, 0, 0, .1)}.wx-root,body{--weui-BTN-DEFAULT-ACTIVE-BG: #e6e6e6}..wx-root,body{--weui-DIALOG-LINE-COLOR: rgba(0, 0, 0, .1)}.wx-root,body{--weui-BG-COLOR-ACTIVE: #ececec}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BTN-ACTIVE-MASK: rgba(255, 255, .1)}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BTN-DEFAULT-ACTIVE-BG: rgba(255, 255, 255, .126)}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-DIALOG-LINE-COLOR: rgba(255, 255, 255, .1)}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--APPMSGCARD-BG: #1E1E1E}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){-APPMSGCARD-LINE-BG: rgba(255, 255, 255, .07)}}@media(prefers-color-scheme:dark){.wx-root:not([ data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BG-COLOR-ACTIVE: #373737}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BG-6: rgba(255, 255, 255, .1);--weui-ACTIVE-MASK: rgba(255, 255, 255, .1)}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-REDORANGE: #ff6146;--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .. 8);--weui-FG-HALF: rgba(255, 255, 255, .6);--weui-FG-1: rgba(255, 255, 255, .5);--weui-FG-2: rgba(255, 255, 255, .3);--weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;--weui-LIGHTGREEN: #3eb575;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .1);--weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .. 1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .05)}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--discussInput-BG: rgba(255, 255, 255, .03)}}@media(prefers-color-scheme:dark){.wx-root: not([data-weui-theme=light]),body:not([data-weui-theme=light]){--nickName-FG: #959595}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){--weui-BG-0: #111;--weui-BG-1: #1e1e1e;--weui-BG-2: #191919;--weui-BG-3: #202020;--weui-BG-4: #404040;--weui-BG-5: #2c2c2c;--weui-FG-0: rgba(255, 255, 255, .8);--weui-FG-HALF: rgba(255, 255, 255, .6);--weui-FG-1: rgba(255, 255, 255, .5);--weui-FG-2: rgba(255, 255, .3);-- weui-FG-3: rgba(255, 255, 255, .1);--weui-FG-4: rgba(255, 255, 255, .15);--weui-FG-5: rgba(255, 255, 255, .1);--weui-RED: #fa5151;--weui-ORANGERED: #ff6146;--weui-ORANGE: #c87d2f;--weui-YELLOW: #cc9c00;--weui-GREEN: #74a800;--weui-LIGHTGREEN: #3eb575;--weui-FIRE: #07c160;--weui-BLUE: #10aeff;--weui-INDIGO: #1196ff;--weui-PURPLE: #8183ff;--weui-WHITE: rgba(255, 255, 255, .8);--weui-LINK: #7d90a9;--weui-TEXTGREEN: #259c5c;--weui-FG: #fff;--weui-BG: #000;--weui-TAG-TEXT-RED: rgba(250, 81, 81, .6);--weui-TAG-BACKGROUND-RED: rgba(250, 81, 81, .. 1);--weui-TAG-TEXT-ORANGE: rgba(250, 157, 59, .6);--weui-TAG-BACKGROUND-ORANGE: rgba(250, 157, 59, .1);--weui-TAG-TEXT-GREEN: rgba(6, 174, 86, .6);--weui-TAG-BACKGROUND-GREEN: rgba(6, 174, 86, .1);--weui-TAG-TEXT-BLUE: rgba(16, 174, 255, .6);--weui-TAG-BACKGROUND-BLUE: rgba(16, 174, 255, .1);--weui-TAG-TEXT-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK: rgba(255, 255, 255, .5);--weui-TAG-BACKGROUND-BLACK 255, 255, .05)}}@media(prefers-color-scheme:dark){.wx-root:not([data-weui-theme=light]),body:not([data-weui-theme=light]){-appmsgExtra-BG: #121212}}.code-snippet__fix .code-snippet__line-index li{list-style-type:none; text-align:right}.code-snippet__fix .code-snippet__line-index li:before{min-width:1.5em; text-align:right; left:-2.5em; counter-increment:line; content:counter(line); display:inline; color:#00000026}@media(prefers-color-scheme:dark){body:not([data-weui-theme=light]) .code-snippet__fix .code-snippet__line-index li:before{color:#ffffff4d}}*{margin:0; padding:0}.rich_media_content *{max-width:100%!important; box-sizing:border-box!important;-webkit-box-sizing:border-box!important; word-wrap:break-word!important}.code-snippet,.code-snippet__fix,.code-snippet *,.code-snippet__fix *{max-width:1e3%!important}.rich_media_content p{clear:both; min-height:1em}td p{margin:0; padding:0}@media(prefers-color-scheme:dark){body:not([data-weui-theme=light]) .rich_media_content img:not(.wx_img_placeholder){{filter:brightness(.8)}}.code-snippet__fix pre{overflow-x:auto; padding:1em 1em 1em 0; white-space:normal;-ms-flex:1; flex:1;-webkit-overflow-scrolling:touch}@media screen and (min-width:1024px){body:not(.pages_skin_pc) :root{--appmsgPageGap: 20px;--appmsgPageBottomGap: 40px}}:root{--articleFontsize: 17px}:root{--sab: env(safe-area-input-bottom)}:root{--wxBorderAvatarRatio: 3}:root{--discussPageGap: 20px}:root{--immersive-safe-bottom: env(safe-area-input-bottom)}:root{--appmsgPageGap: 20px;--appmsgPageBottomGap: 40px}

div.autoTypeSetting24psection > p,div.autoTypeSetting24psection > section{margin-bottom: 24px;}

Read on