Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Alderaan
aodelancheng-github-io
提交
68b4b27a
A
aodelancheng-github-io
项目概览
Alderaan
/
aodelancheng-github-io
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
aodelancheng-github-io
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
68b4b27a
编写于
5月 11, 2020
作者:
Alderaan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Site updated: 2020-05-11 22:56:09
上级
c0151aac
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
6 deletion
+6
-6
2020/05/11/centos7-6-use-meig-4G-module-slm750/index.html
2020/05/11/centos7-6-use-meig-4G-module-slm750/index.html
+1
-1
atom.xml
atom.xml
+3
-3
css/main.css
css/main.css
+1
-1
index.html
index.html
+1
-1
未找到文件。
2020/05/11/centos7-6-use-meig-4G-module-slm750/index.html
浏览文件 @
68b4b27a
<!DOCTYPE html>
<html
lang=
"zh-CN"
><head><meta
charset=
"UTF-8"
><meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,maximum-scale=2"
><meta
name=
"theme-color"
content=
"#222"
><meta
name=
"generator"
content=
"Hexo 4.2.0"
><link
rel=
"apple-touch-icon"
sizes=
"180x180"
href=
"/images/apple-touch-icon-next.png"
><link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"/images/favicon-32x32-next.png"
><link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"/images/favicon-16x16-next.png"
><link
rel=
"mask-icon"
href=
"/images/logo.svg"
color=
"#222"
><link
rel=
"stylesheet"
href=
"/css/main.css"
><link
rel=
"stylesheet"
href=
"/lib/font-awesome/css/all.min.css"
><script
id=
"hexo-configurations"
>
var
NexT
=
window
.
NexT
||
{},
CONFIG
=
{
hostname
:
"
alderaan.xyz
"
,
root
:
"
/
"
,
scheme
:
"
Gemini
"
,
version
:
"
7.8.0
"
,
exturl
:
!
1
,
sidebar
:{
position
:
"
left
"
,
display
:
"
post
"
,
padding
:
18
,
offset
:
12
,
onmobile
:
!
1
},
copycode
:{
enable
:
!
1
,
show_result
:
!
1
,
style
:
null
},
back2top
:{
enable
:
!
0
,
sidebar
:
!
1
,
scrollpercent
:
!
1
},
bookmark
:{
enable
:
!
1
,
color
:
"
#222
"
,
save
:
"
auto
"
},
fancybox
:
!
1
,
mediumzoom
:
!
1
,
lazyload
:
!
1
,
pangu
:
!
1
,
comments
:{
style
:
"
tabs
"
,
active
:
null
,
storage
:
!
0
,
lazyload
:
!
1
,
nav
:
null
},
algolia
:{
hits
:{
per_page
:
10
},
labels
:{
input_placeholder
:
"
Search for Posts
"
,
hits_empty
:
"
We didn't find any results for the search: ${query}
"
,
hits_stats
:
"
${hits} results found in ${time} ms
"
}},
localsearch
:{
enable
:
!
1
,
trigger
:
"
auto
"
,
top_n_per_article
:
1
,
unescape
:
!
1
,
preload
:
!
1
},
motion
:{
enable
:
!
0
,
async
:
!
1
,
transition
:{
post_block
:
"
fadeIn
"
,
post_header
:
"
slideDownIn
"
,
post_body
:
"
slideDownIn
"
,
coll_header
:
"
slideLeftIn
"
,
sidebar
:
"
slideUpIn
"
}}}
</script><meta
name=
"description"
content=
"概述 想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块SLM750,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行"
><meta
property=
"og:type"
content=
"article"
><meta
property=
"og:title"
content=
"Centos 7.6 下使用美格SLM750(4G模块)拨号上网"
><meta
property=
"og:url"
content=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/index.html"
><meta
property=
"og:site_name"
content=
"Alderaan的博客"
><meta
property=
"og:description"
content=
"概述 想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块SLM750,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行"
><meta
property=
"og:locale"
content=
"zh_CN"
><meta
property=
"article:published_time"
content=
"2020-05-11T09:40:13.000Z"
><meta
property=
"article:modified_time"
content=
"2020-05-11T14:5
0:07.861Z"
><meta
property=
"article:author"
content=
"Alderaan"
><meta
property=
"article:tag"
content=
"Centos"
><meta
property=
"article:tag"
content=
"4G moduleC"
><meta
property=
"article:tag"
content=
"SLM750"
><meta
name=
"twitter:card"
content=
"summary"
><link
rel=
"canonical"
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
><script
id=
"page-configurations"
>
CONFIG
.
page
=
{
sidebar
:
""
,
isHome
:
!
1
,
isPost
:
!
0
,
lang
:
"
zh-CN
"
}
</script><title>
Centos 7.6 下使用美格SLM750(4G模块)拨号上网 | Alderaan的博客
</title><noscript><style>
.sidebar-inner
,
.use-motion
.brand
,
.use-motion
.collection-header
,
.use-motion
.comments
,
.use-motion
.menu-item
,
.use-motion
.pagination
,
.use-motion
.post-block
,
.use-motion
.post-body
,
.use-motion
.post-header
{
opacity
:
initial
}
.use-motion
.site-subtitle
,
.use-motion
.site-title
{
opacity
:
initial
;
top
:
initial
}
.use-motion
.logo-line-before
i
{
left
:
initial
}
.use-motion
.logo-line-after
i
{
right
:
initial
}
</style></noscript><link
rel=
"alternate"
href=
"/atom.xml"
title=
"Alderaan的博客"
type=
"application/atom+xml"
></head><body
itemscope
itemtype=
"http://schema.org/WebPage"
><div
class=
"container use-motion"
><div
class=
"headband"
></div><header
class=
"header"
itemscope
itemtype=
"http://schema.org/WPHeader"
><div
class=
"header-inner"
><div
class=
"site-brand-container"
><div
class=
"site-nav-toggle"
><div
class=
"toggle"
aria-label=
"切换导航栏"
><span
class=
"toggle-line toggle-line-first"
></span><span
class=
"toggle-line toggle-line-middle"
></span><span
class=
"toggle-line toggle-line-last"
></span></div></div><div
class=
"site-meta"
><a
href=
"/"
class=
"brand"
rel=
"start"
><span
class=
"logo-line-before"
><i></i></span><h1
class=
"site-title"
>
Alderaan的博客
</h1><span
class=
"logo-line-after"
><i></i></span></a></div><div
class=
"site-nav-right"
><div
class=
"toggle popup-trigger"
></div></div></div><nav
class=
"site-nav"
><ul
id=
"menu"
class=
"main-menu menu"
><li
class=
"menu-item menu-item-home"
><a
href=
"/"
rel=
"section"
><i
class=
"fa fa-home fa-fw"
></i>
首页
</a></li><li
class=
"menu-item menu-item-about"
><a
href=
"/about/"
rel=
"section"
><i
class=
"fa fa-user fa-fw"
></i>
关于
</a></li><li
class=
"menu-item menu-item-tags"
><a
href=
"/tags/"
rel=
"section"
><i
class=
"fa fa-tags fa-fw"
></i>
标签
</a></li><li
class=
"menu-item menu-item-categories"
><a
href=
"/categories/"
rel=
"section"
><i
class=
"fa fa-th fa-fw"
></i>
分类
</a></li><li
class=
"menu-item menu-item-archives"
><a
href=
"/archives/"
rel=
"section"
><i
class=
"fa fa-archive fa-fw"
></i>
归档
</a></li></ul></nav></div></header><div
class=
"back-to-top"
><i
class=
"fa fa-arrow-up"
></i>
<span>
0%
</span></div><main
class=
"main"
><div
class=
"main-inner"
><div
class=
"content-wrap"
><div
class=
"content post posts-expand"
><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h1
class=
"post-title"
itemprop=
"name headline"
>
Centos 7.6 下使用美格SLM750(4G模块)拨号上网
</h1><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-11 17:40:13 / 修改时间:22:50:07"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-11T17:40:13+08:00"
>
2020-05-11
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Centos/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Centos
</span></a></span></span><span
class=
"post-meta-item"
title=
"阅读次数"
id=
"busuanzi_container_page_pv"
style=
"display:none"
><span
class=
"post-meta-item-icon"
><i
class=
"fa fa-eye"
></i></span>
<span
class=
"post-meta-item-text"
>
阅读次数:
</span><span
id=
"busuanzi_value_page_pv"
></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块
<code>
SLM750
</code>
,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行驱动编译安装,并编译拨号软件,最终实现工控机4G上网功能。
</p><a
id=
"more"
></a><h2
id=
"准备"
><a
href=
"#准备"
class=
"headerlink"
title=
"准备"
></a>
准备
</h2><p>
系统为Cento 7.6 64bit,基本环境为Basic Web Server安装(理论上与安装环境模式无关,最小安装也可以)。需要下载内核源码,Centos 7.6的内核版本为
<code>
3.10.0-957
</code>
,源码可在此
<a
href=
"http://vault.centos.org/7.6.1810/updates/Source/SPackages/kernel-3.10.0-957.21.3.el7.src.rpm"
target=
"_blank"
rel=
"noopener"
>
链接
</a>
下载。另外还需要厂家提供的
<code>
GobiNet
</code>
网卡拨号的驱动及拨号工具源码,一张能4G上网的手机卡或物联网卡,接好模块天线。
</p><h2
id=
"编译内核源码"
><a
href=
"#编译内核源码"
class=
"headerlink"
title=
"编译内核源码"
></a>
编译内核源码
</h2><p>
将下载好的源码,解压到看到
<code>
linux-3.10.0-957.21.3.el7.tar.xz
</code>
文件,将其放到
<code>
/usr/src/kernels
</code>
文件夹下,并执行如下命令:
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ tar xvf linux-3.10.0-957.21.3.el7.tar.xz // 解压内核源码文件
</span><br><span
class=
"line"
>
$ mv linux-3.10.0-957.21.3.el7 3.10.0-957.el7.x86_64 // 重命名文件夹
</span><br></pre></td></tr></table></figure><p>
之所以要更改文件夹名称,是因为厂家的
<code>
GobiNet
</code>
驱动源码,
<code>
Makefile
</code>
文件中:
</p><figure
class=
"highlight makefile"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br><span
class=
"line"
>
14
</span><br><span
class=
"line"
>
15
</span><br><span
class=
"line"
>
16
</span><br><span
class=
"line"
>
17
</span><br><span
class=
"line"
>
18
</span><br><span
class=
"line"
>
19
</span><br><span
class=
"line"
>
20
</span><br><span
class=
"line"
>
21
</span><br><span
class=
"line"
>
22
</span><br><span
class=
"line"
>
23
</span><br><span
class=
"line"
>
24
</span><br><span
class=
"line"
>
25
</span><br><span
class=
"line"
>
26
</span><br><span
class=
"line"
>
27
</span><br><span
class=
"line"
>
28
</span><br><span
class=
"line"
>
29
</span><br><span
class=
"line"
>
30
</span><br><span
class=
"line"
>
31
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
obj-m := GobiNet.o
</span><br><span
class=
"line"
>
GobiNet-objs := GobiUSBNet.o QMIDevice.o QMI.o
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
PWD :=
<span
class=
"variable"
>
$(
<span
class=
"built_in"
>
shell
</span>
pwd)
</span></span><br><span
class=
"line"
>
OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/
</span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"comment"
>
#ifeq ($(ARCH),)
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#EARCH := $(shell uname -m)
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#endif
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#ifeq ($(CROSS_COMPILE),)
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#CROSS_COMPILE :=
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#endif
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#ifeq ($(KDIR),)
</span></span><br><span
class=
"line"
>
KDIR := /lib/modules/
<span
class=
"variable"
>
$(
<span
class=
"built_in"
>
shell
</span>
uname -r)
</span>
/build
<span
class=
"comment"
>
# 这里通过uname -r 获取了内核名称
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#endif
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"section"
>
default:
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
# ln -sf makefile Makefile
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
#$(MAKE) ARCH=$
{
ARCH
}
CROSS_COMPILE=$
{
CROSS_COMPILE
}
-C $(KDIR) M=$(PWD) modules
</span></span><br><span
class=
"line"
>
<span
class=
"variable"
>
$(MAKE)
</span>
CROSS_COMPILE=$
{
CROSS_COMPILE
}
-C
<span
class=
"variable"
>
$(KDIR)
</span>
M=
<span
class=
"variable"
>
$(PWD)
</span>
modules
</span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"section"
>
install: default
</span></span><br><span
class=
"line"
>
mkdir -p
<span
class=
"variable"
>
$(OUTPUTDIR)
</span></span><br><span
class=
"line"
>
cp -f GobiNet.ko
<span
class=
"variable"
>
$(OUTPUTDIR)
</span></span><br><span
class=
"line"
>
depmod
</span><br><span
class=
"line"
>
modprobe -r GobiNet
</span><br><span
class=
"line"
>
modprobe GobiNet
</span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"section"
>
clean:
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
# rm -rf Makefile # 这里这段代码去掉,否则执行make clean会把Makefile文件也删除了
</span></span><br><span
class=
"line"
>
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order
</span><br></pre></td></tr></table></figure><p>
如果为其他版本的系统,将文件夹对应修改为
<code>
uname -r
</code>
得到的名称即可。
</p><h3
id=
"添加串口的ID"
><a
href=
"#添加串口的ID"
class=
"headerlink"
title=
"添加串口的ID"
></a>
添加串口的ID
</h3><p>
打开内核源码文件
<code>
/3.10.0-957.el7.x86_64/drivers/usb/serial/option.c
</code>
,在
<code>
/* Vendor and product IDs */
</code>
下增加宏定义:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
><span
class=
"comment"
>
/* Vendor and product IDs */
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_VENDOR_ID 0x05C6
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_PRODUCT_730
0xF601
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_VENDOR_ID_720 0x2dee
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_PRODUCT_720 0x4d07
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_PRODUCT_720_ECM 0x4d02
</span></span><br></pre></td></tr></table></figure><p>
在
<code>
option_ids
</code>
结构体数组增加4G模块的
<code>
VID
</code>
和
<code>
PID
</code>
:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
><span
class=
"keyword"
>
static
</span>
<span
class=
"keyword"
>
const
</span>
<span
class=
"class"
><span
class=
"keyword"
>
struct
</span>
<span
class=
"title"
>
usb_device_id
</span>
<span
class=
"title"
>
option_ids
</span>
[] =
{
</span></span><br><span
class=
"line"
>
{
USB_DEVICE(MEIG_VENDOR_ID,MEIG_PRODUCT_730)
}
,
</span><br><span
class=
"line"
>
{
USB_DEVICE(MEIG_VENDOR_ID_720,MEIG_PRODUCT_720)
}
,
</span><br><span
class=
"line"
>
{
USB_DEVICE(MEIG_VENDOR_ID_720,MEIG_PRODUCT_720_ECM)
}
,
</span><br></pre></td></tr></table></figure><h3
id=
"删除NDIS和ADB端口"
><a
href=
"#删除NDIS和ADB端口"
class=
"headerlink"
title=
"删除NDIS和ADB端口"
></a>
删除NDIS和ADB端口
</h3><p>
使用
<code>
option
</code>
驱动,修改
<code>
/3.10.0-957.el7.x86_64/driver/usb/serial/option.c
</code>
,在
<code>
option_probe
</code>
函数添加如下代码:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br><span
class=
"line"
>
14
</span><br><span
class=
"line"
>
15
</span><br><span
class=
"line"
>
16
</span><br><span
class=
"line"
>
17
</span><br><span
class=
"line"
>
18
</span><br><span
class=
"line"
>
19
</span><br><span
class=
"line"
>
20
</span><br><span
class=
"line"
>
21
</span><br><span
class=
"line"
>
22
</span><br><span
class=
"line"
>
23
</span><br><span
class=
"line"
>
24
</span><br><span
class=
"line"
>
25
</span><br><span
class=
"line"
>
26
</span><br><span
class=
"line"
>
27
</span><br><span
class=
"line"
>
28
</span><br><span
class=
"line"
>
29
</span><br><span
class=
"line"
>
30
</span><br><span
class=
"line"
>
31
</span><br><span
class=
"line"
>
32
</span><br><span
class=
"line"
>
33
</span><br><span
class=
"line"
>
34
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
><span
class=
"function"
><span
class=
"keyword"
>
static
</span>
<span
class=
"keyword"
>
int
</span>
<span
class=
"title"
>
option_probe
</span><span
class=
"params"
>
(struct usb_serial *serial,
</span></span></span><br><span
class=
"line"
><span
class=
"function"
><span
class=
"params"
>
<span
class=
"keyword"
>
const
</span>
struct usb_device_id *id)
</span></span></span><br><span
class=
"line"
><span
class=
"function"
></span>
{
</span><br><span
class=
"line"
>
<span
class=
"class"
><span
class=
"keyword"
>
struct
</span>
<span
class=
"title"
>
usb_interface_descriptor
</span>
*
<span
class=
"title"
>
iface_desc
</span>
=
</span></span><br><span
class=
"line"
><span
class=
"class"
>
&
<span
class=
"title"
>
serial
</span>
-
>
<span
class=
"title"
>
interface
</span>
-
>
<span
class=
"title"
>
cur_altsetting
</span>
-
>
<span
class=
"title"
>
desc
</span>
;
</span></span><br><span
class=
"line"
>
<span
class=
"class"
><span
class=
"keyword"
>
struct
</span>
<span
class=
"title"
>
usb_device_descriptor
</span>
*
<span
class=
"title"
>
dev_desc
</span>
=
&
<span
class=
"title"
>
serial
</span>
-
>
<span
class=
"title"
>
dev
</span>
-
>
<span
class=
"title"
>
descriptor
</span>
;
</span></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
const
</span>
<span
class=
"class"
><span
class=
"keyword"
>
struct
</span>
<span
class=
"title"
>
option_blacklist_info
</span>
*
<span
class=
"title"
>
blacklist
</span>
;
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"comment"
>
/* Never bind to the CD-Rom emulation interface */
</span></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(iface_desc-
>
bInterfaceClass ==
<span
class=
"number"
>
0x08
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"comment"
>
/*
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
* Don't bind reserved interfaces (like network ones) which often have
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
* the same class/subclass/protocol as the serial interfaces. Look at
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
* the Windows driver .INF files for reserved interface numbers.
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
*/
</span></span><br><span
class=
"line"
>
blacklist = (
<span
class=
"keyword"
>
void
</span>
*)id-
>
driver_info;
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(blacklist
&&
test_bit(iface_desc-
>
bInterfaceNumber,
</span><br><span
class=
"line"
>
&
blacklist-
>
reserved))
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// struct usb_wwan_intf_private *data; 文档中的这个语句其实没有
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 开始添加代码
</span></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(serial-
>
dev-
>
descriptor.idVendor == MEIG_VENDOR_ID
&&
</span><br><span
class=
"line"
>
(serial-
>
dev-
>
descriptor.idProduct == MEIG_PRODUCT_730)
&&
</span><br><span
class=
"line"
>
serial-
>
interface-
>
cur_altsetting-
>
desc.bInterfaceNumber
>
=
<span
class=
"number"
>
4
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(serial-
>
dev-
>
descriptor.idVendor == MEIG_VENDOR_ID_720
&&
</span><br><span
class=
"line"
>
(serial-
>
dev-
>
descriptor.idProduct == MEIG_PRODUCT_720)
&&
</span><br><span
class=
"line"
>
serial-
>
interface-
>
cur_altsetting-
>
desc.bInterfaceNumber
>
=
<span
class=
"number"
>
4
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 完成添加代码
</span></span><br></pre></td></tr></table></figure><p>
使用
<code>
usb-serial
</code>
驱动,
<code>
/3.10.0-957.el7.x86_64/driver/usb/serial/usb-serial.c
</code>
,在
<code>
usb_serial_probe
</code>
函数添加如下代码:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br><span
class=
"line"
>
14
</span><br><span
class=
"line"
>
15
</span><br><span
class=
"line"
>
16
</span><br><span
class=
"line"
>
17
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
serial = create_serial (dev, interface, type);
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(!serial)
{
</span><br><span
class=
"line"
>
unlock_kernel();
</span><br><span
class=
"line"
>
dev_err(
&
interface-
>
dev,
<span
class=
"string"
>
"%s - out of memory\n"
</span>
, __FUNCTION__);
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENOMEM;
</span><br><span
class=
"line"
>
}
</span><br><span
class=
"line"
><span
class=
"comment"
>
//开始添加代码 厂家文档写的是宏定义,在该文件中无法找到会报错,这里直接改成了对应值
</span></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
( (serial-
>
dev-
>
descriptor.idVendor ==
<span
class=
"number"
>
0x50C6
</span>
&&
</span><br><span
class=
"line"
>
(serial-
>
dev-
>
descriptor.idProduct ==
<span
class=
"number"
>
0xF601
</span>
) )
&&
</span><br><span
class=
"line"
>
serial-
>
interface-
>
cur_altsetting-
>
desc.bInterfaceNumber
>
=
<span
class=
"number"
>
4
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENOMEM;
</span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"keyword"
>
if
</span>
(serial-
>
dev-
>
descriptor.idVendor ==
<span
class=
"number"
>
0x2dee
</span>
&&
</span><br><span
class=
"line"
>
(serial-
>
dev-
>
descriptor.idProduct ==
<span
class=
"number"
>
0x4d07
</span>
)
&&
</span><br><span
class=
"line"
>
serial-
>
interface-
>
cur_altsetting-
>
desc.bInterfaceNumber
>
=
<span
class=
"number"
>
4
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
><span
class=
"comment"
>
//完成添加代码
</span></span><br></pre></td></tr></table></figure><pre><code>
### 配置编译参数
</code></pre><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$
<span
class=
"built_in"
>
cd
</span>
/usr/src/kernels/3.10.0-957.el7.x86_64
<span
class=
"comment"
>
# 切换到内核源码所在路径
</span></span><br><span
class=
"line"
>
$ cp /boot/config-3.10.0-957.el7.x86_64 ./.config
<span
class=
"comment"
>
# 拷贝当前内核的编译配置
</span></span><br><span
class=
"line"
>
$ make oldconfig
<span
class=
"comment"
>
# 在已有内核基础上进行配置
</span></span><br><span
class=
"line"
>
$ yum install gcc gdb make elfutils-libelf-devel
</span><br></pre></td></tr></table></figure><p>
需要说明的是,Centos 6.7默认就开启了
<code>
device drivers-
>
usb support-
>
usb serial converter support-
>
USB driver for GSM and CDMA modems
</code>
和
<code>
device drivers-
>
Network device support-
>
usb Network Adapters-
>
Multi-purpose USB Networking Framework
</code>
这两个组件,所以拷贝原有内核的编译配置即可使用。
</p><h3
id=
"开始编译"
><a
href=
"#开始编译"
class=
"headerlink"
title=
"开始编译"
></a>
开始编译
</h3><p>
执行如下命令开始编译源码,对应的线程数字按照实际机器进行配置,这个过程会比较慢。
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ make -j 8
</span><br></pre></td></tr></table></figure><p>
如果有其他错误提示,则安装对应的软件包依赖即可,这里编译后不进行安装,因为内核是一样的,编译内核只是为了编译驱动时能找到一些依赖。
</p><h2
id=
"编译NDIS驱动"
><a
href=
"#编译NDIS驱动"
class=
"headerlink"
title=
"编译NDIS驱动"
></a>
编译NDIS驱动
</h2><p>
这里采用的是单独编译的方式,所以上一个步骤没有和内核一块打包编译,主要是为了在不动原来内核的情况下使用,以防上面的其他软件运行受影响。
</p><p>
到驱动目录下,执行如下命令:
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ make
<span
class=
"comment"
>
# 编译驱动
</span></span><br><span
class=
"line"
>
$ make install
<span
class=
"comment"
>
# 安装驱动
</span></span><br></pre></td></tr></table></figure><p>
正常编译安装的话,不会有其他的警告或者错误,驱动成功后,可以看到新的网卡。一般是
<code>
ethX
</code>
这种格式,但还没有IP地址,需要使用拨号软件。
</p><h2
id=
"编译Gobinet拨号工具"
><a
href=
"#编译Gobinet拨号工具"
class=
"headerlink"
title=
"编译Gobinet拨号工具"
></a>
编译Gobinet拨号工具
</h2><p>
在厂家提供的源码中,由于是嵌入式的方案,默认获取IP地址的是
<code>
busybox
</code>
中的
<code>
udhcpc
</code>
命令,在
<code>
udhcpc.c
</code>
文件中,可以注释掉这样代码,以及这行代码上面两行的寻找默认配置文件的语句。本文管理网卡的工具是
<code>
NetworkManager
</code>
,Gobinet拨号后,会自动检测网卡状态,进行获取IP地址操作。其它系统根据实际需要,进行修改。本文做出的修改如下:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br><span
class=
"line"
>
14
</span><br><span
class=
"line"
>
15
</span><br><span
class=
"line"
>
16
</span><br><span
class=
"line"
>
17
</span><br><span
class=
"line"
>
18
</span><br><span
class=
"line"
>
19
</span><br><span
class=
"line"
>
20
</span><br><span
class=
"line"
>
21
</span><br><span
class=
"line"
>
22
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
><span
class=
"keyword"
>
if
</span>
(profile-
>
ipv4.Address)
{
</span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
ifdef
</span>
USE_DHCLIENT
</span></span><br><span
class=
"line"
>
<span
class=
"built_in"
>
snprintf
</span>
(udhcpc_cmd,
<span
class=
"keyword"
>
sizeof
</span>
(udhcpc_cmd),
<span
class=
"string"
>
"dhclient -4 -d --no-pid %s"
</span>
, ifname);
</span><br><span
class=
"line"
>
dhclient_alive++;
</span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
else
</span></span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 注释掉获取默认配置文件
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//if (access("/usr/share/udhcpc/default.script", X_OK))
{
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// dbg_time("Fail to access /usr/share/udhcpc/default.script, errno: %d (%s)", errno, strerror(errno));
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//
}
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-f,--foreground Run in foreground
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-b,--background Background if lease is not obtained
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-n,--now Exit if lease is not obtained
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-q,--quit Exit after obtaining lease
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-t,--retries N Send up to N discover packets (default 3)
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 注释定义的获取IP命令
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "busybox udhcpc -f -n -q -t 5 -i %s", ifname);
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
endif
</span></span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 注释掉命令线程
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//pthread_create(
&
udhcpc_thread_id,
&
udhcpc_thread_attr, udhcpc_thread_function, (void*)strdup(udhcpc_cmd));
</span></span><br><span
class=
"line"
>
sleep(
<span
class=
"number"
>
1
</span>
);
</span><br><span
class=
"line"
>
}
</span><br></pre></td></tr></table></figure><p>
执行如下命令编译拨号工具
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ make
<span
class=
"comment"
>
# 编译
</span></span><br><span
class=
"line"
>
$ ./MeiG-CM
&
<span
class=
"comment"
>
# 后台执行拨号工具
</span></span><br></pre></td></tr></table></figure><p>
如果拨号成功,可以看到对应的网卡会获取到IP地址,并可以正常上网。
</p><h2
id=
"服务化拨号工具"
><a
href=
"#服务化拨号工具"
class=
"headerlink"
title=
"服务化拨号工具"
></a>
服务化拨号工具
</h2><p>
可以使用
<code>
systemctl
</code>
管理拨号工具,新建一个文件
<code>
MeiG-CM.service
</code>
,并写入如下内容:
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
[Unit]
</span><br><span
class=
"line"
>
Description=quectel-CM Service
</span><br><span
class=
"line"
>
After=network.target
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
[Service]
</span><br><span
class=
"line"
>
Type=simple
</span><br><span
class=
"line"
>
User=root
</span><br><span
class=
"line"
>
Restart=always
</span><br><span
class=
"line"
>
RestartSec=5s
</span><br><span
class=
"line"
>
ExecStart=/home/MeiG-CM/MeiG-CM
<span
class=
"comment"
>
# 这里更改为对应的可执行文件所在路径
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
>
[Install]
</span><br><span
class=
"line"
>
WantedBy=multi-user.target
</span><br></pre></td></tr></table></figure><p>
执行以下命令可配置服务并设置开机自启动:
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ cp MeiG-CM.service /usr/lib/systemd/system/
<span
class=
"comment"
>
# 拷贝服务文件到系统目录
</span></span><br><span
class=
"line"
>
$ systemctl daemon-reload
<span
class=
"comment"
>
# 重新检测加载服务,使其被系统识别到
</span></span><br><span
class=
"line"
>
$ systemctl start MeiG-CM.service
<span
class=
"comment"
>
# 手动启动服务
</span></span><br><span
class=
"line"
>
$ systemctl
<span
class=
"built_in"
>
enable
</span>
MeiG-CM.service
<span
class=
"comment"
>
# 配置开机自启动
</span></span><br></pre></td></tr></table></figure><p>
至此,在Centos 7.6上就可以自动配置MeiG SLM50 4G模块上网。如果卡被停用后·再启用,也不需要重新启动机器,会自动重新拨号。
</p></div><div><ul
class=
"post-copyright"
><li
class=
"post-copyright-author"
>
<strong>
本文作者:
</strong>
Alderaan
</li><li
class=
"post-copyright-link"
>
<strong>
本文链接:
</strong>
<a
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
title=
"Centos 7.6 下使用美格SLM750(4G模块)拨号上网"
>
https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/
</a></li><li
class=
"post-copyright-license"
>
<strong>
版权声明:
</strong>
本博客所有文章除特别声明外,均采用
<a
href=
"https://creativecommons.org/licenses/by-nc-sa/4.0/"
rel=
"noopener"
target=
"_blank"
><i
class=
"fab fa-fw fa-creative-commons"
></i>
BY-NC-SA
</a>
许可协议。转载请注明出处!
</li></ul></div><footer
class=
"post-footer"
><div
class=
"post-tags"
><a
href=
"/tags/Centos/"
rel=
"tag"
><i
class=
"fa fa-tag"
></i>
Centos
</a><a
href=
"/tags/4G-moduleC/"
rel=
"tag"
><i
class=
"fa fa-tag"
></i>
4G moduleC
</a><a
href=
"/tags/SLM750/"
rel=
"tag"
><i
class=
"fa fa-tag"
></i>
SLM750
</a></div><div
class=
"post-nav"
><div
class=
"post-nav-item"
><a
href=
"/2020/05/10/mw150us-2-0-mac-driver/"
rel=
"prev"
title=
"水星USB无线网卡mw150us苹果macOS系统驱动成功"
><i
class=
"fa fa-chevron-left"
></i>
水星USB无线网卡mw150us苹果macOS系统驱动成功
</a></div><div
class=
"post-nav-item"
></div></div></footer></article></div><script>
<!DOCTYPE html>
<html
lang=
"zh-CN"
><head><meta
charset=
"UTF-8"
><meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,maximum-scale=2"
><meta
name=
"theme-color"
content=
"#222"
><meta
name=
"generator"
content=
"Hexo 4.2.0"
><link
rel=
"apple-touch-icon"
sizes=
"180x180"
href=
"/images/apple-touch-icon-next.png"
><link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"/images/favicon-32x32-next.png"
><link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"/images/favicon-16x16-next.png"
><link
rel=
"mask-icon"
href=
"/images/logo.svg"
color=
"#222"
><link
rel=
"stylesheet"
href=
"/css/main.css"
><link
rel=
"stylesheet"
href=
"/lib/font-awesome/css/all.min.css"
><script
id=
"hexo-configurations"
>
var
NexT
=
window
.
NexT
||
{},
CONFIG
=
{
hostname
:
"
alderaan.xyz
"
,
root
:
"
/
"
,
scheme
:
"
Gemini
"
,
version
:
"
7.8.0
"
,
exturl
:
!
1
,
sidebar
:{
position
:
"
left
"
,
display
:
"
post
"
,
padding
:
18
,
offset
:
12
,
onmobile
:
!
1
},
copycode
:{
enable
:
!
1
,
show_result
:
!
1
,
style
:
null
},
back2top
:{
enable
:
!
0
,
sidebar
:
!
1
,
scrollpercent
:
!
1
},
bookmark
:{
enable
:
!
1
,
color
:
"
#222
"
,
save
:
"
auto
"
},
fancybox
:
!
1
,
mediumzoom
:
!
1
,
lazyload
:
!
1
,
pangu
:
!
1
,
comments
:{
style
:
"
tabs
"
,
active
:
null
,
storage
:
!
0
,
lazyload
:
!
1
,
nav
:
null
},
algolia
:{
hits
:{
per_page
:
10
},
labels
:{
input_placeholder
:
"
Search for Posts
"
,
hits_empty
:
"
We didn't find any results for the search: ${query}
"
,
hits_stats
:
"
${hits} results found in ${time} ms
"
}},
localsearch
:{
enable
:
!
1
,
trigger
:
"
auto
"
,
top_n_per_article
:
1
,
unescape
:
!
1
,
preload
:
!
1
},
motion
:{
enable
:
!
0
,
async
:
!
1
,
transition
:{
post_block
:
"
fadeIn
"
,
post_header
:
"
slideDownIn
"
,
post_body
:
"
slideDownIn
"
,
coll_header
:
"
slideLeftIn
"
,
sidebar
:
"
slideUpIn
"
}}}
</script><meta
name=
"description"
content=
"概述 想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块SLM750,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行"
><meta
property=
"og:type"
content=
"article"
><meta
property=
"og:title"
content=
"Centos 7.6 下使用美格SLM750(4G模块)拨号上网"
><meta
property=
"og:url"
content=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/index.html"
><meta
property=
"og:site_name"
content=
"Alderaan的博客"
><meta
property=
"og:description"
content=
"概述 想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块SLM750,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行"
><meta
property=
"og:locale"
content=
"zh_CN"
><meta
property=
"article:published_time"
content=
"2020-05-11T09:40:13.000Z"
><meta
property=
"article:modified_time"
content=
"2020-05-11T14:5
5:44.524Z"
><meta
property=
"article:author"
content=
"Alderaan"
><meta
property=
"article:tag"
content=
"Centos"
><meta
property=
"article:tag"
content=
"4G moduleC"
><meta
property=
"article:tag"
content=
"SLM750"
><meta
name=
"twitter:card"
content=
"summary"
><link
rel=
"canonical"
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
><script
id=
"page-configurations"
>
CONFIG
.
page
=
{
sidebar
:
""
,
isHome
:
!
1
,
isPost
:
!
0
,
lang
:
"
zh-CN
"
}
</script><title>
Centos 7.6 下使用美格SLM750(4G模块)拨号上网 | Alderaan的博客
</title><noscript><style>
.sidebar-inner
,
.use-motion
.brand
,
.use-motion
.collection-header
,
.use-motion
.comments
,
.use-motion
.menu-item
,
.use-motion
.pagination
,
.use-motion
.post-block
,
.use-motion
.post-body
,
.use-motion
.post-header
{
opacity
:
initial
}
.use-motion
.site-subtitle
,
.use-motion
.site-title
{
opacity
:
initial
;
top
:
initial
}
.use-motion
.logo-line-before
i
{
left
:
initial
}
.use-motion
.logo-line-after
i
{
right
:
initial
}
</style></noscript><link
rel=
"alternate"
href=
"/atom.xml"
title=
"Alderaan的博客"
type=
"application/atom+xml"
></head><body
itemscope
itemtype=
"http://schema.org/WebPage"
><div
class=
"container use-motion"
><div
class=
"headband"
></div><header
class=
"header"
itemscope
itemtype=
"http://schema.org/WPHeader"
><div
class=
"header-inner"
><div
class=
"site-brand-container"
><div
class=
"site-nav-toggle"
><div
class=
"toggle"
aria-label=
"切换导航栏"
><span
class=
"toggle-line toggle-line-first"
></span><span
class=
"toggle-line toggle-line-middle"
></span><span
class=
"toggle-line toggle-line-last"
></span></div></div><div
class=
"site-meta"
><a
href=
"/"
class=
"brand"
rel=
"start"
><span
class=
"logo-line-before"
><i></i></span><h1
class=
"site-title"
>
Alderaan的博客
</h1><span
class=
"logo-line-after"
><i></i></span></a></div><div
class=
"site-nav-right"
><div
class=
"toggle popup-trigger"
></div></div></div><nav
class=
"site-nav"
><ul
id=
"menu"
class=
"main-menu menu"
><li
class=
"menu-item menu-item-home"
><a
href=
"/"
rel=
"section"
><i
class=
"fa fa-home fa-fw"
></i>
首页
</a></li><li
class=
"menu-item menu-item-about"
><a
href=
"/about/"
rel=
"section"
><i
class=
"fa fa-user fa-fw"
></i>
关于
</a></li><li
class=
"menu-item menu-item-tags"
><a
href=
"/tags/"
rel=
"section"
><i
class=
"fa fa-tags fa-fw"
></i>
标签
</a></li><li
class=
"menu-item menu-item-categories"
><a
href=
"/categories/"
rel=
"section"
><i
class=
"fa fa-th fa-fw"
></i>
分类
</a></li><li
class=
"menu-item menu-item-archives"
><a
href=
"/archives/"
rel=
"section"
><i
class=
"fa fa-archive fa-fw"
></i>
归档
</a></li></ul></nav></div></header><div
class=
"back-to-top"
><i
class=
"fa fa-arrow-up"
></i>
<span>
0%
</span></div><main
class=
"main"
><div
class=
"main-inner"
><div
class=
"content-wrap"
><div
class=
"content post posts-expand"
><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h1
class=
"post-title"
itemprop=
"name headline"
>
Centos 7.6 下使用美格SLM750(4G模块)拨号上网
</h1><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-11 17:40:13 / 修改时间:22:55:44"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-11T17:40:13+08:00"
>
2020-05-11
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Centos/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Centos
</span></a></span></span><span
class=
"post-meta-item"
title=
"阅读次数"
id=
"busuanzi_container_page_pv"
style=
"display:none"
><span
class=
"post-meta-item-icon"
><i
class=
"fa fa-eye"
></i></span>
<span
class=
"post-meta-item-text"
>
阅读次数:
</span><span
id=
"busuanzi_value_page_pv"
></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块
<code>
SLM750
</code>
,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行驱动编译安装,并编译拨号软件,最终实现工控机4G上网功能。
</p><a
id=
"more"
></a><h2
id=
"准备"
><a
href=
"#准备"
class=
"headerlink"
title=
"准备"
></a>
准备
</h2><p>
系统为Cento 7.6 64bit,基本环境为Basic Web Server安装(理论上与安装环境模式无关,最小安装也可以)。需要下载内核源码,Centos 7.6的内核版本为
<code>
3.10.0-957
</code>
,源码可在此
<a
href=
"http://vault.centos.org/7.6.1810/updates/Source/SPackages/kernel-3.10.0-957.21.3.el7.src.rpm"
target=
"_blank"
rel=
"noopener"
>
链接
</a>
下载。另外还需要厂家提供的
<code>
GobiNet
</code>
网卡拨号的驱动及拨号工具源码,一张能4G上网的手机卡或物联网卡,接好模块天线。
</p><h2
id=
"编译内核源码"
><a
href=
"#编译内核源码"
class=
"headerlink"
title=
"编译内核源码"
></a>
编译内核源码
</h2><p>
将下载好的源码,解压到看到
<code>
linux-3.10.0-957.21.3.el7.tar.xz
</code>
文件,将其放到
<code>
/usr/src/kernels
</code>
文件夹下,并执行如下命令:
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ tar xvf linux-3.10.0-957.21.3.el7.tar.xz // 解压内核源码文件
</span><br><span
class=
"line"
>
$ mv linux-3.10.0-957.21.3.el7 3.10.0-957.el7.x86_64 // 重命名文件夹
</span><br></pre></td></tr></table></figure><p>
之所以要更改文件夹名称,是因为厂家的
<code>
GobiNet
</code>
驱动源码,
<code>
Makefile
</code>
文件中:
</p><figure
class=
"highlight makefile"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br><span
class=
"line"
>
14
</span><br><span
class=
"line"
>
15
</span><br><span
class=
"line"
>
16
</span><br><span
class=
"line"
>
17
</span><br><span
class=
"line"
>
18
</span><br><span
class=
"line"
>
19
</span><br><span
class=
"line"
>
20
</span><br><span
class=
"line"
>
21
</span><br><span
class=
"line"
>
22
</span><br><span
class=
"line"
>
23
</span><br><span
class=
"line"
>
24
</span><br><span
class=
"line"
>
25
</span><br><span
class=
"line"
>
26
</span><br><span
class=
"line"
>
27
</span><br><span
class=
"line"
>
28
</span><br><span
class=
"line"
>
29
</span><br><span
class=
"line"
>
30
</span><br><span
class=
"line"
>
31
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
obj-m := GobiNet.o
</span><br><span
class=
"line"
>
GobiNet-objs := GobiUSBNet.o QMIDevice.o QMI.o
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
PWD :=
<span
class=
"variable"
>
$(
<span
class=
"built_in"
>
shell
</span>
pwd)
</span></span><br><span
class=
"line"
>
OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/
</span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"comment"
>
#ifeq ($(ARCH),)
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#EARCH := $(shell uname -m)
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#endif
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#ifeq ($(CROSS_COMPILE),)
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#CROSS_COMPILE :=
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#endif
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#ifeq ($(KDIR),)
</span></span><br><span
class=
"line"
>
KDIR := /lib/modules/
<span
class=
"variable"
>
$(
<span
class=
"built_in"
>
shell
</span>
uname -r)
</span>
/build
<span
class=
"comment"
>
# 这里通过uname -r 获取了内核名称
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
#endif
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"section"
>
default:
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
# ln -sf makefile Makefile
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
#$(MAKE) ARCH=$
{
ARCH
}
CROSS_COMPILE=$
{
CROSS_COMPILE
}
-C $(KDIR) M=$(PWD) modules
</span></span><br><span
class=
"line"
>
<span
class=
"variable"
>
$(MAKE)
</span>
CROSS_COMPILE=$
{
CROSS_COMPILE
}
-C
<span
class=
"variable"
>
$(KDIR)
</span>
M=
<span
class=
"variable"
>
$(PWD)
</span>
modules
</span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"section"
>
install: default
</span></span><br><span
class=
"line"
>
mkdir -p
<span
class=
"variable"
>
$(OUTPUTDIR)
</span></span><br><span
class=
"line"
>
cp -f GobiNet.ko
<span
class=
"variable"
>
$(OUTPUTDIR)
</span></span><br><span
class=
"line"
>
depmod
</span><br><span
class=
"line"
>
modprobe -r GobiNet
</span><br><span
class=
"line"
>
modprobe GobiNet
</span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"section"
>
clean:
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
# rm -rf Makefile # 这里这段代码去掉,否则执行make clean会把Makefile文件也删除了
</span></span><br><span
class=
"line"
>
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order
</span><br></pre></td></tr></table></figure><p>
如果为其他版本的系统,将文件夹对应修改为
<code>
uname -r
</code>
得到的名称即可。
</p><h3
id=
"添加串口的ID"
><a
href=
"#添加串口的ID"
class=
"headerlink"
title=
"添加串口的ID"
></a>
添加串口的ID
</h3><p>
打开内核源码文件
<code>
/3.10.0-957.el7.x86_64/drivers/usb/serial/option.c
</code>
,在
<code>
/* Vendor and product IDs */
</code>
下增加宏定义:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
><span
class=
"comment"
>
/* Vendor and product IDs */
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_VENDOR_ID 0x05C6
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_PRODUCT_730
0xF601
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_VENDOR_ID_720 0x2dee
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_PRODUCT_720 0x4d07
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
define
</span>
MEIG_PRODUCT_720_ECM 0x4d02
</span></span><br></pre></td></tr></table></figure><p>
在
<code>
option_ids
</code>
结构体数组增加4G模块的
<code>
VID
</code>
和
<code>
PID
</code>
:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
><span
class=
"keyword"
>
static
</span>
<span
class=
"keyword"
>
const
</span>
<span
class=
"class"
><span
class=
"keyword"
>
struct
</span>
<span
class=
"title"
>
usb_device_id
</span>
<span
class=
"title"
>
option_ids
</span>
[] =
{
</span></span><br><span
class=
"line"
>
{
USB_DEVICE(MEIG_VENDOR_ID,MEIG_PRODUCT_730)
}
,
</span><br><span
class=
"line"
>
{
USB_DEVICE(MEIG_VENDOR_ID_720,MEIG_PRODUCT_720)
}
,
</span><br><span
class=
"line"
>
{
USB_DEVICE(MEIG_VENDOR_ID_720,MEIG_PRODUCT_720_ECM)
}
,
</span><br></pre></td></tr></table></figure><h3
id=
"删除NDIS和ADB端口"
><a
href=
"#删除NDIS和ADB端口"
class=
"headerlink"
title=
"删除NDIS和ADB端口"
></a>
删除NDIS和ADB端口
</h3><p>
使用
<code>
option
</code>
驱动,修改
<code>
/3.10.0-957.el7.x86_64/driver/usb/serial/option.c
</code>
,在
<code>
option_probe
</code>
函数添加如下代码:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br><span
class=
"line"
>
14
</span><br><span
class=
"line"
>
15
</span><br><span
class=
"line"
>
16
</span><br><span
class=
"line"
>
17
</span><br><span
class=
"line"
>
18
</span><br><span
class=
"line"
>
19
</span><br><span
class=
"line"
>
20
</span><br><span
class=
"line"
>
21
</span><br><span
class=
"line"
>
22
</span><br><span
class=
"line"
>
23
</span><br><span
class=
"line"
>
24
</span><br><span
class=
"line"
>
25
</span><br><span
class=
"line"
>
26
</span><br><span
class=
"line"
>
27
</span><br><span
class=
"line"
>
28
</span><br><span
class=
"line"
>
29
</span><br><span
class=
"line"
>
30
</span><br><span
class=
"line"
>
31
</span><br><span
class=
"line"
>
32
</span><br><span
class=
"line"
>
33
</span><br><span
class=
"line"
>
34
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
><span
class=
"function"
><span
class=
"keyword"
>
static
</span>
<span
class=
"keyword"
>
int
</span>
<span
class=
"title"
>
option_probe
</span><span
class=
"params"
>
(struct usb_serial *serial,
</span></span></span><br><span
class=
"line"
><span
class=
"function"
><span
class=
"params"
>
<span
class=
"keyword"
>
const
</span>
struct usb_device_id *id)
</span></span></span><br><span
class=
"line"
><span
class=
"function"
></span>
{
</span><br><span
class=
"line"
>
<span
class=
"class"
><span
class=
"keyword"
>
struct
</span>
<span
class=
"title"
>
usb_interface_descriptor
</span>
*
<span
class=
"title"
>
iface_desc
</span>
=
</span></span><br><span
class=
"line"
><span
class=
"class"
>
&
<span
class=
"title"
>
serial
</span>
-
>
<span
class=
"title"
>
interface
</span>
-
>
<span
class=
"title"
>
cur_altsetting
</span>
-
>
<span
class=
"title"
>
desc
</span>
;
</span></span><br><span
class=
"line"
>
<span
class=
"class"
><span
class=
"keyword"
>
struct
</span>
<span
class=
"title"
>
usb_device_descriptor
</span>
*
<span
class=
"title"
>
dev_desc
</span>
=
&
<span
class=
"title"
>
serial
</span>
-
>
<span
class=
"title"
>
dev
</span>
-
>
<span
class=
"title"
>
descriptor
</span>
;
</span></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
const
</span>
<span
class=
"class"
><span
class=
"keyword"
>
struct
</span>
<span
class=
"title"
>
option_blacklist_info
</span>
*
<span
class=
"title"
>
blacklist
</span>
;
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"comment"
>
/* Never bind to the CD-Rom emulation interface */
</span></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(iface_desc-
>
bInterfaceClass ==
<span
class=
"number"
>
0x08
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"comment"
>
/*
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
* Don't bind reserved interfaces (like network ones) which often have
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
* the same class/subclass/protocol as the serial interfaces. Look at
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
* the Windows driver .INF files for reserved interface numbers.
</span></span><br><span
class=
"line"
><span
class=
"comment"
>
*/
</span></span><br><span
class=
"line"
>
blacklist = (
<span
class=
"keyword"
>
void
</span>
*)id-
>
driver_info;
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(blacklist
&&
test_bit(iface_desc-
>
bInterfaceNumber,
</span><br><span
class=
"line"
>
&
blacklist-
>
reserved))
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// struct usb_wwan_intf_private *data; 文档中的这个语句其实没有
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 开始添加代码
</span></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(serial-
>
dev-
>
descriptor.idVendor == MEIG_VENDOR_ID
&&
</span><br><span
class=
"line"
>
(serial-
>
dev-
>
descriptor.idProduct == MEIG_PRODUCT_730)
&&
</span><br><span
class=
"line"
>
serial-
>
interface-
>
cur_altsetting-
>
desc.bInterfaceNumber
>
=
<span
class=
"number"
>
4
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(serial-
>
dev-
>
descriptor.idVendor == MEIG_VENDOR_ID_720
&&
</span><br><span
class=
"line"
>
(serial-
>
dev-
>
descriptor.idProduct == MEIG_PRODUCT_720)
&&
</span><br><span
class=
"line"
>
serial-
>
interface-
>
cur_altsetting-
>
desc.bInterfaceNumber
>
=
<span
class=
"number"
>
4
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 完成添加代码
</span></span><br></pre></td></tr></table></figure><p>
使用
<code>
usb-serial
</code>
驱动,
<code>
/3.10.0-957.el7.x86_64/driver/usb/serial/usb-serial.c
</code>
,在
<code>
usb_serial_probe
</code>
函数添加如下代码:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br><span
class=
"line"
>
14
</span><br><span
class=
"line"
>
15
</span><br><span
class=
"line"
>
16
</span><br><span
class=
"line"
>
17
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
serial = create_serial (dev, interface, type);
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
(!serial)
{
</span><br><span
class=
"line"
>
unlock_kernel();
</span><br><span
class=
"line"
>
dev_err(
&
interface-
>
dev,
<span
class=
"string"
>
"%s - out of memory\n"
</span>
, __FUNCTION__);
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENOMEM;
</span><br><span
class=
"line"
>
}
</span><br><span
class=
"line"
><span
class=
"comment"
>
//开始添加代码 厂家文档写的是宏定义,在该文件中无法找到会报错,这里直接改成了对应值
</span></span><br><span
class=
"line"
>
<span
class=
"keyword"
>
if
</span>
( (serial-
>
dev-
>
descriptor.idVendor ==
<span
class=
"number"
>
0x50C6
</span>
&&
</span><br><span
class=
"line"
>
(serial-
>
dev-
>
descriptor.idProduct ==
<span
class=
"number"
>
0xF601
</span>
) )
&&
</span><br><span
class=
"line"
>
serial-
>
interface-
>
cur_altsetting-
>
desc.bInterfaceNumber
>
=
<span
class=
"number"
>
4
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENOMEM;
</span><br><span
class=
"line"
></span><br><span
class=
"line"
><span
class=
"keyword"
>
if
</span>
(serial-
>
dev-
>
descriptor.idVendor ==
<span
class=
"number"
>
0x2dee
</span>
&&
</span><br><span
class=
"line"
>
(serial-
>
dev-
>
descriptor.idProduct ==
<span
class=
"number"
>
0x4d07
</span>
)
&&
</span><br><span
class=
"line"
>
serial-
>
interface-
>
cur_altsetting-
>
desc.bInterfaceNumber
>
=
<span
class=
"number"
>
4
</span>
)
</span><br><span
class=
"line"
>
<span
class=
"keyword"
>
return
</span>
-ENODEV;
</span><br><span
class=
"line"
><span
class=
"comment"
>
//完成添加代码
</span></span><br></pre></td></tr></table></figure><pre><code>
### 配置编译参数
</code></pre><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$
<span
class=
"built_in"
>
cd
</span>
/usr/src/kernels/3.10.0-957.el7.x86_64
<span
class=
"comment"
>
# 切换到内核源码所在路径
</span></span><br><span
class=
"line"
>
$ cp /boot/config-3.10.0-957.el7.x86_64 ./.config
<span
class=
"comment"
>
# 拷贝当前内核的编译配置
</span></span><br><span
class=
"line"
>
$ make oldconfig
<span
class=
"comment"
>
# 在已有内核基础上进行配置
</span></span><br><span
class=
"line"
>
$ yum install gcc gdb make elfutils-libelf-devel
</span><br></pre></td></tr></table></figure><p>
需要说明的是,Centos 6.7默认就开启了
<code>
device drivers-
>
usb support-
>
usb serial converter support-
>
USB driver for GSM and CDMA modems
</code>
和
<code>
device drivers-
>
Network device support-
>
usb Network Adapters-
>
Multi-purpose USB Networking Framework
</code>
这两个组件,所以拷贝原有内核的编译配置即可使用。
</p><h3
id=
"开始编译"
><a
href=
"#开始编译"
class=
"headerlink"
title=
"开始编译"
></a>
开始编译
</h3><p>
执行如下命令开始编译源码,对应的线程数字按照实际机器进行配置,这个过程会比较慢。
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ make -j 8
</span><br></pre></td></tr></table></figure><p>
如果有其他错误提示,则安装对应的软件包依赖即可,这里编译后不进行安装,因为内核是一样的,编译内核只是为了编译驱动时能找到一些依赖。
</p><h2
id=
"编译NDIS驱动"
><a
href=
"#编译NDIS驱动"
class=
"headerlink"
title=
"编译NDIS驱动"
></a>
编译NDIS驱动
</h2><p>
这里采用的是单独编译的方式,所以上一个步骤没有和内核一块打包编译,主要是为了在不动原来内核的情况下使用,以防上面的其他软件运行受影响。
</p><p>
到驱动目录下,执行如下命令:
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ make
<span
class=
"comment"
>
# 编译驱动
</span></span><br><span
class=
"line"
>
$ make install
<span
class=
"comment"
>
# 安装驱动
</span></span><br></pre></td></tr></table></figure><p>
正常编译安装的话,不会有其他的警告或者错误,驱动成功后,可以看到新的网卡。一般是
<code>
ethX
</code>
这种格式,但还没有IP地址,需要使用拨号软件。
</p><h2
id=
"编译Gobinet拨号工具"
><a
href=
"#编译Gobinet拨号工具"
class=
"headerlink"
title=
"编译Gobinet拨号工具"
></a>
编译Gobinet拨号工具
</h2><p>
在厂家提供的源码中,由于是嵌入式的方案,默认获取IP地址的是
<code>
busybox
</code>
中的
<code>
udhcpc
</code>
命令,在
<code>
udhcpc.c
</code>
文件中,可以注释掉这样代码,以及这行代码上面两行的寻找默认配置文件的语句。本文管理网卡的工具是
<code>
NetworkManager
</code>
,Gobinet拨号后,会自动检测网卡状态,进行获取IP地址操作。其它系统根据实际需要,进行修改。本文做出的修改如下:
</p><figure
class=
"highlight c"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br><span
class=
"line"
>
14
</span><br><span
class=
"line"
>
15
</span><br><span
class=
"line"
>
16
</span><br><span
class=
"line"
>
17
</span><br><span
class=
"line"
>
18
</span><br><span
class=
"line"
>
19
</span><br><span
class=
"line"
>
20
</span><br><span
class=
"line"
>
21
</span><br><span
class=
"line"
>
22
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
><span
class=
"keyword"
>
if
</span>
(profile-
>
ipv4.Address)
{
</span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
ifdef
</span>
USE_DHCLIENT
</span></span><br><span
class=
"line"
>
<span
class=
"built_in"
>
snprintf
</span>
(udhcpc_cmd,
<span
class=
"keyword"
>
sizeof
</span>
(udhcpc_cmd),
<span
class=
"string"
>
"dhclient -4 -d --no-pid %s"
</span>
, ifname);
</span><br><span
class=
"line"
>
dhclient_alive++;
</span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
else
</span></span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 注释掉获取默认配置文件
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//if (access("/usr/share/udhcpc/default.script", X_OK))
{
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// dbg_time("Fail to access /usr/share/udhcpc/default.script, errno: %d (%s)", errno, strerror(errno));
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//
}
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-f,--foreground Run in foreground
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-b,--background Background if lease is not obtained
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-n,--now Exit if lease is not obtained
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-q,--quit Exit after obtaining lease
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//-t,--retries N Send up to N discover packets (default 3)
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 注释定义的获取IP命令
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "busybox udhcpc -f -n -q -t 5 -i %s", ifname);
</span></span><br><span
class=
"line"
><span
class=
"meta"
>
#
<span
class=
"meta-keyword"
>
endif
</span></span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
// 注释掉命令线程
</span></span><br><span
class=
"line"
>
<span
class=
"comment"
>
//pthread_create(
&
udhcpc_thread_id,
&
udhcpc_thread_attr, udhcpc_thread_function, (void*)strdup(udhcpc_cmd));
</span></span><br><span
class=
"line"
>
sleep(
<span
class=
"number"
>
1
</span>
);
</span><br><span
class=
"line"
>
}
</span><br></pre></td></tr></table></figure><p>
执行如下命令编译拨号工具
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ make
<span
class=
"comment"
>
# 编译
</span></span><br><span
class=
"line"
>
$ ./MeiG-CM
&
<span
class=
"comment"
>
# 后台执行拨号工具
</span></span><br></pre></td></tr></table></figure><p>
如果拨号成功,可以看到对应的网卡会获取到IP地址,并可以正常上网。
</p><h2
id=
"服务化拨号工具"
><a
href=
"#服务化拨号工具"
class=
"headerlink"
title=
"服务化拨号工具"
></a>
服务化拨号工具
</h2><p>
可以使用
<code>
systemctl
</code>
管理拨号工具,新建一个文件
<code>
MeiG-CM.service
</code>
,并写入如下内容:
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br><span
class=
"line"
>
6
</span><br><span
class=
"line"
>
7
</span><br><span
class=
"line"
>
8
</span><br><span
class=
"line"
>
9
</span><br><span
class=
"line"
>
10
</span><br><span
class=
"line"
>
11
</span><br><span
class=
"line"
>
12
</span><br><span
class=
"line"
>
13
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
[Unit]
</span><br><span
class=
"line"
>
Description=quectel-CM Service
</span><br><span
class=
"line"
>
After=network.target
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
[Service]
</span><br><span
class=
"line"
>
Type=simple
</span><br><span
class=
"line"
>
User=root
</span><br><span
class=
"line"
>
Restart=always
</span><br><span
class=
"line"
>
RestartSec=5s
</span><br><span
class=
"line"
>
ExecStart=/home/MeiG-CM/MeiG-CM
<span
class=
"comment"
>
# 这里更改为对应的可执行文件所在路径
</span></span><br><span
class=
"line"
></span><br><span
class=
"line"
>
[Install]
</span><br><span
class=
"line"
>
WantedBy=multi-user.target
</span><br></pre></td></tr></table></figure><p>
执行以下命令可配置服务并设置开机自启动:
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
$ cp MeiG-CM.service /usr/lib/systemd/system/
<span
class=
"comment"
>
# 拷贝服务文件到系统目录
</span></span><br><span
class=
"line"
>
$ systemctl daemon-reload
<span
class=
"comment"
>
# 重新检测加载服务,使其被系统识别到
</span></span><br><span
class=
"line"
>
$ systemctl start MeiG-CM.service
<span
class=
"comment"
>
# 手动启动服务
</span></span><br><span
class=
"line"
>
$ systemctl
<span
class=
"built_in"
>
enable
</span>
MeiG-CM.service
<span
class=
"comment"
>
# 配置开机自启动
</span></span><br></pre></td></tr></table></figure><p>
至此,在Centos 7.6上就可以自动配置MeiG SLM50 4G模块上网。如果卡被停用后·再启用,也不需要重新启动机器,会自动重新拨号。
</p></div><div><ul
class=
"post-copyright"
><li
class=
"post-copyright-author"
>
<strong>
本文作者:
</strong>
Alderaan
</li><li
class=
"post-copyright-link"
>
<strong>
本文链接:
</strong>
<a
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
title=
"Centos 7.6 下使用美格SLM750(4G模块)拨号上网"
>
https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/
</a></li><li
class=
"post-copyright-license"
>
<strong>
版权声明:
</strong>
本博客所有文章除特别声明外,均采用
<a
href=
"https://creativecommons.org/licenses/by-nc-sa/4.0/"
rel=
"noopener"
target=
"_blank"
><i
class=
"fab fa-fw fa-creative-commons"
></i>
BY-NC-SA
</a>
许可协议。转载请注明出处!
</li></ul></div><footer
class=
"post-footer"
><div
class=
"post-tags"
><a
href=
"/tags/Centos/"
rel=
"tag"
><i
class=
"fa fa-tag"
></i>
Centos
</a><a
href=
"/tags/4G-moduleC/"
rel=
"tag"
><i
class=
"fa fa-tag"
></i>
4G moduleC
</a><a
href=
"/tags/SLM750/"
rel=
"tag"
><i
class=
"fa fa-tag"
></i>
SLM750
</a></div><div
class=
"post-nav"
><div
class=
"post-nav-item"
><a
href=
"/2020/05/10/mw150us-2-0-mac-driver/"
rel=
"prev"
title=
"水星USB无线网卡mw150us苹果macOS系统驱动成功"
><i
class=
"fa fa-chevron-left"
></i>
水星USB无线网卡mw150us苹果macOS系统驱动成功
</a></div><div
class=
"post-nav-item"
></div></div></footer></article></div><script>
window
.
addEventListener
(
'
tabs:register
'
,
()
=>
{
let
{
activeClass
}
=
CONFIG
.
comments
;
if
(
CONFIG
.
comments
.
storage
)
{
...
...
atom.xml
浏览文件 @
68b4b27a
...
...
@@ -6,7 +6,7 @@
<link
href=
"/atom.xml"
rel=
"self"
/>
<link
href=
"https://alderaan.xyz/"
/>
<updated>
2020-05-11T14:5
0:07.861
Z
</updated>
<updated>
2020-05-11T14:5
5:44.524
Z
</updated>
<id>
https://alderaan.xyz/
</id>
<author>
...
...
@@ -21,9 +21,9 @@
<link
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
/>
<id>
https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/
</id>
<published>
2020-05-11T09:40:13.000Z
</published>
<updated>
2020-05-11T14:5
0:07.861
Z
</updated>
<updated>
2020-05-11T14:5
5:44.524
Z
</updated>
<content
type=
"html"
>
<![CDATA[<h2 id="概述"><a href="#概述" class="headerlink" title="概述"></a>概述</h2><p> 想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块<code>SLM750</code>,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行驱动编译安装,并编译拨号软件,最终实现工控机4G上网功能。</p><a id="more"></a><h2 id="准备"><a href="#准备" class="headerlink" title="准备"></a>准备</h2><p> 系统为Cento 7.6 64bit,基本环境为Basic Web Server安装(理论上与安装环境模式无关,最小安装也可以)。需要下载内核源码,Centos 7.6的内核版本为<code>3.10.0-957</code>,源码可在此<a href="http://vault.centos.org/7.6.1810/updates/Source/SPackages/kernel-3.10.0-957.21.3.el7.src.rpm" target="_blank" rel="noopener">链接</a>下载。另外还需要厂家提供的<code>GobiNet</code>网卡拨号的驱动及拨号工具源码,一张能4G上网的手机卡或物联网卡,接好模块天线。</p><h2 id="编译内核源码"><a href="#编译内核源码" class="headerlink" title="编译内核源码"></a>编译内核源码</h2><p> 将下载好的源码,解压到看到<code>linux-3.10.0-957.21.3.el7.tar.xz</code>文件,将其放到<code>/usr/src/kernels</code>文件夹下,并执行如下命令:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ tar xvf linux-3.10.0-957.21.3.el7.tar.xz // 解压内核源码文件</span><br><span class="line">$ mv linux-3.10.0-957.21.3.el7 3.10.0-957.el7.x86_64 // 重命名文件夹</span><br></pre></td></tr></table></figure><p> 之所以要更改文件夹名称,是因为厂家的<code>GobiNet</code>驱动源码,<code>Makefile</code>文件中:</p><figure class="highlight makefile"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line">obj-m := GobiNet.o</span><br><span class="line">GobiNet-objs := GobiUSBNet.o QMIDevice.o QMI.o</span><br><span class="line"></span><br><span class="line">PWD := <span class="variable">$(<span class="built_in">shell</span> pwd)</span></span><br><span class="line">OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/</span><br><span class="line"></span><br><span class="line"><span class="comment">#ifeq ($(ARCH),)</span></span><br><span class="line"><span class="comment">#EARCH := $(shell uname -m)</span></span><br><span class="line"><span class="comment">#endif</span></span><br><span class="line"><span class="comment">#ifeq ($(CROSS_COMPILE),)</span></span><br><span class="line"><span class="comment">#CROSS_COMPILE :=</span></span><br><span class="line"><span class="comment">#endif</span></span><br><span class="line"><span class="comment">#ifeq ($(KDIR),)</span></span><br><span class="line">KDIR := /lib/modules/<span class="variable">$(<span class="built_in">shell</span> uname -r)</span>/build <span class="comment"># 这里通过uname -r 获取了内核名称</span></span><br><span class="line"><span class="comment">#endif</span></span><br><span class="line"></span><br><span class="line"><span class="section">default:</span></span><br><span class="line"><span class="comment">#ln -sf makefile Makefile</span></span><br><span class="line"><span class="comment">#$(MAKE) ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} -C $(KDIR) M=$(PWD) modules</span></span><br><span class="line"><span class="variable">$(MAKE)</span> CROSS_COMPILE=${CROSS_COMPILE} -C <span class="variable">$(KDIR)</span> M=<span class="variable">$(PWD)</span> modules</span><br><span class="line"></span><br><span class="line"><span class="section">install: default</span></span><br><span class="line">mkdir -p <span class="variable">$(OUTPUTDIR)</span></span><br><span class="line">cp -f GobiNet.ko <span class="variable">$(OUTPUTDIR)</span></span><br><span class="line">depmod</span><br><span class="line">modprobe -r GobiNet</span><br><span class="line">modprobe GobiNet</span><br><span class="line"></span><br><span class="line"><span class="section">clean:</span></span><br><span class="line"><span class="comment"># rm -rf Makefile # 这里这段代码去掉,否则执行make clean会把Makefile文件也删除了</span></span><br><span class="line">rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order</span><br></pre></td></tr></table></figure><p> 如果为其他版本的系统,将文件夹对应修改为<code>uname -r</code>得到的名称即可。</p><h3 id="添加串口的ID"><a href="#添加串口的ID" class="headerlink" title="添加串口的ID"></a>添加串口的ID</h3><p> 打开内核源码文件 <code>/3.10.0-957.el7.x86_64/drivers/usb/serial/option.c</code>,在<code>/* Vendor and product IDs */</code>下增加宏定义:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* Vendor and product IDs */</span></span><br><span class="line"></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_VENDOR_ID
0x05C6 </span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_PRODUCT_730
0xF601 </span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_VENDOR_ID_7200x2dee </span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_PRODUCT_7200x4d07 </span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_PRODUCT_720_ECM0x4d02</span></span><br></pre></td></tr></table></figure><p> 在<code>option_ids</code>结构体数组增加4G模块的<code>VID</code>和<code>PID</code>:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="class"><span class="keyword">struct</span> <span class="title">usb_device_id</span> <span class="title">option_ids</span>[] = {</span></span><br><span class="line">{ USB_DEVICE(MEIG_VENDOR_ID,MEIG_PRODUCT_730) }, </span><br><span class="line">{ USB_DEVICE(MEIG_VENDOR_ID_720,MEIG_PRODUCT_720) }, </span><br><span class="line">{ USB_DEVICE(MEIG_VENDOR_ID_720,MEIG_PRODUCT_720_ECM) },</span><br></pre></td></tr></table></figure><h3 id="删除NDIS和ADB端口"><a href="#删除NDIS和ADB端口" class="headerlink" title="删除NDIS和ADB端口"></a>删除NDIS和ADB端口</h3><p> 使用<code>option</code>驱动,修改 <code>/3.10.0-957.el7.x86_64/driver/usb/serial/option.c</code>,在<code>option_probe</code>函数添加如下代码:</p> <figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">static</span> <span class="keyword">int</span> <span class="title">option_probe</span><span class="params">(struct usb_serial *serial,</span></span></span><br><span class="line"><span class="function"><span class="params"><span class="keyword">const</span> struct usb_device_id *id)</span></span></span><br><span class="line"><span class="function"></span>{</span><br><span class="line"><span class="class"><span class="keyword">struct</span> <span class="title">usb_interface_descriptor</span> *<span class="title">iface_desc</span> =</span></span><br><span class="line"><span class="class">&<span class="title">serial</span>-><span class="title">interface</span>-><span class="title">cur_altsetting</span>-><span class="title">desc</span>;</span></span><br><span class="line"><span class="class"><span class="keyword">struct</span> <span class="title">usb_device_descriptor</span> *<span class="title">dev_desc</span> = &<span class="title">serial</span>-><span class="title">dev</span>-><span class="title">descriptor</span>;</span></span><br><span class="line"><span class="keyword">const</span> <span class="class"><span class="keyword">struct</span> <span class="title">option_blacklist_info</span> *<span class="title">blacklist</span>;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">/* Never bind to the CD-Rom emulation interface*/</span></span><br><span class="line"><span class="keyword">if</span> (iface_desc->bInterfaceClass == <span class="number">0x08</span>)</span><br><span class="line"><span class="keyword">return</span> -ENODEV;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Don't bind reserved interfaces (like network ones) which often have</span></span><br><span class="line"><span class="comment"> * the same class/subclass/protocol as the serial interfaces. Look at</span></span><br><span class="line"><span class="comment"> * the Windows driver .INF files for reserved interface numbers.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">blacklist = (<span class="keyword">void</span> *)id->driver_info;</span><br><span class="line"><span class="keyword">if</span> (blacklist && test_bit(iface_desc->bInterfaceNumber,</span><br><span class="line">&blacklist->reserved))</span><br><span class="line"><span class="keyword">return</span> -ENODEV;</span><br><span class="line"></span><br><span class="line"><span class="comment">// struct usb_wwan_intf_private *data; 文档中的这个语句其实没有</span></span><br><span class="line"><span class="comment">// 开始添加代码</span></span><br><span class="line"><span class="keyword">if</span> (serial->dev->descriptor.idVendor == MEIG_VENDOR_ID && </span><br><span class="line">(serial->dev->descriptor.idProduct == MEIG_PRODUCT_730)&& </span><br><span class="line">serial->interface->cur_altsetting->desc.bInterfaceNumber >= <span class="number">4</span>) </span><br><span class="line"><span class="keyword">return</span> -ENODEV; </span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> (serial->dev->descriptor.idVendor == MEIG_VENDOR_ID_720&& </span><br><span class="line">(serial->dev->descriptor.idProduct == MEIG_PRODUCT_720)&& </span><br><span class="line">serial->interface->cur_altsetting->desc.bInterfaceNumber >= <span class="number">4</span>) </span><br><span class="line"><span class="keyword">return</span> -ENODEV; </span><br><span class="line"><span class="comment">// 完成添加代码</span></span><br></pre></td></tr></table></figure><p>使用<code>usb-serial</code>驱动,<code>/3.10.0-957.el7.x86_64/driver/usb/serial/usb-serial.c</code>,在<code>usb_serial_probe</code>函数添加如下代码:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"> serial = create_serial (dev, interface, type); </span><br><span class="line"> <span class="keyword">if</span> (!serial) { </span><br><span class="line"> unlock_kernel(); </span><br><span class="line"> dev_err(&interface->dev, <span class="string">"%s - out of memory\n"</span>, __FUNCTION__); </span><br><span class="line"> <span class="keyword">return</span> -ENOMEM; </span><br><span class="line"> } </span><br><span class="line"><span class="comment">//开始添加代码 厂家文档写的是宏定义,在该文件中无法找到会报错,这里直接改成了对应值</span></span><br><span class="line"> <span class="keyword">if</span> ( (serial->dev->descriptor.idVendor == <span class="number">0x50C6</span> && </span><br><span class="line">(serial->dev->descriptor.idProduct == <span class="number">0xF601</span>) )&& </span><br><span class="line">serial->interface->cur_altsetting->desc.bInterfaceNumber >=<span class="number">4</span> ) </span><br><span class="line"><span class="keyword">return</span> -ENOMEM; </span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> (serial->dev->descriptor.idVendor == <span class="number">0x2dee</span> && </span><br><span class="line">(serial->dev->descriptor.idProduct == <span class="number">0x4d07</span>)&& </span><br><span class="line">serial->interface->cur_altsetting->desc.bInterfaceNumber >= <span class="number">4</span>) </span><br><span class="line"><span class="keyword">return</span> -ENODEV; </span><br><span class="line"><span class="comment">//完成添加代码</span></span><br></pre></td></tr></table></figure><pre><code>### 配置编译参数</code></pre><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">cd</span> /usr/src/kernels/3.10.0-957.el7.x86_64 <span class="comment"># 切换到内核源码所在路径</span></span><br><span class="line">$ cp /boot/config-3.10.0-957.el7.x86_64 ./.config <span class="comment"># 拷贝当前内核的编译配置</span></span><br><span class="line">$ make oldconfig <span class="comment"># 在已有内核基础上进行配置</span></span><br><span class="line">$ yum install gcc gdb make elfutils-libelf-devel</span><br></pre></td></tr></table></figure><p> 需要说明的是,Centos 6.7默认就开启了<code>device drivers->usb support->usb serial converter support->USB driver for GSM and CDMA modems</code>和<code>device drivers->Network device support->usb Network Adapters->Multi-purpose USB Networking Framework</code>这两个组件,所以拷贝原有内核的编译配置即可使用。</p><h3 id="开始编译"><a href="#开始编译" class="headerlink" title="开始编译"></a>开始编译</h3><p> 执行如下命令开始编译源码,对应的线程数字按照实际机器进行配置,这个过程会比较慢。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ make -j 8</span><br></pre></td></tr></table></figure><p> 如果有其他错误提示,则安装对应的软件包依赖即可,这里编译后不进行安装,因为内核是一样的,编译内核只是为了编译驱动时能找到一些依赖。</p><h2 id="编译NDIS驱动"><a href="#编译NDIS驱动" class="headerlink" title="编译NDIS驱动"></a>编译NDIS驱动</h2><p> 这里采用的是单独编译的方式,所以上一个步骤没有和内核一块打包编译,主要是为了在不动原来内核的情况下使用,以防上面的其他软件运行受影响。</p><p> 到驱动目录下,执行如下命令:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ make <span class="comment"># 编译驱动</span></span><br><span class="line">$ make install <span class="comment"># 安装驱动</span></span><br></pre></td></tr></table></figure><p> 正常编译安装的话,不会有其他的警告或者错误,驱动成功后,可以看到新的网卡。一般是<code>ethX</code>这种格式,但还没有IP地址,需要使用拨号软件。</p><h2 id="编译Gobinet拨号工具"><a href="#编译Gobinet拨号工具" class="headerlink" title="编译Gobinet拨号工具"></a>编译Gobinet拨号工具</h2><p> 在厂家提供的源码中,由于是嵌入式的方案,默认获取IP地址的是<code>busybox</code>中的<code>udhcpc</code>命令,在<code>udhcpc.c</code>文件中,可以注释掉这样代码,以及这行代码上面两行的寻找默认配置文件的语句。本文管理网卡的工具是<code>NetworkManager</code>,Gobinet拨号后,会自动检测网卡状态,进行获取IP地址操作。其它系统根据实际需要,进行修改。本文做出的修改如下:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (profile->ipv4.Address) {</span><br><span class="line"><span class="meta">#<span class="meta-keyword">ifdef</span> USE_DHCLIENT</span></span><br><span class="line"> <span class="built_in">snprintf</span>(udhcpc_cmd, <span class="keyword">sizeof</span>(udhcpc_cmd), <span class="string">"dhclient -4 -d --no-pid %s"</span>, ifname);</span><br><span class="line"> dhclient_alive++;</span><br><span class="line"><span class="meta">#<span class="meta-keyword">else</span></span></span><br><span class="line"> <span class="comment">// 注释掉获取默认配置文件</span></span><br><span class="line"> <span class="comment">//if (access("/usr/share/udhcpc/default.script", X_OK)) {</span></span><br><span class="line"> <span class="comment">// dbg_time("Fail to access /usr/share/udhcpc/default.script, errno: %d (%s)", errno, strerror(errno));</span></span><br><span class="line"> <span class="comment">//}</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//-f,--foreground Run in foreground</span></span><br><span class="line"> <span class="comment">//-b,--background Background if lease is not obtained</span></span><br><span class="line"> <span class="comment">//-n,--now Exit if lease is not obtained</span></span><br><span class="line"> <span class="comment">//-q,--quit Exit after obtaining lease</span></span><br><span class="line"> <span class="comment">//-t,--retries N Send up to N discover packets (default 3)</span></span><br><span class="line"> <span class="comment">// 注释定义的获取IP命令</span></span><br><span class="line"> <span class="comment">//snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "busybox udhcpc -f -n -q -t 5 -i %s", ifname);</span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">endif</span></span></span><br><span class="line"><span class="comment">// 注释掉命令线程</span></span><br><span class="line"> <span class="comment">//pthread_create(&udhcpc_thread_id, &udhcpc_thread_attr, udhcpc_thread_function, (void*)strdup(udhcpc_cmd));</span></span><br><span class="line"> sleep(<span class="number">1</span>);</span><br><span class="line"> }</span><br></pre></td></tr></table></figure><p> 执行如下命令编译拨号工具</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ make <span class="comment"># 编译</span></span><br><span class="line">$ ./MeiG-CM & <span class="comment"># 后台执行拨号工具</span></span><br></pre></td></tr></table></figure><p> 如果拨号成功,可以看到对应的网卡会获取到IP地址,并可以正常上网。</p><h2 id="服务化拨号工具"><a href="#服务化拨号工具" class="headerlink" title="服务化拨号工具"></a>服务化拨号工具</h2><p> 可以使用<code>systemctl</code>管理拨号工具,新建一个文件<code>MeiG-CM.service</code>,并写入如下内容:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">[Unit]</span><br><span class="line">Description=quectel-CM Service</span><br><span class="line">After=network.target</span><br><span class="line"></span><br><span class="line">[Service]</span><br><span class="line">Type=simple</span><br><span class="line">User=root</span><br><span class="line">Restart=always</span><br><span class="line">RestartSec=5s</span><br><span class="line">ExecStart=/home/MeiG-CM/MeiG-CM <span class="comment"># 这里更改为对应的可执行文件所在路径</span></span><br><span class="line"></span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br></pre></td></tr></table></figure><p> 执行以下命令可配置服务并设置开机自启动:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ cp MeiG-CM.service /usr/lib/systemd/system/ <span class="comment"># 拷贝服务文件到系统目录</span></span><br><span class="line">$ systemctl daemon-reload <span class="comment"># 重新检测加载服务,使其被系统识别到</span></span><br><span class="line">$ systemctl start MeiG-CM.service <span class="comment"># 手动启动服务</span></span><br><span class="line">$ systemctl <span class="built_in">enable</span> MeiG-CM.service <span class="comment"># 配置开机自启动</span></span><br></pre></td></tr></table></figure><p> 至此,在Centos 7.6上就可以自动配置MeiG SLM50 4G模块上网。如果卡被停用后·再启用,也不需要重新启动机器,会自动重新拨号。</p>]]>
</content>
<content
type=
"html"
>
<![CDATA[<h2 id="概述"><a href="#概述" class="headerlink" title="概述"></a>概述</h2><p> 想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块<code>SLM750</code>,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行驱动编译安装,并编译拨号软件,最终实现工控机4G上网功能。</p><a id="more"></a><h2 id="准备"><a href="#准备" class="headerlink" title="准备"></a>准备</h2><p> 系统为Cento 7.6 64bit,基本环境为Basic Web Server安装(理论上与安装环境模式无关,最小安装也可以)。需要下载内核源码,Centos 7.6的内核版本为<code>3.10.0-957</code>,源码可在此<a href="http://vault.centos.org/7.6.1810/updates/Source/SPackages/kernel-3.10.0-957.21.3.el7.src.rpm" target="_blank" rel="noopener">链接</a>下载。另外还需要厂家提供的<code>GobiNet</code>网卡拨号的驱动及拨号工具源码,一张能4G上网的手机卡或物联网卡,接好模块天线。</p><h2 id="编译内核源码"><a href="#编译内核源码" class="headerlink" title="编译内核源码"></a>编译内核源码</h2><p> 将下载好的源码,解压到看到<code>linux-3.10.0-957.21.3.el7.tar.xz</code>文件,将其放到<code>/usr/src/kernels</code>文件夹下,并执行如下命令:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ tar xvf linux-3.10.0-957.21.3.el7.tar.xz // 解压内核源码文件</span><br><span class="line">$ mv linux-3.10.0-957.21.3.el7 3.10.0-957.el7.x86_64 // 重命名文件夹</span><br></pre></td></tr></table></figure><p> 之所以要更改文件夹名称,是因为厂家的<code>GobiNet</code>驱动源码,<code>Makefile</code>文件中:</p><figure class="highlight makefile"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line">obj-m := GobiNet.o</span><br><span class="line">GobiNet-objs := GobiUSBNet.o QMIDevice.o QMI.o</span><br><span class="line"></span><br><span class="line">PWD := <span class="variable">$(<span class="built_in">shell</span> pwd)</span></span><br><span class="line">OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/</span><br><span class="line"></span><br><span class="line"><span class="comment">#ifeq ($(ARCH),)</span></span><br><span class="line"><span class="comment">#EARCH := $(shell uname -m)</span></span><br><span class="line"><span class="comment">#endif</span></span><br><span class="line"><span class="comment">#ifeq ($(CROSS_COMPILE),)</span></span><br><span class="line"><span class="comment">#CROSS_COMPILE :=</span></span><br><span class="line"><span class="comment">#endif</span></span><br><span class="line"><span class="comment">#ifeq ($(KDIR),)</span></span><br><span class="line">KDIR := /lib/modules/<span class="variable">$(<span class="built_in">shell</span> uname -r)</span>/build <span class="comment"># 这里通过uname -r 获取了内核名称</span></span><br><span class="line"><span class="comment">#endif</span></span><br><span class="line"></span><br><span class="line"><span class="section">default:</span></span><br><span class="line"><span class="comment">#ln -sf makefile Makefile</span></span><br><span class="line"><span class="comment">#$(MAKE) ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} -C $(KDIR) M=$(PWD) modules</span></span><br><span class="line"><span class="variable">$(MAKE)</span> CROSS_COMPILE=${CROSS_COMPILE} -C <span class="variable">$(KDIR)</span> M=<span class="variable">$(PWD)</span> modules</span><br><span class="line"></span><br><span class="line"><span class="section">install: default</span></span><br><span class="line">mkdir -p <span class="variable">$(OUTPUTDIR)</span></span><br><span class="line">cp -f GobiNet.ko <span class="variable">$(OUTPUTDIR)</span></span><br><span class="line">depmod</span><br><span class="line">modprobe -r GobiNet</span><br><span class="line">modprobe GobiNet</span><br><span class="line"></span><br><span class="line"><span class="section">clean:</span></span><br><span class="line"><span class="comment"># rm -rf Makefile # 这里这段代码去掉,否则执行make clean会把Makefile文件也删除了</span></span><br><span class="line">rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order</span><br></pre></td></tr></table></figure><p> 如果为其他版本的系统,将文件夹对应修改为<code>uname -r</code>得到的名称即可。</p><h3 id="添加串口的ID"><a href="#添加串口的ID" class="headerlink" title="添加串口的ID"></a>添加串口的ID</h3><p> 打开内核源码文件 <code>/3.10.0-957.el7.x86_64/drivers/usb/serial/option.c</code>,在<code>/* Vendor and product IDs */</code>下增加宏定义:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* Vendor and product IDs */</span></span><br><span class="line"></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_VENDOR_ID
0x05C6 </span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_PRODUCT_730
0xF601 </span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_VENDOR_ID_7200x2dee </span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_PRODUCT_7200x4d07 </span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> MEIG_PRODUCT_720_ECM0x4d02</span></span><br></pre></td></tr></table></figure><p> 在<code>option_ids</code>结构体数组增加4G模块的<code>VID</code>和<code>PID</code>:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="class"><span class="keyword">struct</span> <span class="title">usb_device_id</span> <span class="title">option_ids</span>[] = {</span></span><br><span class="line">{ USB_DEVICE(MEIG_VENDOR_ID,MEIG_PRODUCT_730) }, </span><br><span class="line">{ USB_DEVICE(MEIG_VENDOR_ID_720,MEIG_PRODUCT_720) }, </span><br><span class="line">{ USB_DEVICE(MEIG_VENDOR_ID_720,MEIG_PRODUCT_720_ECM) },</span><br></pre></td></tr></table></figure><h3 id="删除NDIS和ADB端口"><a href="#删除NDIS和ADB端口" class="headerlink" title="删除NDIS和ADB端口"></a>删除NDIS和ADB端口</h3><p> 使用<code>option</code>驱动,修改 <code>/3.10.0-957.el7.x86_64/driver/usb/serial/option.c</code>,在<code>option_probe</code>函数添加如下代码:</p> <figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">static</span> <span class="keyword">int</span> <span class="title">option_probe</span><span class="params">(struct usb_serial *serial,</span></span></span><br><span class="line"><span class="function"><span class="params"><span class="keyword">const</span> struct usb_device_id *id)</span></span></span><br><span class="line"><span class="function"></span>{</span><br><span class="line"><span class="class"><span class="keyword">struct</span> <span class="title">usb_interface_descriptor</span> *<span class="title">iface_desc</span> =</span></span><br><span class="line"><span class="class">&<span class="title">serial</span>-><span class="title">interface</span>-><span class="title">cur_altsetting</span>-><span class="title">desc</span>;</span></span><br><span class="line"><span class="class"><span class="keyword">struct</span> <span class="title">usb_device_descriptor</span> *<span class="title">dev_desc</span> = &<span class="title">serial</span>-><span class="title">dev</span>-><span class="title">descriptor</span>;</span></span><br><span class="line"><span class="keyword">const</span> <span class="class"><span class="keyword">struct</span> <span class="title">option_blacklist_info</span> *<span class="title">blacklist</span>;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">/* Never bind to the CD-Rom emulation interface*/</span></span><br><span class="line"><span class="keyword">if</span> (iface_desc->bInterfaceClass == <span class="number">0x08</span>)</span><br><span class="line"><span class="keyword">return</span> -ENODEV;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Don't bind reserved interfaces (like network ones) which often have</span></span><br><span class="line"><span class="comment"> * the same class/subclass/protocol as the serial interfaces. Look at</span></span><br><span class="line"><span class="comment"> * the Windows driver .INF files for reserved interface numbers.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">blacklist = (<span class="keyword">void</span> *)id->driver_info;</span><br><span class="line"><span class="keyword">if</span> (blacklist && test_bit(iface_desc->bInterfaceNumber,</span><br><span class="line">&blacklist->reserved))</span><br><span class="line"><span class="keyword">return</span> -ENODEV;</span><br><span class="line"></span><br><span class="line"><span class="comment">// struct usb_wwan_intf_private *data; 文档中的这个语句其实没有</span></span><br><span class="line"><span class="comment">// 开始添加代码</span></span><br><span class="line"><span class="keyword">if</span> (serial->dev->descriptor.idVendor == MEIG_VENDOR_ID && </span><br><span class="line">(serial->dev->descriptor.idProduct == MEIG_PRODUCT_730)&& </span><br><span class="line">serial->interface->cur_altsetting->desc.bInterfaceNumber >= <span class="number">4</span>) </span><br><span class="line"><span class="keyword">return</span> -ENODEV; </span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> (serial->dev->descriptor.idVendor == MEIG_VENDOR_ID_720&& </span><br><span class="line">(serial->dev->descriptor.idProduct == MEIG_PRODUCT_720)&& </span><br><span class="line">serial->interface->cur_altsetting->desc.bInterfaceNumber >= <span class="number">4</span>) </span><br><span class="line"><span class="keyword">return</span> -ENODEV; </span><br><span class="line"><span class="comment">// 完成添加代码</span></span><br></pre></td></tr></table></figure><p>使用<code>usb-serial</code>驱动,<code>/3.10.0-957.el7.x86_64/driver/usb/serial/usb-serial.c</code>,在<code>usb_serial_probe</code>函数添加如下代码:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"> serial = create_serial (dev, interface, type); </span><br><span class="line"> <span class="keyword">if</span> (!serial) { </span><br><span class="line"> unlock_kernel(); </span><br><span class="line"> dev_err(&interface->dev, <span class="string">"%s - out of memory\n"</span>, __FUNCTION__); </span><br><span class="line"> <span class="keyword">return</span> -ENOMEM; </span><br><span class="line"> } </span><br><span class="line"><span class="comment">//开始添加代码 厂家文档写的是宏定义,在该文件中无法找到会报错,这里直接改成了对应值</span></span><br><span class="line"> <span class="keyword">if</span> ( (serial->dev->descriptor.idVendor == <span class="number">0x50C6</span> && </span><br><span class="line">(serial->dev->descriptor.idProduct == <span class="number">0xF601</span>) )&& </span><br><span class="line">serial->interface->cur_altsetting->desc.bInterfaceNumber >=<span class="number">4</span> ) </span><br><span class="line"><span class="keyword">return</span> -ENOMEM; </span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> (serial->dev->descriptor.idVendor == <span class="number">0x2dee</span> && </span><br><span class="line">(serial->dev->descriptor.idProduct == <span class="number">0x4d07</span>)&& </span><br><span class="line">serial->interface->cur_altsetting->desc.bInterfaceNumber >= <span class="number">4</span>) </span><br><span class="line"><span class="keyword">return</span> -ENODEV; </span><br><span class="line"><span class="comment">//完成添加代码</span></span><br></pre></td></tr></table></figure><pre><code>### 配置编译参数</code></pre><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">cd</span> /usr/src/kernels/3.10.0-957.el7.x86_64 <span class="comment"># 切换到内核源码所在路径</span></span><br><span class="line">$ cp /boot/config-3.10.0-957.el7.x86_64 ./.config <span class="comment"># 拷贝当前内核的编译配置</span></span><br><span class="line">$ make oldconfig <span class="comment"># 在已有内核基础上进行配置</span></span><br><span class="line">$ yum install gcc gdb make elfutils-libelf-devel</span><br></pre></td></tr></table></figure><p> 需要说明的是,Centos 6.7默认就开启了<code>device drivers->usb support->usb serial converter support->USB driver for GSM and CDMA modems</code>和<code>device drivers->Network device support->usb Network Adapters->Multi-purpose USB Networking Framework</code>这两个组件,所以拷贝原有内核的编译配置即可使用。</p><h3 id="开始编译"><a href="#开始编译" class="headerlink" title="开始编译"></a>开始编译</h3><p> 执行如下命令开始编译源码,对应的线程数字按照实际机器进行配置,这个过程会比较慢。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ make -j 8</span><br></pre></td></tr></table></figure><p> 如果有其他错误提示,则安装对应的软件包依赖即可,这里编译后不进行安装,因为内核是一样的,编译内核只是为了编译驱动时能找到一些依赖。</p><h2 id="编译NDIS驱动"><a href="#编译NDIS驱动" class="headerlink" title="编译NDIS驱动"></a>编译NDIS驱动</h2><p> 这里采用的是单独编译的方式,所以上一个步骤没有和内核一块打包编译,主要是为了在不动原来内核的情况下使用,以防上面的其他软件运行受影响。</p><p> 到驱动目录下,执行如下命令:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ make <span class="comment"># 编译驱动</span></span><br><span class="line">$ make install <span class="comment"># 安装驱动</span></span><br></pre></td></tr></table></figure><p> 正常编译安装的话,不会有其他的警告或者错误,驱动成功后,可以看到新的网卡。一般是<code>ethX</code>这种格式,但还没有IP地址,需要使用拨号软件。</p><h2 id="编译Gobinet拨号工具"><a href="#编译Gobinet拨号工具" class="headerlink" title="编译Gobinet拨号工具"></a>编译Gobinet拨号工具</h2><p> 在厂家提供的源码中,由于是嵌入式的方案,默认获取IP地址的是<code>busybox</code>中的<code>udhcpc</code>命令,在<code>udhcpc.c</code>文件中,可以注释掉这样代码,以及这行代码上面两行的寻找默认配置文件的语句。本文管理网卡的工具是<code>NetworkManager</code>,Gobinet拨号后,会自动检测网卡状态,进行获取IP地址操作。其它系统根据实际需要,进行修改。本文做出的修改如下:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (profile->ipv4.Address) {</span><br><span class="line"><span class="meta">#<span class="meta-keyword">ifdef</span> USE_DHCLIENT</span></span><br><span class="line"> <span class="built_in">snprintf</span>(udhcpc_cmd, <span class="keyword">sizeof</span>(udhcpc_cmd), <span class="string">"dhclient -4 -d --no-pid %s"</span>, ifname);</span><br><span class="line"> dhclient_alive++;</span><br><span class="line"><span class="meta">#<span class="meta-keyword">else</span></span></span><br><span class="line"> <span class="comment">// 注释掉获取默认配置文件</span></span><br><span class="line"> <span class="comment">//if (access("/usr/share/udhcpc/default.script", X_OK)) {</span></span><br><span class="line"> <span class="comment">// dbg_time("Fail to access /usr/share/udhcpc/default.script, errno: %d (%s)", errno, strerror(errno));</span></span><br><span class="line"> <span class="comment">//}</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//-f,--foreground Run in foreground</span></span><br><span class="line"> <span class="comment">//-b,--background Background if lease is not obtained</span></span><br><span class="line"> <span class="comment">//-n,--now Exit if lease is not obtained</span></span><br><span class="line"> <span class="comment">//-q,--quit Exit after obtaining lease</span></span><br><span class="line"> <span class="comment">//-t,--retries N Send up to N discover packets (default 3)</span></span><br><span class="line"> <span class="comment">// 注释定义的获取IP命令</span></span><br><span class="line"> <span class="comment">//snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "busybox udhcpc -f -n -q -t 5 -i %s", ifname);</span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">endif</span></span></span><br><span class="line"><span class="comment">// 注释掉命令线程</span></span><br><span class="line"> <span class="comment">//pthread_create(&udhcpc_thread_id, &udhcpc_thread_attr, udhcpc_thread_function, (void*)strdup(udhcpc_cmd));</span></span><br><span class="line"> sleep(<span class="number">1</span>);</span><br><span class="line"> }</span><br></pre></td></tr></table></figure><p> 执行如下命令编译拨号工具</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ make <span class="comment"># 编译</span></span><br><span class="line">$ ./MeiG-CM & <span class="comment"># 后台执行拨号工具</span></span><br></pre></td></tr></table></figure><p> 如果拨号成功,可以看到对应的网卡会获取到IP地址,并可以正常上网。</p><h2 id="服务化拨号工具"><a href="#服务化拨号工具" class="headerlink" title="服务化拨号工具"></a>服务化拨号工具</h2><p> 可以使用<code>systemctl</code>管理拨号工具,新建一个文件<code>MeiG-CM.service</code>,并写入如下内容:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">[Unit]</span><br><span class="line">Description=quectel-CM Service</span><br><span class="line">After=network.target</span><br><span class="line"></span><br><span class="line">[Service]</span><br><span class="line">Type=simple</span><br><span class="line">User=root</span><br><span class="line">Restart=always</span><br><span class="line">RestartSec=5s</span><br><span class="line">ExecStart=/home/MeiG-CM/MeiG-CM <span class="comment"># 这里更改为对应的可执行文件所在路径</span></span><br><span class="line"></span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br></pre></td></tr></table></figure><p> 执行以下命令可配置服务并设置开机自启动:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ cp MeiG-CM.service /usr/lib/systemd/system/ <span class="comment"># 拷贝服务文件到系统目录</span></span><br><span class="line">$ systemctl daemon-reload <span class="comment"># 重新检测加载服务,使其被系统识别到</span></span><br><span class="line">$ systemctl start MeiG-CM.service <span class="comment"># 手动启动服务</span></span><br><span class="line">$ systemctl <span class="built_in">enable</span> MeiG-CM.service <span class="comment"># 配置开机自启动</span></span><br></pre></td></tr></table></figure><p> 至此,在Centos 7.6上就可以自动配置MeiG SLM50 4G模块上网。如果卡被停用后·再启用,也不需要重新启动机器,会自动重新拨号。</p>]]>
</content>
<summary
type=
"html"
>
...
...
css/main.css
浏览文件 @
68b4b27a
code
,
h5
,
kbd
,
pre
,
samp
{
font-size
:
1em
}
button
,
hr
,
input
{
overflow
:
visible
}
progress
,
sub
,
sup
{
vertical-align
:
baseline
}
.table-container
,
pre
,
textarea
{
overflow
:
auto
}
p
,
table
{
margin
:
0
0
20px
}
:root
{
--body-bg-color
:
#eee
;
--content-bg-color
:
#fff
;
--card-bg-color
:
#f5f5f5
;
--text-color
:
#555
;
--blockquote-color
:
#666
;
--link-color
:
#555
;
--link-hover-color
:
#222
;
--brand-color
:
#fff
;
--brand-hover-color
:
#fff
;
--table-row-odd-bg-color
:
#f9f9f9
;
--table-row-hover-bg-color
:
#f5f5f5
;
--menu-item-bg-color
:
#f5f5f5
;
--btn-default-bg
:
#fff
;
--btn-default-color
:
#555
;
--btn-default-border-color
:
#555
;
--btn-default-hover-bg
:
#222
;
--btn-default-hover-color
:
#fff
;
--btn-default-hover-border-color
:
#222
}
html
{
line-height
:
1.15
;
-webkit-text-size-adjust
:
100%
}
details
,
main
{
display
:
block
}
hr
{
box-sizing
:
content-box
}
a
{
background
:
0
0
}
abbr
[
title
]
{
border-bottom
:
none
;
text-decoration
:
underline
;
text-decoration
:
underline
dotted
}
b
,
strong
{
font-weight
:
bolder
}
code
,
kbd
,
samp
{
font-family
:
monospace
,
monospace
}
small
{
font-size
:
80%
}
sub
,
sup
{
font-size
:
75%
;
line-height
:
0
;
position
:
relative
}
sub
{
bottom
:
-.25em
}
sup
{
top
:
-.5em
}
img
{
border-style
:
none
}
button
,
input
,
optgroup
,
select
,
textarea
{
font-family
:
inherit
;
font-size
:
100%
;
line-height
:
1.15
;
margin
:
0
}
button
,
select
{
text-transform
:
none
}
[
type
=
button
],[
type
=
reset
],[
type
=
submit
],
button
{
-webkit-appearance
:
button
}
[
type
=
button
]
::-moz-focus-inner
,[
type
=
reset
]
::-moz-focus-inner
,[
type
=
submit
]
::-moz-focus-inner
,
button
::-moz-focus-inner
{
border-style
:
none
;
padding
:
0
}
[
type
=
button
]
:-moz-focusring
,[
type
=
reset
]
:-moz-focusring
,[
type
=
submit
]
:-moz-focusring
,
button
:-moz-focusring
{
outline
:
ButtonText
dotted
1px
}
fieldset
{
padding
:
.35em
.75em
.625em
}
legend
{
box-sizing
:
border-box
;
color
:
inherit
;
display
:
table
;
max-width
:
100%
;
padding
:
0
;
white-space
:
normal
}
.post-body
,
a
,
code
,
span
.exturl
{
overflow-wrap
:
break-word
;
word-wrap
:
break-word
}
[
type
=
checkbox
],[
type
=
radio
]
{
box-sizing
:
border-box
;
padding
:
0
}
[
type
=
number
]
::-webkit-inner-spin-button
,[
type
=
number
]
::-webkit-outer-spin-button
{
height
:
auto
}
[
type
=
search
]
{
outline-offset
:
-2px
;
-webkit-appearance
:
textfield
}
[
type
=
search
]
::-webkit-search-decoration
{
-webkit-appearance
:
none
}
::-webkit-file-upload-button
{
font
:
inherit
;
-webkit-appearance
:
button
}
.btn
,
body
{
line-height
:
2
}
.post-body
,
.posts-expand
.post-meta
,
.site-title
,
body
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
font-family
:
Lato
,
"PingFang SC"
,
"Microsoft YaHei"
,
sans-serif
}
summary
{
display
:
list-item
}
[
hidden
],
template
{
display
:
none
}
::selection
{
background
:
#262a30
;
color
:
#eee
}
body
,
html
{
height
:
100%
}
body
{
margin
:
0
;
background
:
var
(
--body-bg-color
);
color
:
var
(
--text-color
);
font-size
:
1em
}
@media
(
max-width
:
991px
){
body
{
padding-left
:
0
!important
;
padding-right
:
0
!important
}}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
font-weight
:
700
;
line-height
:
1.5
;
margin
:
20px
0
15px
}
h1
{
font-size
:
1.5em
}
h2
{
font-size
:
1.375em
}
h3
{
font-size
:
1.25em
}
h4
{
font-size
:
1.125em
}
.btn
,
.highlight
figcaption
,
h6
,
pre
code
,
table
{
font-size
:
.875em
}
a
,
span
.exturl
{
border-bottom
:
1px
solid
#999
;
color
:
var
(
--link-color
);
outline
:
0
;
text-decoration
:
none
;
cursor
:
pointer
}
a
:hover
,
span
.exturl
:hover
{
border-bottom-color
:
var
(
--link-hover-color
);
color
:
var
(
--link-hover-color
)}
iframe
,
img
,
video
{
display
:
block
;
margin-left
:
auto
;
margin-right
:
auto
;
max-width
:
100%
}
hr
{
background-image
:
repeating-linear-gradient
(
-45deg
,
#ddd
,
#ddd
4px
,
transparent
4px
,
transparent
8px
);
border
:
0
;
height
:
3px
;
margin
:
40px
0
}
blockquote
{
border-left
:
4px
solid
#ddd
;
color
:
var
(
--blockquote-color
);
margin
:
0
;
padding
:
0
15px
}
blockquote
cite
::before
{
content
:
'-'
;
padding
:
0
5px
}
dt
{
font-weight
:
700
}
dd
{
margin
:
0
;
padding
:
0
}
kbd
{
background-color
:
#f5f5f5
;
background-image
:
linear-gradient
(
#eee
,
#fff
,
#eee
);
border
:
1px
solid
#ccc
;
border-radius
:
.2em
;
box-shadow
:
.1em
.1em
.2em
rgba
(
0
,
0
,
0
,
.1
);
color
:
#555
;
font-family
:
inherit
;
padding
:
.1em
.3em
;
white-space
:
nowrap
}
table
{
border-collapse
:
collapse
;
border-spacing
:
0
;
width
:
100%
}
tbody
tr
:nth-of-type
(
odd
)
{
background
:
var
(
--table-row-odd-bg-color
)}
tbody
tr
:hover
{
background
:
var
(
--table-row-hover-bg-color
)}
caption
,
td
,
th
{
font-weight
:
400
;
padding
:
8px
;
text-align
:
left
;
vertical-align
:
middle
}
td
,
th
{
border
:
1px
solid
#ddd
;
border-bottom
:
3px
solid
#ddd
}
th
{
font-weight
:
700
;
padding-bottom
:
10px
}
td
{
border-bottom-width
:
1px
}
.btn
{
background
:
var
(
--btn-default-bg
);
border
:
2px
solid
var
(
--btn-default-border-color
);
border-radius
:
2px
;
color
:
var
(
--btn-default-color
);
display
:
inline-block
;
padding
:
0
20px
;
text-decoration
:
none
;
transition-property
:
background-color
;
transition-delay
:
0s
;
transition-duration
:
.2s
;
transition-timing-function
:
ease-in-out
}
.btn
:hover
{
background
:
var
(
--btn-default-hover-bg
);
border-color
:
var
(
--btn-default-hover-border-color
);
color
:
var
(
--btn-default-hover-color
)}
.btn
+
.btn
{
margin
:
0
0
8px
8px
}
.btn
.fa-fw
{
text-align
:
left
;
width
:
1.285714285714286em
}
.toggle
{
line-height
:
0
}
.toggle
.toggle-line
{
background
:
#fff
;
display
:
inline-block
;
height
:
2px
;
left
:
0
;
position
:
relative
;
top
:
0
;
transition
:
all
.4s
;
vertical-align
:
top
;
width
:
100%
}
.toggle
.toggle-line
:not
(
:first-child
)
{
margin-top
:
3px
}
.toggle.toggle-arrow
.toggle-line-first
{
left
:
50%
;
top
:
2px
;
transform
:
rotate
(
45deg
);
width
:
50%
}
.toggle.toggle-arrow
.toggle-line-middle
{
left
:
2px
;
width
:
90%
}
.toggle.toggle-arrow
.toggle-line-last
{
left
:
50%
;
top
:
-2px
;
transform
:
rotate
(
-45deg
);
width
:
50%
}
.toggle.toggle-close
.toggle-line-first
{
transform
:
rotate
(
-45deg
);
top
:
5px
}
.toggle.toggle-close
.toggle-line-middle
{
opacity
:
0
}
.toggle.toggle-close
.toggle-line-last
{
transform
:
rotate
(
45deg
);
top
:
-5px
}
.highlight
,
pre
{
background
:
#f7f7f7
;
color
:
#4d4d4c
;
line-height
:
1.6
;
margin
:
0
auto
20px
}
code
,
pre
{
font-family
:
consolas
,
Menlo
,
monospace
,
"PingFang SC"
,
"Microsoft YaHei"
}
code
{
background
:
#eee
;
border-radius
:
3px
;
color
:
#555
;
padding
:
2px
4px
}
.highlight
::selection
{
background
:
#d6d6d6
}
.highlight
pre
{
border
:
0
;
margin
:
0
;
padding
:
10px
0
}
.highlight
table
{
border
:
0
;
margin
:
0
;
width
:
auto
}
.highlight
td
{
border
:
0
;
padding
:
0
}
.highlight
figcaption
{
background
:
#eff2f3
;
color
:
#4d4d4c
;
display
:
flex
;
justify-content
:
space-between
;
line-height
:
1.2
;
padding
:
.5em
}
.highlight
figcaption
a
{
color
:
#4d4d4c
}
.highlight
figcaption
a
:hover
{
border-bottom-color
:
#4d4d4c
}
.highlight
.gutter
{
-moz-user-select
:
none
;
-ms-user-select
:
none
;
-webkit-user-select
:
none
;
user-select
:
none
}
.highlight
.gutter
pre
{
background
:
#eff2f3
;
color
:
#869194
;
padding-left
:
10px
;
padding-right
:
10px
;
text-align
:
right
}
.highlight
.code
pre
{
background
:
#f7f7f7
;
padding-left
:
10px
;
width
:
100%
}
.gist
table
{
width
:
auto
}
.gist
table
td
{
border
:
0
}
pre
{
padding
:
10px
}
pre
code
{
background
:
0
0
;
color
:
#4d4d4c
;
padding
:
0
;
text-shadow
:
none
}
pre
.deletion
{
background
:
#fdd
}
pre
.addition
{
background
:
#dfd
}
pre
.meta
{
color
:
#eab700
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
-webkit-user-select
:
none
;
user-select
:
none
}
pre
.comment
{
color
:
#8e908c
}
pre
.attribute
,
pre
.css
.class
,
pre
.css
.id
,
pre
.css
.pseudo
,
pre
.html
.doctype
,
pre
.name
,
pre
.regexp
,
pre
.ruby
.constant
,
pre
.tag
,
pre
.variable
,
pre
.xml
.doctype
,
pre
.xml
.pi
,
pre
.xml
.tag
.title
{
color
:
#c82829
}
pre
.built_in
,
pre
.builtin-name
,
pre
.command
,
pre
.constant
,
pre
.literal
,
pre
.number
,
pre
.params
,
pre
.preprocessor
{
color
:
#f5871f
}
pre
.css
.rules
.attribute
,
pre
.formula
,
pre
.header
,
pre
.inheritance
,
pre
.ruby
.class
.title
,
pre
.ruby
.symbol
,
pre
.special
,
pre
.string
,
pre
.symbol
,
pre
.value
,
pre
.xml
.cdata
{
color
:
#718c00
}
pre
.css
.hexcolor
,
pre
.title
{
color
:
#3e999f
}
pre
.coffeescript
.title
,
pre
.function
,
pre
.javascript
.title
,
pre
.perl
.sub
,
pre
.python
.decorator
,
pre
.python
.title
,
pre
.ruby
.function
.title
,
pre
.ruby
.title
.keyword
{
color
:
#4271ae
}
pre
.javascript
.function
,
pre
.keyword
{
color
:
#8959a8
}
.blockquote-center
{
border-left
:
none
;
margin
:
40px
0
;
padding
:
0
;
position
:
relative
;
text-align
:
center
}
.blockquote-center
.fa
{
display
:
block
;
opacity
:
.6
;
position
:
absolute
;
width
:
100%
}
.blockquote-center
.fa-quote-left
{
border-top
:
1px
solid
#ccc
;
text-align
:
left
;
top
:
-20px
}
.blockquote-center
.fa-quote-right
{
border-bottom
:
1px
solid
#ccc
;
text-align
:
right
;
bottom
:
-20px
}
.blockquote-center
div
,
.blockquote-center
p
{
text-align
:
center
}
.post-body
.group-picture
img
{
margin
:
0
auto
;
padding
:
0
3px
}
.group-picture-row
{
margin-bottom
:
6px
;
overflow
:
hidden
}
.group-picture-column
{
float
:
left
;
margin-bottom
:
10px
}
.post-body
.note
,
.post-body
.tabs
{
margin-bottom
:
20px
}
.post-body
.label
{
color
:
#555
;
display
:
inline
;
padding
:
0
2px
}
.post-body
.label.default
{
background
:
#f0f0f0
}
.post-body
.label.primary
{
background
:
#efe6f7
}
.post-body
.label.info
{
background
:
#e5f2f8
}
.post-body
.label.success
{
background
:
#e7f4e9
}
.post-body
.label.warning
{
background
:
#fcf6e1
}
.post-body
.label.danger
{
background
:
#fae8eb
}
.post-body
.tabs
,
.tabs-comment
{
display
:
block
;
padding-top
:
10px
;
position
:
relative
}
.post-body
.tabs
ul
.nav-tabs
,
.tabs-comment
ul
.nav-tabs
{
display
:
flex
;
flex-wrap
:
wrap
;
margin
:
0
0
-1px
;
padding
:
0
}
.post-body
.tabs
ul
.nav-tabs
li
.tab
,
.tabs-comment
ul
.nav-tabs
li
.tab
{
border-bottom
:
1px
solid
#ddd
;
border-left
:
1px
solid
transparent
;
border-right
:
1px
solid
transparent
;
border-top
:
3px
solid
transparent
;
flex-grow
:
1
;
list-style-type
:
none
;
border-radius
:
0
}
@media
(
max-width
:
413px
){
.post-body
.tabs
ul
.nav-tabs
,
.tabs-comment
ul
.nav-tabs
{
display
:
block
;
margin-bottom
:
5px
}
.post-body
.tabs
ul
.nav-tabs
li
.tab
,
.tabs-comment
ul
.nav-tabs
li
.tab
{
border-bottom
:
1px
solid
transparent
;
border-left
:
3px
solid
transparent
;
border-right
:
1px
solid
transparent
;
border-top
:
1px
solid
transparent
;
border-radius
:
0
}}
.post-body
.tabs
ul
.nav-tabs
li
.tab
a
,
.tabs-comment
ul
.nav-tabs
li
.tab
a
{
border-bottom
:
initial
;
display
:
block
;
line-height
:
1.8
;
outline
:
0
;
padding
:
.25em
.75em
;
text-align
:
center
;
transition-delay
:
0s
;
transition-duration
:
.2s
;
transition-timing-function
:
ease-out
}
.menu-item
a
,
.menu-item
span
.exturl
,
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
{
transition-property
:
border-color
;
transition-delay
:
0s
;
transition-duration
:
.2s
;
transition-timing-function
:
ease-in-out
}
.post-body
.tabs
ul
.nav-tabs
li
.tab
a
i
,
.tabs-comment
ul
.nav-tabs
li
.tab
a
i
{
width
:
1.285714285714286em
}
.post-body
.tabs
ul
.nav-tabs
li
.tab.active
,
.tabs-comment
ul
.nav-tabs
li
.tab.active
{
border-bottom
:
1px
solid
transparent
;
border-left
:
1px
solid
#ddd
;
border-right
:
1px
solid
#ddd
;
border-top
:
3px
solid
#fc6423
}
@media
(
max-width
:
413px
){
.post-body
.tabs
ul
.nav-tabs
li
.tab.active
,
.tabs-comment
ul
.nav-tabs
li
.tab.active
{
border-bottom
:
1px
solid
#ddd
;
border-left
:
3px
solid
#fc6423
;
border-right
:
1px
solid
#ddd
;
border-top
:
1px
solid
#ddd
}}
.post-body
.tabs
ul
.nav-tabs
li
.tab.active
a
,
.tabs-comment
ul
.nav-tabs
li
.tab.active
a
{
color
:
var
(
--link-color
);
cursor
:
default
}
.post-body
.tabs
.tab-content
.tab-pane
,
.tabs-comment
.tab-content
.tab-pane
{
border
:
1px
solid
#ddd
;
border-top
:
0
;
padding
:
20px
20px
0
;
border-radius
:
0
}
.post-body
.tabs
.tab-content
.tab-pane
:not
(
.active
),
.tabs-comment
.tab-content
.tab-pane
:not
(
.active
)
{
display
:
none
}
.post-body
.tabs
.tab-content
.tab-pane.active
,
.tabs-comment
.tab-content
.tab-pane.active
{
display
:
block
}
.post-body
.tabs
.tab-content
.tab-pane.active
:nth-of-type
(
1
),
.tabs-comment
.tab-content
.tab-pane.active
:nth-of-type
(
1
)
{
border-radius
:
0
}
@media
(
max-width
:
413px
){
.post-body
.tabs
.tab-content
.tab-pane.active
:nth-of-type
(
1
),
.tabs-comment
.tab-content
.tab-pane.active
:nth-of-type
(
1
)
{
border-radius
:
0
}}
.post-body
.note
{
border-radius
:
3px
;
padding
:
1em
;
position
:
relative
;
border
:
1px
solid
#eee
;
border-left-width
:
5px
}
.post-body
.note
h2
,
.post-body
.note
h3
,
.post-body
.note
h4
,
.post-body
.note
h5
,
.post-body
.note
h6
{
margin-top
:
0
;
border-bottom
:
initial
;
margin-bottom
:
0
;
padding-top
:
0
}
.post-body
.note
blockquote
:first-child
,
.post-body
.note
img
:first-child
,
.post-body
.note
ol
:first-child
,
.post-body
.note
p
:first-child
,
.post-body
.note
pre
:first-child
,
.post-body
.note
table
:first-child
,
.post-body
.note
ul
:first-child
{
margin-top
:
0
}
.post-body
.note
blockquote
:last-child
,
.post-body
.note
img
:last-child
,
.post-body
.note
ol
:last-child
,
.post-body
.note
p
:last-child
,
.post-body
.note
pre
:last-child
,
.post-body
.note
table
:last-child
,
.post-body
.note
ul
:last-child
{
margin-bottom
:
0
}
.post-body
.note.default
{
border-left-color
:
#777
}
.post-body
.note.default
h2
,
.post-body
.note.default
h3
,
.post-body
.note.default
h4
,
.post-body
.note.default
h5
,
.post-body
.note.default
h6
{
color
:
#777
}
.post-body
.note.primary
{
border-left-color
:
#6f42c1
}
.post-body
.note.primary
h2
,
.post-body
.note.primary
h3
,
.post-body
.note.primary
h4
,
.post-body
.note.primary
h5
,
.post-body
.note.primary
h6
{
color
:
#6f42c1
}
.post-body
.note.info
{
border-left-color
:
#428bca
}
.post-body
.note.info
h2
,
.post-body
.note.info
h3
,
.post-body
.note.info
h4
,
.post-body
.note.info
h5
,
.post-body
.note.info
h6
{
color
:
#428bca
}
.post-body
.note.success
{
border-left-color
:
#5cb85c
}
.post-body
.note.success
h2
,
.post-body
.note.success
h3
,
.post-body
.note.success
h4
,
.post-body
.note.success
h5
,
.post-body
.note.success
h6
{
color
:
#5cb85c
}
.post-body
.note.warning
{
border-left-color
:
#f0ad4e
}
.post-body
.note.warning
h2
,
.post-body
.note.warning
h3
,
.post-body
.note.warning
h4
,
.post-body
.note.warning
h5
,
.post-body
.note.warning
h6
{
color
:
#f0ad4e
}
.post-body
.note.danger
{
border-left-color
:
#d9534f
}
.post-body
.note.danger
h2
,
.post-body
.note.danger
h3
,
.post-body
.note.danger
h4
,
.post-body
.note.danger
h5
,
.post-body
.note.danger
h6
{
color
:
#d9534f
}
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
,
.pagination
.space
{
display
:
inline-block
;
margin
:
0
10px
;
padding
:
0
11px
;
position
:
relative
;
top
:
-1px
}
@media
(
max-width
:
767px
){
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
,
.pagination
.space
{
margin
:
0
5px
}}
.pagination
{
text-align
:
center
}
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
{
border-bottom
:
0
;
border-top
:
1px
solid
#eee
}
.pagination
.next
:hover
,
.pagination
.page-number
:hover
,
.pagination
.prev
:hover
{
border-top-color
:
#222
}
.pagination
.space
{
margin
:
0
;
padding
:
0
}
.pagination
.prev
{
margin-left
:
0
}
.pagination
.next
{
margin-right
:
0
}
.pagination
.page-number.current
{
background
:
#ccc
;
border-top-color
:
#ccc
;
color
:
#fff
}
@media
(
max-width
:
767px
){
.pagination
{
border-top
:
none
}
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
{
border-bottom
:
1px
solid
#eee
;
border-top
:
0
;
margin-bottom
:
10px
;
padding
:
0
10px
}
.pagination
.next
:hover
,
.pagination
.page-number
:hover
,
.pagination
.prev
:hover
{
border-bottom-color
:
#222
}}
.comments
{
overflow
:
hidden
}
.comment-button-group
{
display
:
flex
;
flex-wrap
:
wrap-reverse
;
justify-content
:
center
;
margin
:
1em
0
}
.comment-button-group
.comment-button
{
margin
:
.1em
.2em
}
.comment-button-group
.comment-button.active
{
background
:
var
(
--btn-default-hover-bg
);
border-color
:
var
(
--btn-default-hover-border-color
);
color
:
var
(
--btn-default-hover-color
)}
.comment-position
{
display
:
none
}
.comment-position.active
{
display
:
block
}
.tabs-comment
{
background
:
var
(
--content-bg-color
);
padding-top
:
0
}
.tabs-comment
.comments
{
border
:
0
;
box-shadow
:
none
;
margin-top
:
0
;
padding-top
:
0
}
.container
{
min-height
:
100%
;
position
:
relative
}
.main-inner
{
margin
:
0
auto
;
width
:
calc
(
100%
-
20px
)}
@media
(
min-width
:
1200px
){
.main-inner
{
width
:
1160px
}}
@media
(
min-width
:
1600px
){
.main-inner
{
width
:
73%
}}
@media
(
max-width
:
767px
){
.content-wrap
{
padding
:
0
20px
}
.site-meta
{
text-align
:
center
}}
.header
{
background
:
0
0
}
.header-inner
{
margin
:
0
auto
}
@media
(
min-width
:
1200px
){
.header-inner
{
width
:
1160px
}}
@media
(
min-width
:
1600px
){
.header-inner
{
width
:
73%
}}
.site-brand-container
{
display
:
flex
;
flex-shrink
:
0
;
padding
:
0
10px
}
.headband
{
background
:
#222
;
height
:
3px
}
.site-meta
{
flex-grow
:
1
;
text-align
:
center
}
.brand
{
border-bottom
:
none
;
color
:
var
(
--brand-color
);
display
:
inline-block
;
line-height
:
1.375em
;
position
:
relative
}
.brand
:hover
{
color
:
var
(
--brand-hover-color
)}
.site-title
{
font-size
:
1.375em
;
font-weight
:
400
;
margin
:
0
}
.site-subtitle
{
color
:
#ddd
;
font-size
:
.8125em
}
.use-motion
.brand
{
opacity
:
0
}
.use-motion
.custom-logo-image
,
.use-motion
.site-subtitle
,
.use-motion
.site-title
{
opacity
:
0
;
position
:
relative
;
top
:
-10px
}
.site-nav-right
,
.site-nav-toggle
{
display
:
none
}
@media
(
max-width
:
767px
){
.site-nav-right
,
.site-nav-toggle
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
}}
.site-nav-right
.toggle
,
.site-nav-toggle
.toggle
{
padding
:
10px
;
width
:
22px
}
.site-nav-right
.toggle
.toggle-line
,
.site-nav-toggle
.toggle
.toggle-line
{
border-radius
:
1px
}
.site-nav
{
display
:
block
}
@media
(
max-width
:
767px
){
.site-nav
{
clear
:
both
;
display
:
none
}}
.site-nav.site-nav-on
{
display
:
block
}
.menu
{
margin-top
:
20px
;
padding-left
:
0
;
text-align
:
center
}
.menu-item
{
display
:
inline-block
;
list-style
:
none
;
margin
:
0
10px
}
@media
(
max-width
:
767px
){
.menu-item
{
display
:
block
;
margin-top
:
10px
}
.menu-item.menu-item-search
{
display
:
none
}}
.menu-item
a
,
.menu-item
span
.exturl
{
border-bottom
:
0
;
display
:
block
;
font-size
:
.8125em
}
@media
(
hover
:
none
){
.menu-item
a
:hover
,
.menu-item
span
.exturl
:hover
{
border-bottom-color
:
transparent
!important
}}
.menu-item
.fa
,
.menu-item
.fab
,
.menu-item
.far
,
.menu-item
.fas
{
margin-right
:
8px
}
.menu-item
.badge
{
display
:
inline-block
;
font-weight
:
700
;
line-height
:
1
;
margin-left
:
.35em
;
margin-top
:
.35em
;
text-align
:
center
;
white-space
:
nowrap
}
@media
(
max-width
:
767px
){
.menu-item
.badge
{
float
:
right
;
margin-left
:
0
}}
.menu
.menu-item
a
:hover
,
.menu
.menu-item
span
.exturl
:hover
,
.menu-item-active
a
{
background
:
var
(
--menu-item-bg-color
)}
.use-motion
.menu-item
{
opacity
:
0
}
.sidebar
{
bottom
:
0
;
top
:
0
}
.sidebar-inner
{
color
:
#999
;
padding
:
18px
10px
;
text-align
:
center
}
.cc-license
{
margin-top
:
10px
;
text-align
:
center
}
.cc-license
.cc-opacity
{
border-bottom
:
none
;
opacity
:
.7
}
.cc-license
.cc-opacity
:hover
{
opacity
:
.9
}
.cc-license
img
{
display
:
inline-block
}
.site-author-image
{
border
:
1px
solid
#eee
;
display
:
block
;
margin
:
0
auto
;
max-width
:
120px
;
padding
:
2px
;
border-radius
:
50%
;
transition
:
2s
all
}
.site-author-name
{
color
:
var
(
--text-color
);
font-weight
:
600
;
margin
:
0
;
text-align
:
center
}
.site-description
{
color
:
#999
;
font-size
:
.8125em
;
margin-top
:
0
;
text-align
:
center
}
.links-of-author
a
,
.links-of-author
span
.exturl
{
border-bottom-color
:
#555
;
display
:
inline-block
;
font-size
:
.8125em
;
margin-bottom
:
10px
;
margin-right
:
10px
;
vertical-align
:
middle
}
.links-of-author
a
::before
,
.links-of-author
span
.exturl
::before
{
background
:
#f18e55
;
border-radius
:
50%
;
content
:
' '
;
display
:
inline-block
;
height
:
4px
;
margin-right
:
3px
;
vertical-align
:
middle
;
width
:
4px
}
.sidebar-button
a
{
border-radius
:
4px
;
padding
:
0
15px
}
.sidebar-button
a
.fa
,
.sidebar-button
a
.fab
,
.sidebar-button
a
.far
,
.sidebar-button
a
.fas
{
margin-right
:
5px
}
.links-of-blogroll
{
font-size
:
.8125em
;
margin-top
:
10px
}
.links-of-blogroll-title
{
font-size
:
.875em
;
font-weight
:
600
;
margin-top
:
0
}
.links-of-blogroll-list
{
list-style
:
none
;
margin
:
0
;
padding
:
0
}
#sidebar-dimmer
{
display
:
none
}
@media
(
max-width
:
767px
){
#sidebar-dimmer
{
background
:
#000
;
display
:
block
;
height
:
100%
;
left
:
100%
;
opacity
:
0
;
position
:
fixed
;
top
:
0
;
width
:
100%
;
z-index
:
1100
}
.sidebar-active
+
#sidebar-dimmer
{
opacity
:
.7
;
transform
:
translateX
(
-100%
);
transition
:
opacity
.5s
}}
.back-to-top
,
.post-toc
ol
a
,
.posts-collapse
.post-header
,
.posts-collapse
.post-header
::before
,
.posts-expand
.post-title-link
::before
{
transition-delay
:
0s
;
transition-duration
:
.2s
;
transition-timing-function
:
ease-in-out
}
.sidebar-nav
{
margin
:
0
;
padding-bottom
:
20px
;
padding-left
:
0
}
.sidebar-nav
li
{
border-bottom
:
1px
solid
transparent
;
color
:
var
(
--text-color
);
cursor
:
pointer
;
display
:
inline-block
;
font-size
:
.875em
}
.sidebar-nav
li
.sidebar-nav-overview
{
margin-left
:
10px
}
.sidebar-nav
li
:hover
{
color
:
#fc6423
}
.sidebar-nav
.sidebar-nav-active
{
border-bottom-color
:
#fc6423
;
color
:
#fc6423
}
.sidebar-nav
.sidebar-nav-active
:hover
{
color
:
#fc6423
}
.sidebar-panel
{
display
:
none
;
overflow-x
:
hidden
;
overflow-y
:
auto
}
.sidebar-panel-active
{
display
:
block
}
.sidebar-toggle
{
background
:
#222
;
bottom
:
45px
;
cursor
:
pointer
;
height
:
14px
;
left
:
30px
;
padding
:
5px
;
position
:
fixed
;
width
:
14px
;
z-index
:
1300
}
@media
(
max-width
:
991px
){
.sidebar-toggle
{
left
:
20px
;
opacity
:
.8
;
display
:
none
}}
.sidebar-toggle
:hover
.toggle-line
{
background
:
#fc6423
}
.post-toc
{
font-size
:
.875em
}
.post-toc
ol
{
list-style
:
none
;
margin
:
0
;
padding
:
0
2px
5px
10px
;
text-align
:
left
}
.post-toc
ol
>
ol
{
padding-left
:
0
}
.post-toc
ol
a
{
transition-property
:
all
}
.post-toc
.nav-item
{
line-height
:
1.8
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
}
.post-toc
.nav
.active-current
>
.nav-child
,
.post-toc
.nav
.active-current
>
.nav-child
>
.nav-item
,
.post-toc
.nav
.active
>
.nav-child
,
.post-toc
.nav
.nav-child
{
display
:
block
}
.post-toc
.nav
.active
>
a
{
border-bottom-color
:
#fc6423
;
color
:
#fc6423
}
.post-toc
.nav
.active-current
>
a
,
.post-toc
.nav
.active-current
>
a
:hover
{
color
:
#fc6423
}
.site-state
{
display
:
flex
;
justify-content
:
center
;
line-height
:
1.4
;
margin-top
:
10px
;
overflow
:
hidden
;
text-align
:
center
;
white-space
:
nowrap
}
.site-state-item
:not
(
:first-child
)
{
border-left
:
1px
solid
#eee
}
.site-state-item
a
{
border-bottom
:
none
}
.site-state-item-count
{
display
:
block
;
font-size
:
1em
;
font-weight
:
600
;
text-align
:
center
}
.languages
,
.powered-by
,
.theme-info
,
.with-love
{
display
:
inline-block
}
.site-state-item-name
{
color
:
#999
;
font-size
:
.8125em
}
.footer
{
color
:
#999
;
font-size
:
.875em
;
padding
:
20px
0
}
.footer.footer-fixed
{
bottom
:
0
;
left
:
0
;
position
:
absolute
;
right
:
0
}
.footer-inner
{
box-sizing
:
border-box
;
margin
:
0
auto
;
text-align
:
center
;
width
:
calc
(
100%
-
20px
)}
@media
(
min-width
:
1200px
){
.footer-inner
{
width
:
1160px
}}
@media
(
min-width
:
1600px
){
.footer-inner
{
width
:
73%
}}
.languages
{
font-size
:
1.125em
;
position
:
relative
}
.languages
.lang-select-label
span
{
margin
:
0
.5em
}
.languages
.lang-select
{
height
:
100%
;
left
:
0
;
opacity
:
0
;
position
:
absolute
;
top
:
0
;
width
:
100%
}
.with-love
{
color
:
red
;
margin
:
0
5px
}
@-moz-keyframes
iconAnimate
{
0
%,
100
%
{
transform
:
scale
(
1
)}
10
%,
30
%
{
transform
:
scale
(
.9
)}
20
%,
40
%,
50
%,
60
%,
70
%,
80
%
{
transform
:
scale
(
1.1
)}}
@-webkit-keyframes
iconAnimate
{
0
%,
100
%
{
transform
:
scale
(
1
)}
10
%,
30
%
{
transform
:
scale
(
.9
)}
20
%,
40
%,
50
%,
60
%,
70
%,
80
%
{
transform
:
scale
(
1.1
)}}
@-o-keyframes
iconAnimate
{
0
%,
100
%
{
transform
:
scale
(
1
)}
10
%,
30
%
{
transform
:
scale
(
.9
)}
20
%,
40
%,
50
%,
60
%,
70
%,
80
%
{
transform
:
scale
(
1.1
)}}
@keyframes
iconAnimate
{
0
%,
100
%
{
transform
:
scale
(
1
)}
10
%,
30
%
{
transform
:
scale
(
.9
)}
20
%,
40
%,
50
%,
60
%,
70
%,
80
%
{
transform
:
scale
(
1.1
)}}
.back-to-top
{
font-size
:
12px
;
text-align
:
center
;
background
:
#222
;
bottom
:
-100px
;
box-sizing
:
border-box
;
color
:
#fff
;
cursor
:
pointer
;
opacity
:
.6
;
padding
:
0
6px
;
position
:
fixed
;
transition-property
:
bottom
;
z-index
:
1300
;
width
:
24px
}
.back-to-top
span
{
display
:
none
}
.back-to-top
:hover
{
color
:
#fc6423
}
.back-to-top.back-to-top-on
{
bottom
:
30px
}
@media
(
max-width
:
991px
){
.back-to-top
{
left
:
20px
;
opacity
:
.8
}}
@media
(
min-width
:
1200px
){
.post-body
{
font-size
:
1.125em
}}
.post-body
.exturl
.fa
{
font-size
:
.875em
;
margin-left
:
4px
}
.post-body
.figure
.caption
,
.post-body
.image-caption
{
color
:
#999
;
font-size
:
.875em
;
font-weight
:
700
;
line-height
:
1
;
margin
:
-20px
auto
15px
;
text-align
:
center
}
.post-sticky-flag
{
display
:
inline-block
;
transform
:
rotate
(
30deg
)}
.post-button
{
margin-top
:
40px
;
text-align
:
center
}
.use-motion
.collection-header
,
.use-motion
.comments
,
.use-motion
.pagination
,
.use-motion
.post-block
,
.use-motion
.post-body
,
.use-motion
.post-header
{
opacity
:
0
}
.posts-collapse
{
margin-left
:
35px
;
position
:
relative
}
@media
(
max-width
:
767px
){
.posts-collapse
{
margin-left
:
0
;
margin-right
:
0
}}
.posts-collapse
.collection-title
{
font-size
:
1.125em
;
position
:
relative
}
.posts-collapse
.collection-title
::before
{
background
:
#999
;
border
:
1px
solid
#fff
;
border-radius
:
50%
;
content
:
' '
;
height
:
10px
;
left
:
0
;
margin-left
:
-6px
;
margin-top
:
-4px
;
position
:
absolute
;
top
:
50%
;
width
:
10px
}
.posts-collapse
.collection-year
{
font-size
:
1.5em
;
font-weight
:
700
;
margin
:
60px
0
;
position
:
relative
}
.posts-collapse
.collection-year
::before
{
background
:
#bbb
;
border-radius
:
50%
;
content
:
' '
;
height
:
8px
;
left
:
0
;
margin-left
:
-4px
;
margin-top
:
-4px
;
position
:
absolute
;
top
:
50%
;
width
:
8px
}
.posts-collapse
.collection-header
{
display
:
block
;
margin
:
0
0
0
20px
}
.posts-collapse
.collection-header
small
{
color
:
#bbb
;
margin-left
:
5px
}
.posts-collapse
.post-header
{
border-bottom
:
1px
dashed
#ccc
;
margin
:
30px
0
;
padding-left
:
15px
;
position
:
relative
;
transition-property
:
border
}
.posts-collapse
.post-header
::before
,
.posts-collapse
::before
{
content
:
' '
;
position
:
absolute
;
left
:
0
}
.posts-collapse
.post-header
::before
{
background
:
#bbb
;
border
:
1px
solid
#fff
;
border-radius
:
50%
;
height
:
6px
;
margin-left
:
-4px
;
top
:
.75em
;
transition-property
:
background
;
width
:
6px
}
.posts-collapse
.post-header
:hover
{
border-bottom-color
:
#666
}
.posts-collapse
.post-header
:hover::before
{
background
:
#222
}
.posts-collapse
.post-meta
{
display
:
inline
;
font-size
:
.75em
;
margin-right
:
10px
}
.posts-collapse
.post-title
{
display
:
inline
}
.posts-collapse
.post-title
a
,
.posts-collapse
.post-title
span
.exturl
{
border-bottom
:
none
;
color
:
var
(
--link-color
)}
.posts-collapse
.post-title
.fa-external-link-alt
{
font-size
:
.875em
;
margin-left
:
5px
}
.posts-collapse
::before
{
background
:
#f5f5f5
;
height
:
100%
;
margin-left
:
-2px
;
top
:
1.25em
;
width
:
4px
}
.post-eof
{
background
:
#ccc
;
height
:
1px
;
margin
:
80px
auto
60px
;
text-align
:
center
;
width
:
8%
}
.post-block
:last-of-type
.post-eof
{
display
:
none
}
.content
{
padding-top
:
40px
}
@media
(
min-width
:
992px
){
.post-body
{
text-align
:
justify
}}
@media
(
max-width
:
991px
){
.post-body
{
text-align
:
justify
}}
.post-body
h1
,
.post-body
h2
,
.post-body
h3
,
.post-body
h4
,
.post-body
h5
,
.post-body
h6
{
padding-top
:
10px
}
.post-body
h1
.header-anchor
,
.post-body
h2
.header-anchor
,
.post-body
h3
.header-anchor
,
.post-body
h4
.header-anchor
,
.post-body
h5
.header-anchor
,
.post-body
h6
.header-anchor
{
border-bottom-style
:
none
;
color
:
#ccc
;
float
:
right
;
margin-left
:
10px
;
visibility
:
hidden
}
.post-body
h1
.header-anchor
:hover
,
.post-body
h2
.header-anchor
:hover
,
.post-body
h3
.header-anchor
:hover
,
.post-body
h4
.header-anchor
:hover
,
.post-body
h5
.header-anchor
:hover
,
.post-body
h6
.header-anchor
:hover
{
color
:
inherit
}
.post-body
h1
:hover
.header-anchor
,
.post-body
h2
:hover
.header-anchor
,
.post-body
h3
:hover
.header-anchor
,
.post-body
h4
:hover
.header-anchor
,
.post-body
h5
:hover
.header-anchor
,
.post-body
h6
:hover
.header-anchor
{
visibility
:
visible
}
.post-body
iframe
,
.post-body
img
,
.post-body
video
{
margin-bottom
:
20px
}
.post-body
.video-container
{
height
:
0
;
margin-bottom
:
20px
;
overflow
:
hidden
;
padding-top
:
75%
;
position
:
relative
;
width
:
100%
}
.post-body
.video-container
embed
,
.post-body
.video-container
iframe
,
.post-body
.video-container
object
{
height
:
100%
;
left
:
0
;
margin
:
0
;
position
:
absolute
;
top
:
0
;
width
:
100%
}
.post-gallery
{
align-items
:
center
;
display
:
grid
;
grid-gap
:
10px
;
grid-template-columns
:
1
fr
1
fr
1
fr
;
margin-bottom
:
20px
}
.post-gallery
a
{
border
:
0
}
.post-gallery
img
{
margin
:
0
}
.posts-expand
.post-header
{
font-size
:
1.125em
}
.posts-expand
.post-title
{
font-size
:
1.5em
;
font-weight
:
400
;
margin
:
initial
;
text-align
:
center
;
overflow-wrap
:
break-word
;
word-wrap
:
break-word
}
.posts-expand
.post-title-link
{
border-bottom
:
none
;
color
:
var
(
--link-color
);
display
:
inline-block
;
position
:
relative
;
vertical-align
:
top
}
.posts-expand
.post-title-link
::before
{
background
:
var
(
--link-color
);
bottom
:
0
;
content
:
''
;
height
:
2px
;
left
:
0
;
position
:
absolute
;
transform
:
scaleX
(
0
);
visibility
:
hidden
;
width
:
100%
}
.posts-expand
.post-title-link
:hover::before
{
transform
:
scaleX
(
1
);
visibility
:
visible
}
.posts-expand
.post-title-link
.fa-external-link-alt
{
font-size
:
.875em
;
margin-left
:
5px
}
.posts-expand
.post-meta
{
color
:
#999
;
font-size
:
.75em
;
margin
:
3px
0
60px
;
text-align
:
center
}
.posts-expand
.post-meta
.post-description
{
font-size
:
.875em
;
margin-top
:
2px
}
.posts-expand
.post-meta
time
{
border-bottom
:
1px
dashed
#999
;
cursor
:
pointer
}
.post-meta
.post-meta-item
+
.post-meta-item
::before
{
content
:
'|'
;
margin
:
0
.5em
}
.post-meta-divider
{
margin
:
0
.5em
}
.post-meta-item-icon
{
margin-right
:
3px
}
@media
(
max-width
:
991px
){
.post-meta-item-icon
{
display
:
inline-block
}
.post-meta-item-text
{
display
:
none
}}
.post-nav
{
border-top
:
1px
solid
#eee
;
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
15px
;
padding
:
10px
5px
0
}
.post-nav-item
{
flex
:
1
}
.post-nav-item
a
{
border-bottom
:
none
;
display
:
block
;
font-size
:
.875em
;
line-height
:
1.6
;
position
:
relative
}
.post-nav-item
a
:active
{
top
:
2px
}
.post-nav-item
.fa
{
font-size
:
.75em
}
.post-nav-item
:first-child
{
margin-right
:
15px
}
.post-nav-item
:first-child
.fa
{
margin-right
:
5px
}
.post-nav-item
:last-child
{
margin-left
:
15px
;
text-align
:
right
}
#qr
p
,
.category-all-page
.category-all-title
,
.event-list
.event
.event-details
::before
,
.post-tags
,
.post-widgets
,
.reward-container
,
.sidebar-button
,
.social-like
,
.tag-cloud
,
.wp_rating
,
ul
.breadcrumb
{
text-align
:
center
}
.post-nav-item
:last-child
.fa
{
margin-left
:
5px
}
.rtl.post-body
a
,
.rtl.post-body
h1
,
.rtl.post-body
h2
,
.rtl.post-body
h3
,
.rtl.post-body
h4
,
.rtl.post-body
h5
,
.rtl.post-body
h6
,
.rtl.post-body
li
,
.rtl.post-body
ol
,
.rtl.post-body
p
,
.rtl.post-body
ul
{
direction
:
rtl
;
font-family
:
UKIJ
Ekran
}
.rtl.post-title
{
font-family
:
UKIJ
Ekran
}
.post-tags
{
margin-top
:
40px
}
.post-tags
a
{
display
:
inline-block
;
font-size
:
.8125em
}
.post-tags
a
:not
(
:last-child
)
{
margin-right
:
10px
}
.post-widgets
{
border-top
:
1px
solid
#eee
;
margin-top
:
15px
}
.wp_rating
{
height
:
20px
;
line-height
:
20px
;
margin-top
:
10px
;
padding-top
:
6px
}
.social-like
{
display
:
flex
;
font-size
:
.875em
;
justify-content
:
center
}
.reward-container
{
margin
:
20px
auto
;
padding
:
10px
0
;
width
:
90%
}
.reward-container
button
{
background
:
#ff2a2a
;
border
:
0
;
border-radius
:
5px
;
color
:
#fff
;
cursor
:
pointer
;
line-height
:
2
;
outline
:
0
;
padding
:
0
15px
;
vertical-align
:
text-top
}
.reward-container
button
:hover
{
background
:
#f55
}
#qr
{
padding-top
:
20px
}
#qr
a
{
border
:
0
}
#qr
img
{
display
:
inline-block
;
margin
:
.8em
2em
0
;
max-width
:
100%
;
width
:
180px
}
.post-copyright
{
background
:
var
(
--card-bg-color
);
border-left
:
3px
solid
#ff2a2a
;
list-style
:
none
;
margin
:
2em
0
0
;
padding
:
.5em
1em
}
.my_post_copyright
{
width
:
85%
;
max-width
:
45em
;
margin
:
2.8em
auto
0
;
padding
:
.5em
1em
;
border
:
1px
solid
#d3d3d3
;
font-size
:
.93rem
;
line-height
:
1.6em
;
word-break
:
break-all
;
background
:
rgba
(
255
,
255
,
255
,
.4
)}
.my_post_copyright
p
{
margin
:
0
}
.my_post_copyright
span
{
display
:
inline-block
;
width
:
5.2em
;
color
:
#333
;
font-weight
:
700
}
.my_post_copyright
.raw
{
margin-left
:
1em
;
width
:
5em
}
.my_post_copyright
a
{
color
:
grey
;
border-bottom
:
0
}
.my_post_copyright
a
:hover
{
color
:
#0593d3
;
text-decoration
:
underline
}
.my_post_copyright
:hover
.fa-clipboard
{
color
:
#000
}
.my_post_copyright
.post-url
:hover
{
font-weight
:
400
}
.my_post_copyright
.copy-path
{
margin-left
:
1em
;
width
:
1em
}
@media
(
max-width
:
767px
){
.post-gallery
{
grid-template-columns
:
1
fr
1
fr
}
.my_post_copyright
.copy-path
{
display
:
none
}}
.my_post_copyright
.copy-path
:hover
{
color
:
grey
;
cursor
:
pointer
}
.category-all-page
.category-all
{
margin-top
:
20px
}
.category-all-page
.category-list
{
list-style
:
none
;
margin
:
0
;
padding
:
0
}
.category-all-page
.category-list-item
{
margin
:
5px
10px
}
.category-all-page
.category-list-count
{
color
:
#bbb
}
.category-all-page
.category-list-count
::before
{
content
:
' ('
;
display
:
inline
}
.category-all-page
.category-list-count
::after
{
content
:
') '
;
display
:
inline
}
.category-all-page
.category-list-child
{
padding-left
:
10px
}
.event-list
{
padding
:
0
}
.event-list
hr
{
background
:
#222
;
margin
:
20px
0
45px
}
.event-list
hr
::after
{
background
:
#222
;
color
:
#fff
;
content
:
'NOW'
;
display
:
inline-block
;
font-weight
:
700
;
padding
:
0
5px
;
text-align
:
right
}
.event-list
.event
{
background
:
#222
;
margin
:
20px
0
;
min-height
:
40px
;
padding
:
15px
0
15px
10px
}
.event-list
.event
.event-summary
{
color
:
#fff
;
margin
:
0
;
padding-bottom
:
3px
}
.event-list
.event
.event-summary
::before
{
animation
:
dot-flash
1s
alternate
infinite
ease-in-out
;
color
:
#fff
;
content
:
'\f111'
;
display
:
inline-block
;
font-size
:
10px
;
margin-right
:
25px
;
vertical-align
:
middle
;
font-family
:
'Font Awesome 5 Free'
;
font-weight
:
900
}
.event-list
.event
.event-relative-time
{
color
:
#bbb
;
display
:
inline-block
;
font-size
:
12px
;
font-weight
:
400
;
padding-left
:
12px
}
.event-list
.event
.event-details
{
color
:
#fff
;
display
:
block
;
line-height
:
18px
;
margin-left
:
56px
;
padding-bottom
:
6px
;
padding-top
:
3px
;
text-indent
:
-24px
}
.event-list
.event
.event-details
::before
{
color
:
#fff
;
display
:
inline-block
;
margin-right
:
9px
;
text-indent
:
0
;
width
:
14px
;
font-family
:
'Font Awesome 5 Free'
;
font-weight
:
900
}
.event-list
.event
.event-details.event-location
::before
{
content
:
'\f041'
}
.event-list
.event
.event-details.event-duration
::before
{
content
:
'\f017'
}
.event-list
.event-past
{
background
:
#f5f5f5
}
.event-list
.event-past
.event-details
,
.event-list
.event-past
.event-summary
{
color
:
#bbb
;
opacity
:
.9
}
.event-list
.event-past
.event-details
::before
,
.event-list
.event-past
.event-summary
::before
{
animation
:
none
;
color
:
#bbb
}
@-moz-keyframes
dot-flash
{
from
{
opacity
:
1
;
transform
:
scale
(
1
)}
to
{
opacity
:
0
;
transform
:
scale
(
.8
)}}
@-webkit-keyframes
dot-flash
{
from
{
opacity
:
1
;
transform
:
scale
(
1
)}
to
{
opacity
:
0
;
transform
:
scale
(
.8
)}}
@-o-keyframes
dot-flash
{
from
{
opacity
:
1
;
transform
:
scale
(
1
)}
to
{
opacity
:
0
;
transform
:
scale
(
.8
)}}
@keyframes
dot-flash
{
from
{
opacity
:
1
;
transform
:
scale
(
1
)}
to
{
opacity
:
0
;
transform
:
scale
(
.8
)}}
ul
.breadcrumb
{
font-size
:
.75em
;
list-style
:
none
;
margin
:
1em
0
;
padding
:
0
2em
}
ul
.breadcrumb
li
{
display
:
inline
}
ul
.breadcrumb
li
+
li
::before
{
content
:
'/\00a0'
;
font-weight
:
400
;
padding
:
.5em
}
ul
.breadcrumb
li
+
li
:last-child
{
font-weight
:
700
}
.tag-cloud
a
{
display
:
inline-block
;
margin
:
10px
}
.tag-cloud
a
:hover
{
color
:
var
(
--link-hover-color
)
!important
}
.header
{
margin
:
0
auto
;
position
:
relative
;
width
:
calc
(
100%
-
20px
)}
@media
(
min-width
:
1200px
){
.header
{
width
:
1160px
}}
@media
(
min-width
:
1600px
){
.header
{
width
:
73%
}}
@media
(
max-width
:
991px
){
.header
{
width
:
auto
}}
.header-inner
{
background
:
var
(
--content-bg-color
);
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
);
overflow
:
hidden
;
padding
:
0
;
position
:
absolute
;
top
:
0
;
width
:
240px
}
@media
(
min-width
:
1200px
){
.header-inner
{
width
:
240px
}}
.main-inner
{
align-items
:
flex-start
;
display
:
flex
;
justify-content
:
space-between
;
flex-direction
:
row-reverse
}
@media
(
max-width
:
991px
){
.header-inner
{
border-radius
:
initial
;
position
:
relative
;
width
:
auto
}
.main-inner
{
width
:
auto
}}
.content-wrap
{
border-radius
:
initial
;
box-sizing
:
border-box
;
width
:
calc
(
100%
-
252px
)}
@media
(
max-width
:
991px
){
.content-wrap
{
border-radius
:
initial
;
padding
:
20px
;
width
:
100%
}}
.footer-inner
{
padding-left
:
260px
}
.back-to-top
{
left
:
auto
;
right
:
30px
}
.site-brand-container
{
background
:
#222
}
@media
(
max-width
:
991px
){
.back-to-top
{
right
:
20px
}
.footer-inner
{
padding-left
:
0
;
padding-right
:
0
;
width
:
auto
}
.site-brand-container
{
box-shadow
:
0
0
16px
rgba
(
0
,
0
,
0
,
.5
)}
.custom-logo-image
{
display
:
none
}}
.site-meta
{
padding
:
20px
0
}
.brand
{
padding
:
0
}
.site-subtitle
{
margin
:
10px
10px
0
}
.custom-logo-image
{
margin-top
:
20px
}
.site-nav-right
.toggle
,
.site-nav-toggle
.toggle
{
color
:
#fff
}
.site-nav-right
.toggle
.toggle-line
,
.site-nav-toggle
.toggle
.toggle-line
{
background
:
#fff
}
@media
(
min-width
:
768px
)
and
(
max-width
:
991px
){
.site-nav-right
,
.site-nav-toggle
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
}
.site-nav
{
display
:
none
}}
.menu
.menu-item
{
display
:
block
;
margin
:
0
}
.menu
.menu-item
a
,
.menu
.menu-item
span
.exturl
{
padding
:
5px
20px
;
position
:
relative
;
text-align
:
left
;
transition-property
:
background-color
}
@media
(
max-width
:
991px
){
.menu
.menu-item.menu-item-search
{
display
:
none
}}
.menu
.menu-item
.badge
{
background
:
#ccc
;
border-radius
:
10px
;
color
:
#fff
;
float
:
right
;
padding
:
2px
5px
;
text-shadow
:
1px
1px
0
rgba
(
0
,
0
,
0
,
.1
);
vertical-align
:
middle
}
.main-menu
.menu-item-active
a
::after
{
background
:
#bbb
;
border-radius
:
50%
;
content
:
' '
;
height
:
6px
;
margin-top
:
-3px
;
position
:
absolute
;
right
:
15px
;
top
:
50%
;
width
:
6px
}
.sidebar-inner
,
.sub-menu
{
background
:
var
(
--content-bg-color
)}
.sub-menu
{
margin
:
0
;
padding
:
6px
0
}
.sub-menu
.menu-item
{
display
:
inline-block
}
.sub-menu
.menu-item
a
,
.sub-menu
.menu-item
span
.exturl
{
background
:
0
0
;
margin
:
5px
10px
;
padding
:
initial
}
.sub-menu
.menu-item
a
:hover
,
.sub-menu
.menu-item
span
.exturl
:hover
{
background
:
0
0
;
color
:
#fc6423
}
.sub-menu
.menu-item-active
a
{
border-bottom-color
:
#fc6423
;
color
:
#fc6423
}
.sub-menu
.menu-item-active
a
:hover
{
border-bottom-color
:
#fc6423
}
.sidebar
{
background
:
var
(
--body-bg-color
);
box-shadow
:
none
;
margin-top
:
100%
;
position
:
static
;
width
:
240px
}
@media
(
max-width
:
991px
){
.sidebar
{
display
:
none
}}
.sidebar-toggle
{
display
:
none
}
.sidebar-inner
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
);
box-sizing
:
border-box
;
color
:
var
(
--text-color
);
width
:
240px
;
opacity
:
0
}
.sidebar-inner.affix
{
position
:
fixed
;
top
:
12px
}
.sidebar-inner.affix-bottom
{
position
:
absolute
}
.site-state-item
{
padding
:
0
10px
}
.sidebar-button
{
border-bottom
:
1px
dotted
#ccc
;
border-top
:
1px
dotted
#ccc
;
margin-top
:
10px
}
.sidebar-button
a
{
border
:
0
;
color
:
#fc6423
;
display
:
block
}
.sidebar-button
a
:hover
{
background
:
0
0
;
border
:
0
;
color
:
#e34603
}
.sidebar-button
a
:hover
.fa
,
.sidebar-button
a
:hover
.fab
,
.sidebar-button
a
:hover
.far
,
.sidebar-button
a
:hover
.fas
{
color
:
#e34603
}
.links-of-author
{
display
:
flex
;
flex-wrap
:
wrap
;
margin-top
:
10px
;
justify-content
:
center
}
.links-of-author-item
{
margin
:
5px
0
0
;
width
:
50%
}
.comments
,
.post-block
+
.post-block
{
margin-top
:
12px
}
.links-of-author-item
a
,
.links-of-author-item
span
.exturl
{
box-sizing
:
border-box
;
margin-bottom
:
0
;
margin-right
:
0
;
max-width
:
216px
;
overflow
:
hidden
;
padding
:
0
5px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
border-bottom
:
none
;
display
:
block
;
text-decoration
:
none
}
.links-of-author-item
a
::before
,
.links-of-author-item
span
.exturl
::before
,
.post-eof
{
display
:
none
}
.links-of-author-item
a
:hover
,
.links-of-author-item
span
.exturl
:hover
{
background
:
var
(
--body-bg-color
);
border-radius
:
4px
}
.links-of-author-item
.fa
,
.links-of-author-item
.fab
,
.links-of-author-item
.far
,
.links-of-author-item
.fas
{
margin-right
:
2px
}
.links-of-blogroll-item
{
padding
:
0
}
.content-wrap
{
background
:
initial
;
box-shadow
:
initial
;
padding
:
initial
}
.comments
,
.post-block
{
padding
:
40px
;
background
:
var
(
--content-bg-color
)}
.post-block
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
)}
.comments
,
.pagination
,
.post-block
+
.post-block
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
)}
.tabs-comment
{
margin-top
:
1em
}
.content
{
padding-top
:
initial
}
.pagination
{
background
:
var
(
--content-bg-color
);
border-top
:
initial
;
margin
:
12px
0
0
;
padding
:
10px
0
}
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
{
margin-bottom
:
initial
;
top
:
initial
}
.main
{
padding-bottom
:
initial
}
.footer
{
bottom
:
auto
}
.sub-menu
{
border-bottom
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
)}
.sub-menu
+
.content
.post-block
{
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
);
margin-top
:
12px
}
@media
(
min-width
:
768px
)
and
(
max-width
:
991px
){
.sub-menu
+
.content
.post-block
{
margin-top
:
10px
}}
@media
(
max-width
:
767px
){
.sub-menu
+
.content
.post-block
{
margin-top
:
8px
}}
.post-body
h1
,
.post-body
h2
{
border-bottom
:
1px
solid
#eee
}
.post-body
h3
{
border-bottom
:
1px
dotted
#eee
}
@media
(
min-width
:
768px
)
and
(
max-width
:
991px
){
.content-wrap
{
padding
:
10px
}
.posts-expand
.post-button
{
margin-top
:
20px
}
.comments
,
.post-block
+
.post-block
{
margin-top
:
10px
}
.post-block
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
);
padding
:
20px
}
.comments
{
padding
:
10px
20px
}
.pagination
{
margin
:
10px
0
0
}}
@media
(
max-width
:
767px
){
.content-wrap
{
padding
:
8px
}
.posts-expand
.post-button
{
margin
:
12px
0
}
.comments
,
.post-block
+
.post-block
{
margin-top
:
8px
}
.post-block
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
);
min-height
:
auto
;
padding
:
12px
}
.comments
{
padding
:
10px
12px
}
.pagination
{
margin
:
8px
0
0
}}
\ No newline at end of file
code
,
h5
,
kbd
,
pre
,
samp
{
font-size
:
1em
}
button
,
hr
,
input
{
overflow
:
visible
}
progress
,
sub
,
sup
{
vertical-align
:
baseline
}
.table-container
,
pre
,
textarea
{
overflow
:
auto
}
p
,
table
{
margin
:
0
0
20px
}
:root
{
--body-bg-color
:
#eee
;
--content-bg-color
:
#fff
;
--card-bg-color
:
#f5f5f5
;
--text-color
:
#555
;
--blockquote-color
:
#666
;
--link-color
:
#555
;
--link-hover-color
:
#222
;
--brand-color
:
#fff
;
--brand-hover-color
:
#fff
;
--table-row-odd-bg-color
:
#f9f9f9
;
--table-row-hover-bg-color
:
#f5f5f5
;
--menu-item-bg-color
:
#f5f5f5
;
--btn-default-bg
:
#fff
;
--btn-default-color
:
#555
;
--btn-default-border-color
:
#555
;
--btn-default-hover-bg
:
#222
;
--btn-default-hover-color
:
#fff
;
--btn-default-hover-border-color
:
#222
}
html
{
line-height
:
1.15
;
-webkit-text-size-adjust
:
100%
}
details
,
main
{
display
:
block
}
hr
{
box-sizing
:
content-box
}
a
{
background
:
0
0
}
abbr
[
title
]
{
border-bottom
:
none
;
text-decoration
:
underline
;
text-decoration
:
underline
dotted
}
b
,
strong
{
font-weight
:
bolder
}
code
,
kbd
,
samp
{
font-family
:
monospace
,
monospace
}
small
{
font-size
:
80%
}
sub
,
sup
{
font-size
:
75%
;
line-height
:
0
;
position
:
relative
}
sub
{
bottom
:
-.25em
}
sup
{
top
:
-.5em
}
img
{
border-style
:
none
}
button
,
input
,
optgroup
,
select
,
textarea
{
font-family
:
inherit
;
font-size
:
100%
;
line-height
:
1.15
;
margin
:
0
}
button
,
select
{
text-transform
:
none
}
[
type
=
button
],[
type
=
reset
],[
type
=
submit
],
button
{
-webkit-appearance
:
button
}
[
type
=
button
]
::-moz-focus-inner
,[
type
=
reset
]
::-moz-focus-inner
,[
type
=
submit
]
::-moz-focus-inner
,
button
::-moz-focus-inner
{
border-style
:
none
;
padding
:
0
}
[
type
=
button
]
:-moz-focusring
,[
type
=
reset
]
:-moz-focusring
,[
type
=
submit
]
:-moz-focusring
,
button
:-moz-focusring
{
outline
:
ButtonText
dotted
1px
}
fieldset
{
padding
:
.35em
.75em
.625em
}
legend
{
box-sizing
:
border-box
;
color
:
inherit
;
display
:
table
;
max-width
:
100%
;
padding
:
0
;
white-space
:
normal
}
.post-body
,
a
,
code
,
span
.exturl
{
overflow-wrap
:
break-word
;
word-wrap
:
break-word
}
[
type
=
checkbox
],[
type
=
radio
]
{
box-sizing
:
border-box
;
padding
:
0
}
[
type
=
number
]
::-webkit-inner-spin-button
,[
type
=
number
]
::-webkit-outer-spin-button
{
height
:
auto
}
[
type
=
search
]
{
outline-offset
:
-2px
;
-webkit-appearance
:
textfield
}
[
type
=
search
]
::-webkit-search-decoration
{
-webkit-appearance
:
none
}
::-webkit-file-upload-button
{
font
:
inherit
;
-webkit-appearance
:
button
}
.btn
,
body
{
line-height
:
2
}
.post-body
,
.posts-expand
.post-meta
,
.site-title
,
body
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
font-family
:
Lato
,
"PingFang SC"
,
"Microsoft YaHei"
,
sans-serif
}
summary
{
display
:
list-item
}
[
hidden
],
template
{
display
:
none
}
::selection
{
background
:
#262a30
;
color
:
#eee
}
body
,
html
{
height
:
100%
}
body
{
margin
:
0
;
background
:
var
(
--body-bg-color
);
color
:
var
(
--text-color
);
font-size
:
1em
}
@media
(
max-width
:
991px
){
body
{
padding-left
:
0
!important
;
padding-right
:
0
!important
}}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
font-weight
:
700
;
line-height
:
1.5
;
margin
:
20px
0
15px
}
h1
{
font-size
:
1.5em
}
h2
{
font-size
:
1.375em
}
h3
{
font-size
:
1.25em
}
h4
{
font-size
:
1.125em
}
.btn
,
.highlight
figcaption
,
h6
,
pre
code
,
table
{
font-size
:
.875em
}
a
,
span
.exturl
{
border-bottom
:
1px
solid
#999
;
color
:
var
(
--link-color
);
outline
:
0
;
text-decoration
:
none
;
cursor
:
pointer
}
a
:hover
,
span
.exturl
:hover
{
border-bottom-color
:
var
(
--link-hover-color
);
color
:
var
(
--link-hover-color
)}
iframe
,
img
,
video
{
display
:
block
;
margin-left
:
auto
;
margin-right
:
auto
;
max-width
:
100%
}
hr
{
background-image
:
repeating-linear-gradient
(
-45deg
,
#ddd
,
#ddd
4px
,
transparent
4px
,
transparent
8px
);
border
:
0
;
height
:
3px
;
margin
:
40px
0
}
blockquote
{
border-left
:
4px
solid
#ddd
;
color
:
var
(
--blockquote-color
);
margin
:
0
;
padding
:
0
15px
}
blockquote
cite
::before
{
content
:
'-'
;
padding
:
0
5px
}
dt
{
font-weight
:
700
}
dd
{
margin
:
0
;
padding
:
0
}
kbd
{
background-color
:
#f5f5f5
;
background-image
:
linear-gradient
(
#eee
,
#fff
,
#eee
);
border
:
1px
solid
#ccc
;
border-radius
:
.2em
;
box-shadow
:
.1em
.1em
.2em
rgba
(
0
,
0
,
0
,
.1
);
color
:
#555
;
font-family
:
inherit
;
padding
:
.1em
.3em
;
white-space
:
nowrap
}
table
{
border-collapse
:
collapse
;
border-spacing
:
0
;
width
:
100%
}
tbody
tr
:nth-of-type
(
odd
)
{
background
:
var
(
--table-row-odd-bg-color
)}
tbody
tr
:hover
{
background
:
var
(
--table-row-hover-bg-color
)}
caption
,
td
,
th
{
font-weight
:
400
;
padding
:
8px
;
text-align
:
left
;
vertical-align
:
middle
}
td
,
th
{
border
:
1px
solid
#ddd
;
border-bottom
:
3px
solid
#ddd
}
th
{
font-weight
:
700
;
padding-bottom
:
10px
}
td
{
border-bottom-width
:
1px
}
.btn
{
background
:
var
(
--btn-default-bg
);
border
:
2px
solid
var
(
--btn-default-border-color
);
border-radius
:
2px
;
color
:
var
(
--btn-default-color
);
display
:
inline-block
;
padding
:
0
20px
;
text-decoration
:
none
;
transition-property
:
background-color
;
transition-delay
:
0s
;
transition-duration
:
.2s
;
transition-timing-function
:
ease-in-out
}
.btn
:hover
{
background
:
var
(
--btn-default-hover-bg
);
border-color
:
var
(
--btn-default-hover-border-color
);
color
:
var
(
--btn-default-hover-color
)}
.btn
+
.btn
{
margin
:
0
0
8px
8px
}
.btn
.fa-fw
{
text-align
:
left
;
width
:
1.285714285714286em
}
.toggle
{
line-height
:
0
}
.toggle
.toggle-line
{
background
:
#fff
;
display
:
inline-block
;
height
:
2px
;
left
:
0
;
position
:
relative
;
top
:
0
;
transition
:
all
.4s
;
vertical-align
:
top
;
width
:
100%
}
.toggle
.toggle-line
:not
(
:first-child
)
{
margin-top
:
3px
}
.toggle.toggle-arrow
.toggle-line-first
{
left
:
50%
;
top
:
2px
;
transform
:
rotate
(
45deg
);
width
:
50%
}
.toggle.toggle-arrow
.toggle-line-middle
{
left
:
2px
;
width
:
90%
}
.toggle.toggle-arrow
.toggle-line-last
{
left
:
50%
;
top
:
-2px
;
transform
:
rotate
(
-45deg
);
width
:
50%
}
.toggle.toggle-close
.toggle-line-first
{
transform
:
rotate
(
-45deg
);
top
:
5px
}
.toggle.toggle-close
.toggle-line-middle
{
opacity
:
0
}
.toggle.toggle-close
.toggle-line-last
{
transform
:
rotate
(
45deg
);
top
:
-5px
}
.highlight
,
pre
{
background
:
#f7f7f7
;
color
:
#4d4d4c
;
line-height
:
1.6
;
margin
:
0
auto
20px
}
code
,
pre
{
font-family
:
consolas
,
Menlo
,
monospace
,
"PingFang SC"
,
"Microsoft YaHei"
}
code
{
background
:
#eee
;
border-radius
:
3px
;
color
:
#555
;
padding
:
2px
4px
}
.highlight
::selection
{
background
:
#d6d6d6
}
.highlight
pre
{
border
:
0
;
margin
:
0
;
padding
:
10px
0
}
.highlight
table
{
border
:
0
;
margin
:
0
;
width
:
auto
}
.highlight
td
{
border
:
0
;
padding
:
0
}
.highlight
figcaption
{
background
:
#eff2f3
;
color
:
#4d4d4c
;
display
:
flex
;
justify-content
:
space-between
;
line-height
:
1.2
;
padding
:
.5em
}
.highlight
figcaption
a
{
color
:
#4d4d4c
}
.highlight
figcaption
a
:hover
{
border-bottom-color
:
#4d4d4c
}
.highlight
.gutter
{
-moz-user-select
:
none
;
-ms-user-select
:
none
;
-webkit-user-select
:
none
;
user-select
:
none
}
.highlight
.gutter
pre
{
background
:
#eff2f3
;
color
:
#869194
;
padding-left
:
10px
;
padding-right
:
10px
;
text-align
:
right
}
.highlight
.code
pre
{
background
:
#f7f7f7
;
padding-left
:
10px
;
width
:
100%
}
.gist
table
{
width
:
auto
}
.gist
table
td
{
border
:
0
}
pre
{
padding
:
10px
}
pre
code
{
background
:
0
0
;
color
:
#4d4d4c
;
padding
:
0
;
text-shadow
:
none
}
pre
.deletion
{
background
:
#fdd
}
pre
.addition
{
background
:
#dfd
}
pre
.meta
{
color
:
#eab700
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
-webkit-user-select
:
none
;
user-select
:
none
}
pre
.comment
{
color
:
#8e908c
}
pre
.attribute
,
pre
.css
.class
,
pre
.css
.id
,
pre
.css
.pseudo
,
pre
.html
.doctype
,
pre
.name
,
pre
.regexp
,
pre
.ruby
.constant
,
pre
.tag
,
pre
.variable
,
pre
.xml
.doctype
,
pre
.xml
.pi
,
pre
.xml
.tag
.title
{
color
:
#c82829
}
pre
.built_in
,
pre
.builtin-name
,
pre
.command
,
pre
.constant
,
pre
.literal
,
pre
.number
,
pre
.params
,
pre
.preprocessor
{
color
:
#f5871f
}
pre
.css
.rules
.attribute
,
pre
.formula
,
pre
.header
,
pre
.inheritance
,
pre
.ruby
.class
.title
,
pre
.ruby
.symbol
,
pre
.special
,
pre
.string
,
pre
.symbol
,
pre
.value
,
pre
.xml
.cdata
{
color
:
#718c00
}
pre
.css
.hexcolor
,
pre
.title
{
color
:
#3e999f
}
pre
.coffeescript
.title
,
pre
.function
,
pre
.javascript
.title
,
pre
.perl
.sub
,
pre
.python
.decorator
,
pre
.python
.title
,
pre
.ruby
.function
.title
,
pre
.ruby
.title
.keyword
{
color
:
#4271ae
}
pre
.javascript
.function
,
pre
.keyword
{
color
:
#8959a8
}
.blockquote-center
{
border-left
:
none
;
margin
:
40px
0
;
padding
:
0
;
position
:
relative
;
text-align
:
center
}
.blockquote-center
.fa
{
display
:
block
;
opacity
:
.6
;
position
:
absolute
;
width
:
100%
}
.blockquote-center
.fa-quote-left
{
border-top
:
1px
solid
#ccc
;
text-align
:
left
;
top
:
-20px
}
.blockquote-center
.fa-quote-right
{
border-bottom
:
1px
solid
#ccc
;
text-align
:
right
;
bottom
:
-20px
}
.blockquote-center
div
,
.blockquote-center
p
{
text-align
:
center
}
.post-body
.group-picture
img
{
margin
:
0
auto
;
padding
:
0
3px
}
.group-picture-row
{
margin-bottom
:
6px
;
overflow
:
hidden
}
.group-picture-column
{
float
:
left
;
margin-bottom
:
10px
}
.post-body
.note
,
.post-body
.tabs
{
margin-bottom
:
20px
}
.post-body
.label
{
color
:
#555
;
display
:
inline
;
padding
:
0
2px
}
.post-body
.label.default
{
background
:
#f0f0f0
}
.post-body
.label.primary
{
background
:
#efe6f7
}
.post-body
.label.info
{
background
:
#e5f2f8
}
.post-body
.label.success
{
background
:
#e7f4e9
}
.post-body
.label.warning
{
background
:
#fcf6e1
}
.post-body
.label.danger
{
background
:
#fae8eb
}
.post-body
.tabs
,
.tabs-comment
{
display
:
block
;
padding-top
:
10px
;
position
:
relative
}
.post-body
.tabs
ul
.nav-tabs
,
.tabs-comment
ul
.nav-tabs
{
display
:
flex
;
flex-wrap
:
wrap
;
margin
:
0
0
-1px
;
padding
:
0
}
.post-body
.tabs
ul
.nav-tabs
li
.tab
,
.tabs-comment
ul
.nav-tabs
li
.tab
{
border-bottom
:
1px
solid
#ddd
;
border-left
:
1px
solid
transparent
;
border-right
:
1px
solid
transparent
;
border-top
:
3px
solid
transparent
;
flex-grow
:
1
;
list-style-type
:
none
;
border-radius
:
0
}
@media
(
max-width
:
413px
){
.post-body
.tabs
ul
.nav-tabs
,
.tabs-comment
ul
.nav-tabs
{
display
:
block
;
margin-bottom
:
5px
}
.post-body
.tabs
ul
.nav-tabs
li
.tab
,
.tabs-comment
ul
.nav-tabs
li
.tab
{
border-bottom
:
1px
solid
transparent
;
border-left
:
3px
solid
transparent
;
border-right
:
1px
solid
transparent
;
border-top
:
1px
solid
transparent
;
border-radius
:
0
}}
.post-body
.tabs
ul
.nav-tabs
li
.tab
a
,
.tabs-comment
ul
.nav-tabs
li
.tab
a
{
border-bottom
:
initial
;
display
:
block
;
line-height
:
1.8
;
outline
:
0
;
padding
:
.25em
.75em
;
text-align
:
center
;
transition-delay
:
0s
;
transition-duration
:
.2s
;
transition-timing-function
:
ease-out
}
.menu-item
a
,
.menu-item
span
.exturl
,
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
{
transition-property
:
border-color
;
transition-delay
:
0s
;
transition-duration
:
.2s
;
transition-timing-function
:
ease-in-out
}
.post-body
.tabs
ul
.nav-tabs
li
.tab
a
i
,
.tabs-comment
ul
.nav-tabs
li
.tab
a
i
{
width
:
1.285714285714286em
}
.post-body
.tabs
ul
.nav-tabs
li
.tab.active
,
.tabs-comment
ul
.nav-tabs
li
.tab.active
{
border-bottom
:
1px
solid
transparent
;
border-left
:
1px
solid
#ddd
;
border-right
:
1px
solid
#ddd
;
border-top
:
3px
solid
#fc6423
}
@media
(
max-width
:
413px
){
.post-body
.tabs
ul
.nav-tabs
li
.tab.active
,
.tabs-comment
ul
.nav-tabs
li
.tab.active
{
border-bottom
:
1px
solid
#ddd
;
border-left
:
3px
solid
#fc6423
;
border-right
:
1px
solid
#ddd
;
border-top
:
1px
solid
#ddd
}}
.post-body
.tabs
ul
.nav-tabs
li
.tab.active
a
,
.tabs-comment
ul
.nav-tabs
li
.tab.active
a
{
color
:
var
(
--link-color
);
cursor
:
default
}
.post-body
.tabs
.tab-content
.tab-pane
,
.tabs-comment
.tab-content
.tab-pane
{
border
:
1px
solid
#ddd
;
border-top
:
0
;
padding
:
20px
20px
0
;
border-radius
:
0
}
.post-body
.tabs
.tab-content
.tab-pane
:not
(
.active
),
.tabs-comment
.tab-content
.tab-pane
:not
(
.active
)
{
display
:
none
}
.post-body
.tabs
.tab-content
.tab-pane.active
,
.tabs-comment
.tab-content
.tab-pane.active
{
display
:
block
}
.post-body
.tabs
.tab-content
.tab-pane.active
:nth-of-type
(
1
),
.tabs-comment
.tab-content
.tab-pane.active
:nth-of-type
(
1
)
{
border-radius
:
0
}
@media
(
max-width
:
413px
){
.post-body
.tabs
.tab-content
.tab-pane.active
:nth-of-type
(
1
),
.tabs-comment
.tab-content
.tab-pane.active
:nth-of-type
(
1
)
{
border-radius
:
0
}}
.post-body
.note
{
border-radius
:
3px
;
padding
:
1em
;
position
:
relative
;
border
:
1px
solid
#eee
;
border-left-width
:
5px
}
.post-body
.note
h2
,
.post-body
.note
h3
,
.post-body
.note
h4
,
.post-body
.note
h5
,
.post-body
.note
h6
{
margin-top
:
0
;
border-bottom
:
initial
;
margin-bottom
:
0
;
padding-top
:
0
}
.post-body
.note
blockquote
:first-child
,
.post-body
.note
img
:first-child
,
.post-body
.note
ol
:first-child
,
.post-body
.note
p
:first-child
,
.post-body
.note
pre
:first-child
,
.post-body
.note
table
:first-child
,
.post-body
.note
ul
:first-child
{
margin-top
:
0
}
.post-body
.note
blockquote
:last-child
,
.post-body
.note
img
:last-child
,
.post-body
.note
ol
:last-child
,
.post-body
.note
p
:last-child
,
.post-body
.note
pre
:last-child
,
.post-body
.note
table
:last-child
,
.post-body
.note
ul
:last-child
{
margin-bottom
:
0
}
.post-body
.note.default
{
border-left-color
:
#777
}
.post-body
.note.default
h2
,
.post-body
.note.default
h3
,
.post-body
.note.default
h4
,
.post-body
.note.default
h5
,
.post-body
.note.default
h6
{
color
:
#777
}
.post-body
.note.primary
{
border-left-color
:
#6f42c1
}
.post-body
.note.primary
h2
,
.post-body
.note.primary
h3
,
.post-body
.note.primary
h4
,
.post-body
.note.primary
h5
,
.post-body
.note.primary
h6
{
color
:
#6f42c1
}
.post-body
.note.info
{
border-left-color
:
#428bca
}
.post-body
.note.info
h2
,
.post-body
.note.info
h3
,
.post-body
.note.info
h4
,
.post-body
.note.info
h5
,
.post-body
.note.info
h6
{
color
:
#428bca
}
.post-body
.note.success
{
border-left-color
:
#5cb85c
}
.post-body
.note.success
h2
,
.post-body
.note.success
h3
,
.post-body
.note.success
h4
,
.post-body
.note.success
h5
,
.post-body
.note.success
h6
{
color
:
#5cb85c
}
.post-body
.note.warning
{
border-left-color
:
#f0ad4e
}
.post-body
.note.warning
h2
,
.post-body
.note.warning
h3
,
.post-body
.note.warning
h4
,
.post-body
.note.warning
h5
,
.post-body
.note.warning
h6
{
color
:
#f0ad4e
}
.post-body
.note.danger
{
border-left-color
:
#d9534f
}
.post-body
.note.danger
h2
,
.post-body
.note.danger
h3
,
.post-body
.note.danger
h4
,
.post-body
.note.danger
h5
,
.post-body
.note.danger
h6
{
color
:
#d9534f
}
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
,
.pagination
.space
{
display
:
inline-block
;
margin
:
0
10px
;
padding
:
0
11px
;
position
:
relative
;
top
:
-1px
}
@media
(
max-width
:
767px
){
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
,
.pagination
.space
{
margin
:
0
5px
}}
.pagination
{
text-align
:
center
}
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
{
border-bottom
:
0
;
border-top
:
1px
solid
#eee
}
.pagination
.next
:hover
,
.pagination
.page-number
:hover
,
.pagination
.prev
:hover
{
border-top-color
:
#222
}
.pagination
.space
{
margin
:
0
;
padding
:
0
}
.pagination
.prev
{
margin-left
:
0
}
.pagination
.next
{
margin-right
:
0
}
.pagination
.page-number.current
{
background
:
#ccc
;
border-top-color
:
#ccc
;
color
:
#fff
}
@media
(
max-width
:
767px
){
.pagination
{
border-top
:
none
}
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
{
border-bottom
:
1px
solid
#eee
;
border-top
:
0
;
margin-bottom
:
10px
;
padding
:
0
10px
}
.pagination
.next
:hover
,
.pagination
.page-number
:hover
,
.pagination
.prev
:hover
{
border-bottom-color
:
#222
}}
.comments
{
overflow
:
hidden
}
.comment-button-group
{
display
:
flex
;
flex-wrap
:
wrap-reverse
;
justify-content
:
center
;
margin
:
1em
0
}
.comment-button-group
.comment-button
{
margin
:
.1em
.2em
}
.comment-button-group
.comment-button.active
{
background
:
var
(
--btn-default-hover-bg
);
border-color
:
var
(
--btn-default-hover-border-color
);
color
:
var
(
--btn-default-hover-color
)}
.comment-position
{
display
:
none
}
.comment-position.active
{
display
:
block
}
.tabs-comment
{
background
:
var
(
--content-bg-color
);
padding-top
:
0
}
.tabs-comment
.comments
{
border
:
0
;
box-shadow
:
none
;
margin-top
:
0
;
padding-top
:
0
}
.container
{
min-height
:
100%
;
position
:
relative
}
.main-inner
{
margin
:
0
auto
;
width
:
calc
(
100%
-
20px
)}
@media
(
min-width
:
1200px
){
.main-inner
{
width
:
1160px
}}
@media
(
min-width
:
1600px
){
.main-inner
{
width
:
73%
}}
@media
(
max-width
:
767px
){
.content-wrap
{
padding
:
0
20px
}
.site-meta
{
text-align
:
center
}}
.header
{
background
:
0
0
}
.header-inner
{
margin
:
0
auto
}
@media
(
min-width
:
1200px
){
.header-inner
{
width
:
1160px
}}
@media
(
min-width
:
1600px
){
.header-inner
{
width
:
73%
}}
.site-brand-container
{
display
:
flex
;
flex-shrink
:
0
;
padding
:
0
10px
}
.headband
{
background
:
#222
;
height
:
3px
}
.site-meta
{
flex-grow
:
1
;
text-align
:
center
}
.brand
{
border-bottom
:
none
;
color
:
var
(
--brand-color
);
display
:
inline-block
;
line-height
:
1.375em
;
position
:
relative
}
.brand
:hover
{
color
:
var
(
--brand-hover-color
)}
.site-title
{
font-size
:
1.375em
;
font-weight
:
400
;
margin
:
0
}
.site-subtitle
{
color
:
#ddd
;
font-size
:
.8125em
}
.use-motion
.brand
{
opacity
:
0
}
.use-motion
.custom-logo-image
,
.use-motion
.site-subtitle
,
.use-motion
.site-title
{
opacity
:
0
;
position
:
relative
;
top
:
-10px
}
.site-nav-right
,
.site-nav-toggle
{
display
:
none
}
@media
(
max-width
:
767px
){
.site-nav-right
,
.site-nav-toggle
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
}}
.site-nav-right
.toggle
,
.site-nav-toggle
.toggle
{
padding
:
10px
;
width
:
22px
}
.site-nav-right
.toggle
.toggle-line
,
.site-nav-toggle
.toggle
.toggle-line
{
border-radius
:
1px
}
.site-nav
{
display
:
block
}
@media
(
max-width
:
767px
){
.site-nav
{
clear
:
both
;
display
:
none
}}
.site-nav.site-nav-on
{
display
:
block
}
.menu
{
margin-top
:
20px
;
padding-left
:
0
;
text-align
:
center
}
.menu-item
{
display
:
inline-block
;
list-style
:
none
;
margin
:
0
10px
}
@media
(
max-width
:
767px
){
.menu-item
{
display
:
block
;
margin-top
:
10px
}
.menu-item.menu-item-search
{
display
:
none
}}
.menu-item
a
,
.menu-item
span
.exturl
{
border-bottom
:
0
;
display
:
block
;
font-size
:
.8125em
}
@media
(
hover
:
none
){
.menu-item
a
:hover
,
.menu-item
span
.exturl
:hover
{
border-bottom-color
:
transparent
!important
}}
.menu-item
.fa
,
.menu-item
.fab
,
.menu-item
.far
,
.menu-item
.fas
{
margin-right
:
8px
}
.menu-item
.badge
{
display
:
inline-block
;
font-weight
:
700
;
line-height
:
1
;
margin-left
:
.35em
;
margin-top
:
.35em
;
text-align
:
center
;
white-space
:
nowrap
}
@media
(
max-width
:
767px
){
.menu-item
.badge
{
float
:
right
;
margin-left
:
0
}}
.menu
.menu-item
a
:hover
,
.menu
.menu-item
span
.exturl
:hover
,
.menu-item-active
a
{
background
:
var
(
--menu-item-bg-color
)}
.use-motion
.menu-item
{
opacity
:
0
}
.sidebar
{
bottom
:
0
;
top
:
0
}
.sidebar-inner
{
color
:
#999
;
padding
:
18px
10px
;
text-align
:
center
}
.cc-license
{
margin-top
:
10px
;
text-align
:
center
}
.cc-license
.cc-opacity
{
border-bottom
:
none
;
opacity
:
.7
}
.cc-license
.cc-opacity
:hover
{
opacity
:
.9
}
.cc-license
img
{
display
:
inline-block
}
.site-author-image
{
border
:
1px
solid
#eee
;
display
:
block
;
margin
:
0
auto
;
max-width
:
120px
;
padding
:
2px
;
border-radius
:
50%
;
transition
:
2s
all
}
.site-author-name
{
color
:
var
(
--text-color
);
font-weight
:
600
;
margin
:
0
;
text-align
:
center
}
.site-description
{
color
:
#999
;
font-size
:
.8125em
;
margin-top
:
0
;
text-align
:
center
}
.links-of-author
a
,
.links-of-author
span
.exturl
{
border-bottom-color
:
#555
;
display
:
inline-block
;
font-size
:
.8125em
;
margin-bottom
:
10px
;
margin-right
:
10px
;
vertical-align
:
middle
}
.links-of-author
a
::before
,
.links-of-author
span
.exturl
::before
{
background
:
#32f406
;
border-radius
:
50%
;
content
:
' '
;
display
:
inline-block
;
height
:
4px
;
margin-right
:
3px
;
vertical-align
:
middle
;
width
:
4px
}
.sidebar-button
a
{
border-radius
:
4px
;
padding
:
0
15px
}
.sidebar-button
a
.fa
,
.sidebar-button
a
.fab
,
.sidebar-button
a
.far
,
.sidebar-button
a
.fas
{
margin-right
:
5px
}
.links-of-blogroll
{
font-size
:
.8125em
;
margin-top
:
10px
}
.links-of-blogroll-title
{
font-size
:
.875em
;
font-weight
:
600
;
margin-top
:
0
}
.links-of-blogroll-list
{
list-style
:
none
;
margin
:
0
;
padding
:
0
}
#sidebar-dimmer
{
display
:
none
}
@media
(
max-width
:
767px
){
#sidebar-dimmer
{
background
:
#000
;
display
:
block
;
height
:
100%
;
left
:
100%
;
opacity
:
0
;
position
:
fixed
;
top
:
0
;
width
:
100%
;
z-index
:
1100
}
.sidebar-active
+
#sidebar-dimmer
{
opacity
:
.7
;
transform
:
translateX
(
-100%
);
transition
:
opacity
.5s
}}
.back-to-top
,
.post-toc
ol
a
,
.posts-collapse
.post-header
,
.posts-collapse
.post-header
::before
,
.posts-expand
.post-title-link
::before
{
transition-delay
:
0s
;
transition-duration
:
.2s
;
transition-timing-function
:
ease-in-out
}
.sidebar-nav
{
margin
:
0
;
padding-bottom
:
20px
;
padding-left
:
0
}
.sidebar-nav
li
{
border-bottom
:
1px
solid
transparent
;
color
:
var
(
--text-color
);
cursor
:
pointer
;
display
:
inline-block
;
font-size
:
.875em
}
.sidebar-nav
li
.sidebar-nav-overview
{
margin-left
:
10px
}
.sidebar-nav
li
:hover
{
color
:
#fc6423
}
.sidebar-nav
.sidebar-nav-active
{
border-bottom-color
:
#fc6423
;
color
:
#fc6423
}
.sidebar-nav
.sidebar-nav-active
:hover
{
color
:
#fc6423
}
.sidebar-panel
{
display
:
none
;
overflow-x
:
hidden
;
overflow-y
:
auto
}
.sidebar-panel-active
{
display
:
block
}
.sidebar-toggle
{
background
:
#222
;
bottom
:
45px
;
cursor
:
pointer
;
height
:
14px
;
left
:
30px
;
padding
:
5px
;
position
:
fixed
;
width
:
14px
;
z-index
:
1300
}
@media
(
max-width
:
991px
){
.sidebar-toggle
{
left
:
20px
;
opacity
:
.8
;
display
:
none
}}
.sidebar-toggle
:hover
.toggle-line
{
background
:
#fc6423
}
.post-toc
{
font-size
:
.875em
}
.post-toc
ol
{
list-style
:
none
;
margin
:
0
;
padding
:
0
2px
5px
10px
;
text-align
:
left
}
.post-toc
ol
>
ol
{
padding-left
:
0
}
.post-toc
ol
a
{
transition-property
:
all
}
.post-toc
.nav-item
{
line-height
:
1.8
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
}
.post-toc
.nav
.active-current
>
.nav-child
,
.post-toc
.nav
.active-current
>
.nav-child
>
.nav-item
,
.post-toc
.nav
.active
>
.nav-child
,
.post-toc
.nav
.nav-child
{
display
:
block
}
.post-toc
.nav
.active
>
a
{
border-bottom-color
:
#fc6423
;
color
:
#fc6423
}
.post-toc
.nav
.active-current
>
a
,
.post-toc
.nav
.active-current
>
a
:hover
{
color
:
#fc6423
}
.site-state
{
display
:
flex
;
justify-content
:
center
;
line-height
:
1.4
;
margin-top
:
10px
;
overflow
:
hidden
;
text-align
:
center
;
white-space
:
nowrap
}
.site-state-item
:not
(
:first-child
)
{
border-left
:
1px
solid
#eee
}
.site-state-item
a
{
border-bottom
:
none
}
.site-state-item-count
{
display
:
block
;
font-size
:
1em
;
font-weight
:
600
;
text-align
:
center
}
.languages
,
.powered-by
,
.theme-info
,
.with-love
{
display
:
inline-block
}
.site-state-item-name
{
color
:
#999
;
font-size
:
.8125em
}
.footer
{
color
:
#999
;
font-size
:
.875em
;
padding
:
20px
0
}
.footer.footer-fixed
{
bottom
:
0
;
left
:
0
;
position
:
absolute
;
right
:
0
}
.footer-inner
{
box-sizing
:
border-box
;
margin
:
0
auto
;
text-align
:
center
;
width
:
calc
(
100%
-
20px
)}
@media
(
min-width
:
1200px
){
.footer-inner
{
width
:
1160px
}}
@media
(
min-width
:
1600px
){
.footer-inner
{
width
:
73%
}}
.languages
{
font-size
:
1.125em
;
position
:
relative
}
.languages
.lang-select-label
span
{
margin
:
0
.5em
}
.languages
.lang-select
{
height
:
100%
;
left
:
0
;
opacity
:
0
;
position
:
absolute
;
top
:
0
;
width
:
100%
}
.with-love
{
color
:
red
;
margin
:
0
5px
}
@-moz-keyframes
iconAnimate
{
0
%,
100
%
{
transform
:
scale
(
1
)}
10
%,
30
%
{
transform
:
scale
(
.9
)}
20
%,
40
%,
50
%,
60
%,
70
%,
80
%
{
transform
:
scale
(
1.1
)}}
@-webkit-keyframes
iconAnimate
{
0
%,
100
%
{
transform
:
scale
(
1
)}
10
%,
30
%
{
transform
:
scale
(
.9
)}
20
%,
40
%,
50
%,
60
%,
70
%,
80
%
{
transform
:
scale
(
1.1
)}}
@-o-keyframes
iconAnimate
{
0
%,
100
%
{
transform
:
scale
(
1
)}
10
%,
30
%
{
transform
:
scale
(
.9
)}
20
%,
40
%,
50
%,
60
%,
70
%,
80
%
{
transform
:
scale
(
1.1
)}}
@keyframes
iconAnimate
{
0
%,
100
%
{
transform
:
scale
(
1
)}
10
%,
30
%
{
transform
:
scale
(
.9
)}
20
%,
40
%,
50
%,
60
%,
70
%,
80
%
{
transform
:
scale
(
1.1
)}}
.back-to-top
{
font-size
:
12px
;
text-align
:
center
;
background
:
#222
;
bottom
:
-100px
;
box-sizing
:
border-box
;
color
:
#fff
;
cursor
:
pointer
;
opacity
:
.6
;
padding
:
0
6px
;
position
:
fixed
;
transition-property
:
bottom
;
z-index
:
1300
;
width
:
24px
}
.back-to-top
span
{
display
:
none
}
.back-to-top
:hover
{
color
:
#fc6423
}
.back-to-top.back-to-top-on
{
bottom
:
30px
}
@media
(
max-width
:
991px
){
.back-to-top
{
left
:
20px
;
opacity
:
.8
}}
@media
(
min-width
:
1200px
){
.post-body
{
font-size
:
1.125em
}}
.post-body
.exturl
.fa
{
font-size
:
.875em
;
margin-left
:
4px
}
.post-body
.figure
.caption
,
.post-body
.image-caption
{
color
:
#999
;
font-size
:
.875em
;
font-weight
:
700
;
line-height
:
1
;
margin
:
-20px
auto
15px
;
text-align
:
center
}
.post-sticky-flag
{
display
:
inline-block
;
transform
:
rotate
(
30deg
)}
.post-button
{
margin-top
:
40px
;
text-align
:
center
}
.use-motion
.collection-header
,
.use-motion
.comments
,
.use-motion
.pagination
,
.use-motion
.post-block
,
.use-motion
.post-body
,
.use-motion
.post-header
{
opacity
:
0
}
.posts-collapse
{
margin-left
:
35px
;
position
:
relative
}
@media
(
max-width
:
767px
){
.posts-collapse
{
margin-left
:
0
;
margin-right
:
0
}}
.posts-collapse
.collection-title
{
font-size
:
1.125em
;
position
:
relative
}
.posts-collapse
.collection-title
::before
{
background
:
#999
;
border
:
1px
solid
#fff
;
border-radius
:
50%
;
content
:
' '
;
height
:
10px
;
left
:
0
;
margin-left
:
-6px
;
margin-top
:
-4px
;
position
:
absolute
;
top
:
50%
;
width
:
10px
}
.posts-collapse
.collection-year
{
font-size
:
1.5em
;
font-weight
:
700
;
margin
:
60px
0
;
position
:
relative
}
.posts-collapse
.collection-year
::before
{
background
:
#bbb
;
border-radius
:
50%
;
content
:
' '
;
height
:
8px
;
left
:
0
;
margin-left
:
-4px
;
margin-top
:
-4px
;
position
:
absolute
;
top
:
50%
;
width
:
8px
}
.posts-collapse
.collection-header
{
display
:
block
;
margin
:
0
0
0
20px
}
.posts-collapse
.collection-header
small
{
color
:
#bbb
;
margin-left
:
5px
}
.posts-collapse
.post-header
{
border-bottom
:
1px
dashed
#ccc
;
margin
:
30px
0
;
padding-left
:
15px
;
position
:
relative
;
transition-property
:
border
}
.posts-collapse
.post-header
::before
,
.posts-collapse
::before
{
content
:
' '
;
position
:
absolute
;
left
:
0
}
.posts-collapse
.post-header
::before
{
background
:
#bbb
;
border
:
1px
solid
#fff
;
border-radius
:
50%
;
height
:
6px
;
margin-left
:
-4px
;
top
:
.75em
;
transition-property
:
background
;
width
:
6px
}
.posts-collapse
.post-header
:hover
{
border-bottom-color
:
#666
}
.posts-collapse
.post-header
:hover::before
{
background
:
#222
}
.posts-collapse
.post-meta
{
display
:
inline
;
font-size
:
.75em
;
margin-right
:
10px
}
.posts-collapse
.post-title
{
display
:
inline
}
.posts-collapse
.post-title
a
,
.posts-collapse
.post-title
span
.exturl
{
border-bottom
:
none
;
color
:
var
(
--link-color
)}
.posts-collapse
.post-title
.fa-external-link-alt
{
font-size
:
.875em
;
margin-left
:
5px
}
.posts-collapse
::before
{
background
:
#f5f5f5
;
height
:
100%
;
margin-left
:
-2px
;
top
:
1.25em
;
width
:
4px
}
.post-eof
{
background
:
#ccc
;
height
:
1px
;
margin
:
80px
auto
60px
;
text-align
:
center
;
width
:
8%
}
.post-block
:last-of-type
.post-eof
{
display
:
none
}
.content
{
padding-top
:
40px
}
@media
(
min-width
:
992px
){
.post-body
{
text-align
:
justify
}}
@media
(
max-width
:
991px
){
.post-body
{
text-align
:
justify
}}
.post-body
h1
,
.post-body
h2
,
.post-body
h3
,
.post-body
h4
,
.post-body
h5
,
.post-body
h6
{
padding-top
:
10px
}
.post-body
h1
.header-anchor
,
.post-body
h2
.header-anchor
,
.post-body
h3
.header-anchor
,
.post-body
h4
.header-anchor
,
.post-body
h5
.header-anchor
,
.post-body
h6
.header-anchor
{
border-bottom-style
:
none
;
color
:
#ccc
;
float
:
right
;
margin-left
:
10px
;
visibility
:
hidden
}
.post-body
h1
.header-anchor
:hover
,
.post-body
h2
.header-anchor
:hover
,
.post-body
h3
.header-anchor
:hover
,
.post-body
h4
.header-anchor
:hover
,
.post-body
h5
.header-anchor
:hover
,
.post-body
h6
.header-anchor
:hover
{
color
:
inherit
}
.post-body
h1
:hover
.header-anchor
,
.post-body
h2
:hover
.header-anchor
,
.post-body
h3
:hover
.header-anchor
,
.post-body
h4
:hover
.header-anchor
,
.post-body
h5
:hover
.header-anchor
,
.post-body
h6
:hover
.header-anchor
{
visibility
:
visible
}
.post-body
iframe
,
.post-body
img
,
.post-body
video
{
margin-bottom
:
20px
}
.post-body
.video-container
{
height
:
0
;
margin-bottom
:
20px
;
overflow
:
hidden
;
padding-top
:
75%
;
position
:
relative
;
width
:
100%
}
.post-body
.video-container
embed
,
.post-body
.video-container
iframe
,
.post-body
.video-container
object
{
height
:
100%
;
left
:
0
;
margin
:
0
;
position
:
absolute
;
top
:
0
;
width
:
100%
}
.post-gallery
{
align-items
:
center
;
display
:
grid
;
grid-gap
:
10px
;
grid-template-columns
:
1
fr
1
fr
1
fr
;
margin-bottom
:
20px
}
.post-gallery
a
{
border
:
0
}
.post-gallery
img
{
margin
:
0
}
.posts-expand
.post-header
{
font-size
:
1.125em
}
.posts-expand
.post-title
{
font-size
:
1.5em
;
font-weight
:
400
;
margin
:
initial
;
text-align
:
center
;
overflow-wrap
:
break-word
;
word-wrap
:
break-word
}
.posts-expand
.post-title-link
{
border-bottom
:
none
;
color
:
var
(
--link-color
);
display
:
inline-block
;
position
:
relative
;
vertical-align
:
top
}
.posts-expand
.post-title-link
::before
{
background
:
var
(
--link-color
);
bottom
:
0
;
content
:
''
;
height
:
2px
;
left
:
0
;
position
:
absolute
;
transform
:
scaleX
(
0
);
visibility
:
hidden
;
width
:
100%
}
.posts-expand
.post-title-link
:hover::before
{
transform
:
scaleX
(
1
);
visibility
:
visible
}
.posts-expand
.post-title-link
.fa-external-link-alt
{
font-size
:
.875em
;
margin-left
:
5px
}
.posts-expand
.post-meta
{
color
:
#999
;
font-size
:
.75em
;
margin
:
3px
0
60px
;
text-align
:
center
}
.posts-expand
.post-meta
.post-description
{
font-size
:
.875em
;
margin-top
:
2px
}
.posts-expand
.post-meta
time
{
border-bottom
:
1px
dashed
#999
;
cursor
:
pointer
}
.post-meta
.post-meta-item
+
.post-meta-item
::before
{
content
:
'|'
;
margin
:
0
.5em
}
.post-meta-divider
{
margin
:
0
.5em
}
.post-meta-item-icon
{
margin-right
:
3px
}
@media
(
max-width
:
991px
){
.post-meta-item-icon
{
display
:
inline-block
}
.post-meta-item-text
{
display
:
none
}}
.post-nav
{
border-top
:
1px
solid
#eee
;
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
15px
;
padding
:
10px
5px
0
}
.post-nav-item
{
flex
:
1
}
.post-nav-item
a
{
border-bottom
:
none
;
display
:
block
;
font-size
:
.875em
;
line-height
:
1.6
;
position
:
relative
}
.post-nav-item
a
:active
{
top
:
2px
}
.post-nav-item
.fa
{
font-size
:
.75em
}
.post-nav-item
:first-child
{
margin-right
:
15px
}
.post-nav-item
:first-child
.fa
{
margin-right
:
5px
}
.post-nav-item
:last-child
{
margin-left
:
15px
;
text-align
:
right
}
#qr
p
,
.category-all-page
.category-all-title
,
.event-list
.event
.event-details
::before
,
.post-tags
,
.post-widgets
,
.reward-container
,
.sidebar-button
,
.social-like
,
.tag-cloud
,
.wp_rating
,
ul
.breadcrumb
{
text-align
:
center
}
.post-nav-item
:last-child
.fa
{
margin-left
:
5px
}
.rtl.post-body
a
,
.rtl.post-body
h1
,
.rtl.post-body
h2
,
.rtl.post-body
h3
,
.rtl.post-body
h4
,
.rtl.post-body
h5
,
.rtl.post-body
h6
,
.rtl.post-body
li
,
.rtl.post-body
ol
,
.rtl.post-body
p
,
.rtl.post-body
ul
{
direction
:
rtl
;
font-family
:
UKIJ
Ekran
}
.rtl.post-title
{
font-family
:
UKIJ
Ekran
}
.post-tags
{
margin-top
:
40px
}
.post-tags
a
{
display
:
inline-block
;
font-size
:
.8125em
}
.post-tags
a
:not
(
:last-child
)
{
margin-right
:
10px
}
.post-widgets
{
border-top
:
1px
solid
#eee
;
margin-top
:
15px
}
.wp_rating
{
height
:
20px
;
line-height
:
20px
;
margin-top
:
10px
;
padding-top
:
6px
}
.social-like
{
display
:
flex
;
font-size
:
.875em
;
justify-content
:
center
}
.reward-container
{
margin
:
20px
auto
;
padding
:
10px
0
;
width
:
90%
}
.reward-container
button
{
background
:
#ff2a2a
;
border
:
0
;
border-radius
:
5px
;
color
:
#fff
;
cursor
:
pointer
;
line-height
:
2
;
outline
:
0
;
padding
:
0
15px
;
vertical-align
:
text-top
}
.reward-container
button
:hover
{
background
:
#f55
}
#qr
{
padding-top
:
20px
}
#qr
a
{
border
:
0
}
#qr
img
{
display
:
inline-block
;
margin
:
.8em
2em
0
;
max-width
:
100%
;
width
:
180px
}
.post-copyright
{
background
:
var
(
--card-bg-color
);
border-left
:
3px
solid
#ff2a2a
;
list-style
:
none
;
margin
:
2em
0
0
;
padding
:
.5em
1em
}
.my_post_copyright
{
width
:
85%
;
max-width
:
45em
;
margin
:
2.8em
auto
0
;
padding
:
.5em
1em
;
border
:
1px
solid
#d3d3d3
;
font-size
:
.93rem
;
line-height
:
1.6em
;
word-break
:
break-all
;
background
:
rgba
(
255
,
255
,
255
,
.4
)}
.my_post_copyright
p
{
margin
:
0
}
.my_post_copyright
span
{
display
:
inline-block
;
width
:
5.2em
;
color
:
#333
;
font-weight
:
700
}
.my_post_copyright
.raw
{
margin-left
:
1em
;
width
:
5em
}
.my_post_copyright
a
{
color
:
grey
;
border-bottom
:
0
}
.my_post_copyright
a
:hover
{
color
:
#0593d3
;
text-decoration
:
underline
}
.my_post_copyright
:hover
.fa-clipboard
{
color
:
#000
}
.my_post_copyright
.post-url
:hover
{
font-weight
:
400
}
.my_post_copyright
.copy-path
{
margin-left
:
1em
;
width
:
1em
}
@media
(
max-width
:
767px
){
.post-gallery
{
grid-template-columns
:
1
fr
1
fr
}
.my_post_copyright
.copy-path
{
display
:
none
}}
.my_post_copyright
.copy-path
:hover
{
color
:
grey
;
cursor
:
pointer
}
.category-all-page
.category-all
{
margin-top
:
20px
}
.category-all-page
.category-list
{
list-style
:
none
;
margin
:
0
;
padding
:
0
}
.category-all-page
.category-list-item
{
margin
:
5px
10px
}
.category-all-page
.category-list-count
{
color
:
#bbb
}
.category-all-page
.category-list-count
::before
{
content
:
' ('
;
display
:
inline
}
.category-all-page
.category-list-count
::after
{
content
:
') '
;
display
:
inline
}
.category-all-page
.category-list-child
{
padding-left
:
10px
}
.event-list
{
padding
:
0
}
.event-list
hr
{
background
:
#222
;
margin
:
20px
0
45px
}
.event-list
hr
::after
{
background
:
#222
;
color
:
#fff
;
content
:
'NOW'
;
display
:
inline-block
;
font-weight
:
700
;
padding
:
0
5px
;
text-align
:
right
}
.event-list
.event
{
background
:
#222
;
margin
:
20px
0
;
min-height
:
40px
;
padding
:
15px
0
15px
10px
}
.event-list
.event
.event-summary
{
color
:
#fff
;
margin
:
0
;
padding-bottom
:
3px
}
.event-list
.event
.event-summary
::before
{
animation
:
dot-flash
1s
alternate
infinite
ease-in-out
;
color
:
#fff
;
content
:
'\f111'
;
display
:
inline-block
;
font-size
:
10px
;
margin-right
:
25px
;
vertical-align
:
middle
;
font-family
:
'Font Awesome 5 Free'
;
font-weight
:
900
}
.event-list
.event
.event-relative-time
{
color
:
#bbb
;
display
:
inline-block
;
font-size
:
12px
;
font-weight
:
400
;
padding-left
:
12px
}
.event-list
.event
.event-details
{
color
:
#fff
;
display
:
block
;
line-height
:
18px
;
margin-left
:
56px
;
padding-bottom
:
6px
;
padding-top
:
3px
;
text-indent
:
-24px
}
.event-list
.event
.event-details
::before
{
color
:
#fff
;
display
:
inline-block
;
margin-right
:
9px
;
text-indent
:
0
;
width
:
14px
;
font-family
:
'Font Awesome 5 Free'
;
font-weight
:
900
}
.event-list
.event
.event-details.event-location
::before
{
content
:
'\f041'
}
.event-list
.event
.event-details.event-duration
::before
{
content
:
'\f017'
}
.event-list
.event-past
{
background
:
#f5f5f5
}
.event-list
.event-past
.event-details
,
.event-list
.event-past
.event-summary
{
color
:
#bbb
;
opacity
:
.9
}
.event-list
.event-past
.event-details
::before
,
.event-list
.event-past
.event-summary
::before
{
animation
:
none
;
color
:
#bbb
}
@-moz-keyframes
dot-flash
{
from
{
opacity
:
1
;
transform
:
scale
(
1
)}
to
{
opacity
:
0
;
transform
:
scale
(
.8
)}}
@-webkit-keyframes
dot-flash
{
from
{
opacity
:
1
;
transform
:
scale
(
1
)}
to
{
opacity
:
0
;
transform
:
scale
(
.8
)}}
@-o-keyframes
dot-flash
{
from
{
opacity
:
1
;
transform
:
scale
(
1
)}
to
{
opacity
:
0
;
transform
:
scale
(
.8
)}}
@keyframes
dot-flash
{
from
{
opacity
:
1
;
transform
:
scale
(
1
)}
to
{
opacity
:
0
;
transform
:
scale
(
.8
)}}
ul
.breadcrumb
{
font-size
:
.75em
;
list-style
:
none
;
margin
:
1em
0
;
padding
:
0
2em
}
ul
.breadcrumb
li
{
display
:
inline
}
ul
.breadcrumb
li
+
li
::before
{
content
:
'/\00a0'
;
font-weight
:
400
;
padding
:
.5em
}
ul
.breadcrumb
li
+
li
:last-child
{
font-weight
:
700
}
.tag-cloud
a
{
display
:
inline-block
;
margin
:
10px
}
.tag-cloud
a
:hover
{
color
:
var
(
--link-hover-color
)
!important
}
.header
{
margin
:
0
auto
;
position
:
relative
;
width
:
calc
(
100%
-
20px
)}
@media
(
min-width
:
1200px
){
.header
{
width
:
1160px
}}
@media
(
min-width
:
1600px
){
.header
{
width
:
73%
}}
@media
(
max-width
:
991px
){
.header
{
width
:
auto
}}
.header-inner
{
background
:
var
(
--content-bg-color
);
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
);
overflow
:
hidden
;
padding
:
0
;
position
:
absolute
;
top
:
0
;
width
:
240px
}
@media
(
min-width
:
1200px
){
.header-inner
{
width
:
240px
}}
.main-inner
{
align-items
:
flex-start
;
display
:
flex
;
justify-content
:
space-between
;
flex-direction
:
row-reverse
}
@media
(
max-width
:
991px
){
.header-inner
{
border-radius
:
initial
;
position
:
relative
;
width
:
auto
}
.main-inner
{
width
:
auto
}}
.content-wrap
{
border-radius
:
initial
;
box-sizing
:
border-box
;
width
:
calc
(
100%
-
252px
)}
@media
(
max-width
:
991px
){
.content-wrap
{
border-radius
:
initial
;
padding
:
20px
;
width
:
100%
}}
.footer-inner
{
padding-left
:
260px
}
.back-to-top
{
left
:
auto
;
right
:
30px
}
.site-brand-container
{
background
:
#222
}
@media
(
max-width
:
991px
){
.back-to-top
{
right
:
20px
}
.footer-inner
{
padding-left
:
0
;
padding-right
:
0
;
width
:
auto
}
.site-brand-container
{
box-shadow
:
0
0
16px
rgba
(
0
,
0
,
0
,
.5
)}
.custom-logo-image
{
display
:
none
}}
.site-meta
{
padding
:
20px
0
}
.brand
{
padding
:
0
}
.site-subtitle
{
margin
:
10px
10px
0
}
.custom-logo-image
{
margin-top
:
20px
}
.site-nav-right
.toggle
,
.site-nav-toggle
.toggle
{
color
:
#fff
}
.site-nav-right
.toggle
.toggle-line
,
.site-nav-toggle
.toggle
.toggle-line
{
background
:
#fff
}
@media
(
min-width
:
768px
)
and
(
max-width
:
991px
){
.site-nav-right
,
.site-nav-toggle
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
}
.site-nav
{
display
:
none
}}
.menu
.menu-item
{
display
:
block
;
margin
:
0
}
.menu
.menu-item
a
,
.menu
.menu-item
span
.exturl
{
padding
:
5px
20px
;
position
:
relative
;
text-align
:
left
;
transition-property
:
background-color
}
@media
(
max-width
:
991px
){
.menu
.menu-item.menu-item-search
{
display
:
none
}}
.menu
.menu-item
.badge
{
background
:
#ccc
;
border-radius
:
10px
;
color
:
#fff
;
float
:
right
;
padding
:
2px
5px
;
text-shadow
:
1px
1px
0
rgba
(
0
,
0
,
0
,
.1
);
vertical-align
:
middle
}
.main-menu
.menu-item-active
a
::after
{
background
:
#bbb
;
border-radius
:
50%
;
content
:
' '
;
height
:
6px
;
margin-top
:
-3px
;
position
:
absolute
;
right
:
15px
;
top
:
50%
;
width
:
6px
}
.sidebar-inner
,
.sub-menu
{
background
:
var
(
--content-bg-color
)}
.sub-menu
{
margin
:
0
;
padding
:
6px
0
}
.sub-menu
.menu-item
{
display
:
inline-block
}
.sub-menu
.menu-item
a
,
.sub-menu
.menu-item
span
.exturl
{
background
:
0
0
;
margin
:
5px
10px
;
padding
:
initial
}
.sub-menu
.menu-item
a
:hover
,
.sub-menu
.menu-item
span
.exturl
:hover
{
background
:
0
0
;
color
:
#fc6423
}
.sub-menu
.menu-item-active
a
{
border-bottom-color
:
#fc6423
;
color
:
#fc6423
}
.sub-menu
.menu-item-active
a
:hover
{
border-bottom-color
:
#fc6423
}
.sidebar
{
background
:
var
(
--body-bg-color
);
box-shadow
:
none
;
margin-top
:
100%
;
position
:
static
;
width
:
240px
}
@media
(
max-width
:
991px
){
.sidebar
{
display
:
none
}}
.sidebar-toggle
{
display
:
none
}
.sidebar-inner
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
);
box-sizing
:
border-box
;
color
:
var
(
--text-color
);
width
:
240px
;
opacity
:
0
}
.sidebar-inner.affix
{
position
:
fixed
;
top
:
12px
}
.sidebar-inner.affix-bottom
{
position
:
absolute
}
.site-state-item
{
padding
:
0
10px
}
.sidebar-button
{
border-bottom
:
1px
dotted
#ccc
;
border-top
:
1px
dotted
#ccc
;
margin-top
:
10px
}
.sidebar-button
a
{
border
:
0
;
color
:
#fc6423
;
display
:
block
}
.sidebar-button
a
:hover
{
background
:
0
0
;
border
:
0
;
color
:
#e34603
}
.sidebar-button
a
:hover
.fa
,
.sidebar-button
a
:hover
.fab
,
.sidebar-button
a
:hover
.far
,
.sidebar-button
a
:hover
.fas
{
color
:
#e34603
}
.links-of-author
{
display
:
flex
;
flex-wrap
:
wrap
;
margin-top
:
10px
;
justify-content
:
center
}
.links-of-author-item
{
margin
:
5px
0
0
;
width
:
50%
}
.comments
,
.post-block
+
.post-block
{
margin-top
:
12px
}
.links-of-author-item
a
,
.links-of-author-item
span
.exturl
{
box-sizing
:
border-box
;
margin-bottom
:
0
;
margin-right
:
0
;
max-width
:
216px
;
overflow
:
hidden
;
padding
:
0
5px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
border-bottom
:
none
;
display
:
block
;
text-decoration
:
none
}
.links-of-author-item
a
::before
,
.links-of-author-item
span
.exturl
::before
,
.post-eof
{
display
:
none
}
.links-of-author-item
a
:hover
,
.links-of-author-item
span
.exturl
:hover
{
background
:
var
(
--body-bg-color
);
border-radius
:
4px
}
.links-of-author-item
.fa
,
.links-of-author-item
.fab
,
.links-of-author-item
.far
,
.links-of-author-item
.fas
{
margin-right
:
2px
}
.links-of-blogroll-item
{
padding
:
0
}
.content-wrap
{
background
:
initial
;
box-shadow
:
initial
;
padding
:
initial
}
.comments
,
.post-block
{
padding
:
40px
;
background
:
var
(
--content-bg-color
)}
.post-block
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
)}
.comments
,
.pagination
,
.post-block
+
.post-block
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
)}
.tabs-comment
{
margin-top
:
1em
}
.content
{
padding-top
:
initial
}
.pagination
{
background
:
var
(
--content-bg-color
);
border-top
:
initial
;
margin
:
12px
0
0
;
padding
:
10px
0
}
.pagination
.next
,
.pagination
.page-number
,
.pagination
.prev
{
margin-bottom
:
initial
;
top
:
initial
}
.main
{
padding-bottom
:
initial
}
.footer
{
bottom
:
auto
}
.sub-menu
{
border-bottom
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
)}
.sub-menu
+
.content
.post-block
{
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
);
margin-top
:
12px
}
@media
(
min-width
:
768px
)
and
(
max-width
:
991px
){
.sub-menu
+
.content
.post-block
{
margin-top
:
10px
}}
@media
(
max-width
:
767px
){
.sub-menu
+
.content
.post-block
{
margin-top
:
8px
}}
.post-body
h1
,
.post-body
h2
{
border-bottom
:
1px
solid
#eee
}
.post-body
h3
{
border-bottom
:
1px
dotted
#eee
}
@media
(
min-width
:
768px
)
and
(
max-width
:
991px
){
.content-wrap
{
padding
:
10px
}
.posts-expand
.post-button
{
margin-top
:
20px
}
.comments
,
.post-block
+
.post-block
{
margin-top
:
10px
}
.post-block
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
);
padding
:
20px
}
.comments
{
padding
:
10px
20px
}
.pagination
{
margin
:
10px
0
0
}}
@media
(
max-width
:
767px
){
.content-wrap
{
padding
:
8px
}
.posts-expand
.post-button
{
margin
:
12px
0
}
.comments
,
.post-block
+
.post-block
{
margin-top
:
8px
}
.post-block
{
border-radius
:
initial
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
.12
),
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
.06
),
0
1px
5px
0
rgba
(
0
,
0
,
0
,
.12
),
0
-1px
.5px
0
rgba
(
0
,
0
,
0
,
.09
);
min-height
:
auto
;
padding
:
12px
}
.comments
{
padding
:
10px
12px
}
.pagination
{
margin
:
8px
0
0
}}
\ No newline at end of file
index.html
浏览文件 @
68b4b27a
<!DOCTYPE html>
<html
lang=
"zh-CN"
><head><meta
charset=
"UTF-8"
><meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,maximum-scale=2"
><meta
name=
"theme-color"
content=
"#222"
><meta
name=
"generator"
content=
"Hexo 4.2.0"
><link
rel=
"apple-touch-icon"
sizes=
"180x180"
href=
"/images/apple-touch-icon-next.png"
><link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"/images/favicon-32x32-next.png"
><link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"/images/favicon-16x16-next.png"
><link
rel=
"mask-icon"
href=
"/images/logo.svg"
color=
"#222"
><link
rel=
"stylesheet"
href=
"/css/main.css"
><link
rel=
"stylesheet"
href=
"/lib/font-awesome/css/all.min.css"
><script
id=
"hexo-configurations"
>
var
NexT
=
window
.
NexT
||
{},
CONFIG
=
{
hostname
:
"
alderaan.xyz
"
,
root
:
"
/
"
,
scheme
:
"
Gemini
"
,
version
:
"
7.8.0
"
,
exturl
:
!
1
,
sidebar
:{
position
:
"
left
"
,
display
:
"
post
"
,
padding
:
18
,
offset
:
12
,
onmobile
:
!
1
},
copycode
:{
enable
:
!
1
,
show_result
:
!
1
,
style
:
null
},
back2top
:{
enable
:
!
0
,
sidebar
:
!
1
,
scrollpercent
:
!
1
},
bookmark
:{
enable
:
!
1
,
color
:
"
#222
"
,
save
:
"
auto
"
},
fancybox
:
!
1
,
mediumzoom
:
!
1
,
lazyload
:
!
1
,
pangu
:
!
1
,
comments
:{
style
:
"
tabs
"
,
active
:
null
,
storage
:
!
0
,
lazyload
:
!
1
,
nav
:
null
},
algolia
:{
hits
:{
per_page
:
10
},
labels
:{
input_placeholder
:
"
Search for Posts
"
,
hits_empty
:
"
We didn't find any results for the search: ${query}
"
,
hits_stats
:
"
${hits} results found in ${time} ms
"
}},
localsearch
:{
enable
:
!
1
,
trigger
:
"
auto
"
,
top_n_per_article
:
1
,
unescape
:
!
1
,
preload
:
!
1
},
motion
:{
enable
:
!
0
,
async
:
!
1
,
transition
:{
post_block
:
"
fadeIn
"
,
post_header
:
"
slideDownIn
"
,
post_body
:
"
slideDownIn
"
,
coll_header
:
"
slideLeftIn
"
,
sidebar
:
"
slideUpIn
"
}}}
</script><meta
property=
"og:type"
content=
"website"
><meta
property=
"og:title"
content=
"Alderaan的博客"
><meta
property=
"og:url"
content=
"https://alderaan.xyz/index.html"
><meta
property=
"og:site_name"
content=
"Alderaan的博客"
><meta
property=
"og:locale"
content=
"zh_CN"
><meta
property=
"article:author"
content=
"Alderaan"
><meta
name=
"twitter:card"
content=
"summary"
><link
rel=
"canonical"
href=
"https://alderaan.xyz/"
><script
id=
"page-configurations"
>
CONFIG
.
page
=
{
sidebar
:
""
,
isHome
:
!
0
,
isPost
:
!
1
,
lang
:
"
zh-CN
"
}
</script><title>
Alderaan的博客
</title><noscript><style>
.sidebar-inner
,
.use-motion
.brand
,
.use-motion
.collection-header
,
.use-motion
.comments
,
.use-motion
.menu-item
,
.use-motion
.pagination
,
.use-motion
.post-block
,
.use-motion
.post-body
,
.use-motion
.post-header
{
opacity
:
initial
}
.use-motion
.site-subtitle
,
.use-motion
.site-title
{
opacity
:
initial
;
top
:
initial
}
.use-motion
.logo-line-before
i
{
left
:
initial
}
.use-motion
.logo-line-after
i
{
right
:
initial
}
</style></noscript><link
rel=
"alternate"
href=
"/atom.xml"
title=
"Alderaan的博客"
type=
"application/atom+xml"
></head><body
itemscope
itemtype=
"http://schema.org/WebPage"
><div
class=
"container use-motion"
><div
class=
"headband"
></div><header
class=
"header"
itemscope
itemtype=
"http://schema.org/WPHeader"
><div
class=
"header-inner"
><div
class=
"site-brand-container"
><div
class=
"site-nav-toggle"
><div
class=
"toggle"
aria-label=
"切换导航栏"
><span
class=
"toggle-line toggle-line-first"
></span><span
class=
"toggle-line toggle-line-middle"
></span><span
class=
"toggle-line toggle-line-last"
></span></div></div><div
class=
"site-meta"
><a
href=
"/"
class=
"brand"
rel=
"start"
><span
class=
"logo-line-before"
><i></i></span><h1
class=
"site-title"
>
Alderaan的博客
</h1><span
class=
"logo-line-after"
><i></i></span></a></div><div
class=
"site-nav-right"
><div
class=
"toggle popup-trigger"
></div></div></div><nav
class=
"site-nav"
><ul
id=
"menu"
class=
"main-menu menu"
><li
class=
"menu-item menu-item-home"
><a
href=
"/"
rel=
"section"
><i
class=
"fa fa-home fa-fw"
></i>
首页
</a></li><li
class=
"menu-item menu-item-about"
><a
href=
"/about/"
rel=
"section"
><i
class=
"fa fa-user fa-fw"
></i>
关于
</a></li><li
class=
"menu-item menu-item-tags"
><a
href=
"/tags/"
rel=
"section"
><i
class=
"fa fa-tags fa-fw"
></i>
标签
</a></li><li
class=
"menu-item menu-item-categories"
><a
href=
"/categories/"
rel=
"section"
><i
class=
"fa fa-th fa-fw"
></i>
分类
</a></li><li
class=
"menu-item menu-item-archives"
><a
href=
"/archives/"
rel=
"section"
><i
class=
"fa fa-archive fa-fw"
></i>
归档
</a></li></ul></nav></div></header><div
class=
"back-to-top"
><i
class=
"fa fa-arrow-up"
></i>
<span>
0%
</span></div><main
class=
"main"
><div
class=
"main-inner"
><div
class=
"content-wrap"
><div
class=
"content index posts-expand"
><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
class=
"post-title-link"
itemprop=
"url"
>
Centos 7.6 下使用美格SLM750(4G模块)拨号上网
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-11 17:40:13 / 修改时间:22:5
0:07
"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-11T17:40:13+08:00"
>
2020-05-11
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Centos/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Centos
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块
<code>
SLM750
</code>
,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行驱动编译安装,并编译拨号软件,最终实现工控机4G上网功能。
</p><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/11/centos7-6-use-meig-4G-module-slm750/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/10/mw150us-2-0-mac-driver/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/10/mw150us-2-0-mac-driver/"
class=
"post-title-link"
itemprop=
"url"
>
水星USB无线网卡mw150us苹果macOS系统驱动成功
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-10 15:04:06"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-10T15:04:06+08:00"
>
2020-05-10
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar-check"
></i></span>
<span
class=
"post-meta-item-text"
>
更新于
</span>
<time
title=
"修改时间:2020-05-11 14:20:15"
itemprop=
"dateModified"
datetime=
"2020-05-11T14:20:15+08:00"
>
2020-05-11
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/MacOS/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
MacOS
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
之前修好后的
<strong>
MacBook Pro (13-inch, Mid 2010)
</strong>
,去年开始就发现偶尔找不到自带的无线网卡,用着也还经常死机。屏蔽了无线功能后,一直只能有线上网。最近终于忍不住,要无线上网了。。。由于囊中羞涩,先找了一块
<strong>
MERCURY(水星)
</strong>
的usb无线网卡MW150US 2.0 (170107),想在
<strong>
macOS
</strong>
Hight Sierra 10.13.5上驱动它。
</p><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/10/mw150us-2-0-mac-driver/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/07/hexo-compress/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/07/hexo-compress/"
class=
"post-title-link"
itemprop=
"url"
>
使用Gulp压缩Hexo博客静态资源
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-07 21:06:42"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-07T21:06:42+08:00"
>
2020-05-07
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar-check"
></i></span>
<span
class=
"post-meta-item-text"
>
更新于
</span>
<time
title=
"修改时间:2020-05-11 14:20:15"
itemprop=
"dateModified"
datetime=
"2020-05-11T14:20:15+08:00"
>
2020-05-11
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Hexo/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Hexo
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
由于博客使用的插件较多,文章内包含的图片越多越大,会影响到博客的加载速度,影响访问效果。其中图片对文章加载速度影响较大,如果可以的话,可以使用国内的一些图床,但如果图床挂了,也会导致图片无法访问,迁移麻烦等,所以本博客还是挂在Github上进行访问。为此开始从资源文件大小上进行优化,了解到可以使用
<strong>
Gulp
</strong>
对博客的js、css、img、html等静态资源文件进行压缩。
</p><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/07/hexo-compress/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/07/ssh-to-git-github-com-connection-reset/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/07/ssh-to-git-github-com-connection-reset/"
class=
"post-title-link"
itemprop=
"url"
>
ssh -T git@github.com Connection reset by XXX port 22
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-07 13:34:09 / 修改时间:14:18:27"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-07T13:34:09+08:00"
>
2020-05-07
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Github/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Github
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
今天在用
<strong>
Hexo
</strong>
发布博客文章时,遇到上传
<strong>
Github
</strong>
失败问题,主要提示为
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
Connection reset by 52.74.223.119
</span><br><span
class=
"line"
>
fatal: Could not
<span
class=
"built_in"
>
read
</span>
from remote repository.
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
Please make sure you have the correct access rights
</span><br><span
class=
"line"
>
and the repository exists.
</span><br></pre></td></tr></table></figure><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/07/ssh-to-git-github-com-connection-reset/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/06/hexo-config/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/06/hexo-config/"
class=
"post-title-link"
itemprop=
"url"
>
Hexo博客Next主题美化
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-06 15:01:22"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-06T15:01:22+08:00"
>
2020-05-06
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar-check"
></i></span>
<span
class=
"post-meta-item-text"
>
更新于
</span>
<time
title=
"修改时间:2020-05-07 11:44:34"
itemprop=
"dateModified"
datetime=
"2020-05-07T11:44:34+08:00"
>
2020-05-07
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Hexo/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Hexo
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><p>
本文主要说明在
<strong>
Hexo
</strong>
博客
<strong>
nexT
</strong>
主题下如何进行美化,具体对应效果可通过本博客页面进行查看。
</p><ul><li>
Hexo version: 4.2.0
</li><li>
nexT version:7.8.0
</li></ul><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/06/hexo-config/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/03/hexo-install-and-deploy/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/03/hexo-install-and-deploy/"
class=
"post-title-link"
itemprop=
"url"
>
在GitHub上搭建Hexo个人博客
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-03 10:04:45"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-03T10:04:45+08:00"
>
2020-05-03
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar-check"
></i></span>
<span
class=
"post-meta-item-text"
>
更新于
</span>
<time
title=
"修改时间:2020-05-07 11:46:42"
itemprop=
"dateModified"
datetime=
"2020-05-07T11:46:42+08:00"
>
2020-05-07
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Hexo/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Hexo
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h1
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h1><p>
近来发现,之前学习过、实践过的东西,要用的时候经常一时想不起来。习惯性添加进谷歌浏览器的书签,也会因为对方博客文章删除等无法继续看到。特别的是,部署一个东西需要看几个网上资源才可以完成,书签列表越来越长,难以维护。为此,觉得还是很有必要通过写博客的方式进行分类记录,也方便分享经验。本着
<code>
能折腾就不闲着
</code>
的宗旨,在网上查阅有关资料后,决定在
<strong>
GitHub
</strong>
上搭建
<strong>
Hexo
</strong>
个人博客,顺便学习使用
<strong>
Markdown
</strong>
。
</p><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/03/hexo-install-and-deploy/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article></div><script>
<!DOCTYPE html>
<html
lang=
"zh-CN"
><head><meta
charset=
"UTF-8"
><meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,maximum-scale=2"
><meta
name=
"theme-color"
content=
"#222"
><meta
name=
"generator"
content=
"Hexo 4.2.0"
><link
rel=
"apple-touch-icon"
sizes=
"180x180"
href=
"/images/apple-touch-icon-next.png"
><link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"/images/favicon-32x32-next.png"
><link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"/images/favicon-16x16-next.png"
><link
rel=
"mask-icon"
href=
"/images/logo.svg"
color=
"#222"
><link
rel=
"stylesheet"
href=
"/css/main.css"
><link
rel=
"stylesheet"
href=
"/lib/font-awesome/css/all.min.css"
><script
id=
"hexo-configurations"
>
var
NexT
=
window
.
NexT
||
{},
CONFIG
=
{
hostname
:
"
alderaan.xyz
"
,
root
:
"
/
"
,
scheme
:
"
Gemini
"
,
version
:
"
7.8.0
"
,
exturl
:
!
1
,
sidebar
:{
position
:
"
left
"
,
display
:
"
post
"
,
padding
:
18
,
offset
:
12
,
onmobile
:
!
1
},
copycode
:{
enable
:
!
1
,
show_result
:
!
1
,
style
:
null
},
back2top
:{
enable
:
!
0
,
sidebar
:
!
1
,
scrollpercent
:
!
1
},
bookmark
:{
enable
:
!
1
,
color
:
"
#222
"
,
save
:
"
auto
"
},
fancybox
:
!
1
,
mediumzoom
:
!
1
,
lazyload
:
!
1
,
pangu
:
!
1
,
comments
:{
style
:
"
tabs
"
,
active
:
null
,
storage
:
!
0
,
lazyload
:
!
1
,
nav
:
null
},
algolia
:{
hits
:{
per_page
:
10
},
labels
:{
input_placeholder
:
"
Search for Posts
"
,
hits_empty
:
"
We didn't find any results for the search: ${query}
"
,
hits_stats
:
"
${hits} results found in ${time} ms
"
}},
localsearch
:{
enable
:
!
1
,
trigger
:
"
auto
"
,
top_n_per_article
:
1
,
unescape
:
!
1
,
preload
:
!
1
},
motion
:{
enable
:
!
0
,
async
:
!
1
,
transition
:{
post_block
:
"
fadeIn
"
,
post_header
:
"
slideDownIn
"
,
post_body
:
"
slideDownIn
"
,
coll_header
:
"
slideLeftIn
"
,
sidebar
:
"
slideUpIn
"
}}}
</script><meta
property=
"og:type"
content=
"website"
><meta
property=
"og:title"
content=
"Alderaan的博客"
><meta
property=
"og:url"
content=
"https://alderaan.xyz/index.html"
><meta
property=
"og:site_name"
content=
"Alderaan的博客"
><meta
property=
"og:locale"
content=
"zh_CN"
><meta
property=
"article:author"
content=
"Alderaan"
><meta
name=
"twitter:card"
content=
"summary"
><link
rel=
"canonical"
href=
"https://alderaan.xyz/"
><script
id=
"page-configurations"
>
CONFIG
.
page
=
{
sidebar
:
""
,
isHome
:
!
0
,
isPost
:
!
1
,
lang
:
"
zh-CN
"
}
</script><title>
Alderaan的博客
</title><noscript><style>
.sidebar-inner
,
.use-motion
.brand
,
.use-motion
.collection-header
,
.use-motion
.comments
,
.use-motion
.menu-item
,
.use-motion
.pagination
,
.use-motion
.post-block
,
.use-motion
.post-body
,
.use-motion
.post-header
{
opacity
:
initial
}
.use-motion
.site-subtitle
,
.use-motion
.site-title
{
opacity
:
initial
;
top
:
initial
}
.use-motion
.logo-line-before
i
{
left
:
initial
}
.use-motion
.logo-line-after
i
{
right
:
initial
}
</style></noscript><link
rel=
"alternate"
href=
"/atom.xml"
title=
"Alderaan的博客"
type=
"application/atom+xml"
></head><body
itemscope
itemtype=
"http://schema.org/WebPage"
><div
class=
"container use-motion"
><div
class=
"headband"
></div><header
class=
"header"
itemscope
itemtype=
"http://schema.org/WPHeader"
><div
class=
"header-inner"
><div
class=
"site-brand-container"
><div
class=
"site-nav-toggle"
><div
class=
"toggle"
aria-label=
"切换导航栏"
><span
class=
"toggle-line toggle-line-first"
></span><span
class=
"toggle-line toggle-line-middle"
></span><span
class=
"toggle-line toggle-line-last"
></span></div></div><div
class=
"site-meta"
><a
href=
"/"
class=
"brand"
rel=
"start"
><span
class=
"logo-line-before"
><i></i></span><h1
class=
"site-title"
>
Alderaan的博客
</h1><span
class=
"logo-line-after"
><i></i></span></a></div><div
class=
"site-nav-right"
><div
class=
"toggle popup-trigger"
></div></div></div><nav
class=
"site-nav"
><ul
id=
"menu"
class=
"main-menu menu"
><li
class=
"menu-item menu-item-home"
><a
href=
"/"
rel=
"section"
><i
class=
"fa fa-home fa-fw"
></i>
首页
</a></li><li
class=
"menu-item menu-item-about"
><a
href=
"/about/"
rel=
"section"
><i
class=
"fa fa-user fa-fw"
></i>
关于
</a></li><li
class=
"menu-item menu-item-tags"
><a
href=
"/tags/"
rel=
"section"
><i
class=
"fa fa-tags fa-fw"
></i>
标签
</a></li><li
class=
"menu-item menu-item-categories"
><a
href=
"/categories/"
rel=
"section"
><i
class=
"fa fa-th fa-fw"
></i>
分类
</a></li><li
class=
"menu-item menu-item-archives"
><a
href=
"/archives/"
rel=
"section"
><i
class=
"fa fa-archive fa-fw"
></i>
归档
</a></li></ul></nav></div></header><div
class=
"back-to-top"
><i
class=
"fa fa-arrow-up"
></i>
<span>
0%
</span></div><main
class=
"main"
><div
class=
"main-inner"
><div
class=
"content-wrap"
><div
class=
"content index posts-expand"
><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/11/centos7-6-use-meig-4G-module-slm750/"
class=
"post-title-link"
itemprop=
"url"
>
Centos 7.6 下使用美格SLM750(4G模块)拨号上网
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-11 17:40:13 / 修改时间:22:5
5:44
"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-11T17:40:13+08:00"
>
2020-05-11
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Centos/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Centos
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
想要实现4G上网有两种方式,要么加多一个4G路由器,再通过优先接入;要么通过增加4G模块(可为USB或PCIE等多种接口),直接进行拨号上网。尝试在一款J1900工控机上(该工控机自带SIM插槽),通过增加PCIE接口的美格4G模块
<code>
SLM750
</code>
,进行拨号上网。Windows系统下已测试过,直接安装厂家提供驱动,可以正常上网,说明硬件方面是完全支持的。本文参照厂家提供的嵌入式方案,进行驱动编译安装,并编译拨号软件,最终实现工控机4G上网功能。
</p><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/11/centos7-6-use-meig-4G-module-slm750/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/10/mw150us-2-0-mac-driver/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/10/mw150us-2-0-mac-driver/"
class=
"post-title-link"
itemprop=
"url"
>
水星USB无线网卡mw150us苹果macOS系统驱动成功
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-10 15:04:06"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-10T15:04:06+08:00"
>
2020-05-10
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar-check"
></i></span>
<span
class=
"post-meta-item-text"
>
更新于
</span>
<time
title=
"修改时间:2020-05-11 14:20:15"
itemprop=
"dateModified"
datetime=
"2020-05-11T14:20:15+08:00"
>
2020-05-11
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/MacOS/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
MacOS
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
之前修好后的
<strong>
MacBook Pro (13-inch, Mid 2010)
</strong>
,去年开始就发现偶尔找不到自带的无线网卡,用着也还经常死机。屏蔽了无线功能后,一直只能有线上网。最近终于忍不住,要无线上网了。。。由于囊中羞涩,先找了一块
<strong>
MERCURY(水星)
</strong>
的usb无线网卡MW150US 2.0 (170107),想在
<strong>
macOS
</strong>
Hight Sierra 10.13.5上驱动它。
</p><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/10/mw150us-2-0-mac-driver/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/07/hexo-compress/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/07/hexo-compress/"
class=
"post-title-link"
itemprop=
"url"
>
使用Gulp压缩Hexo博客静态资源
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-07 21:06:42"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-07T21:06:42+08:00"
>
2020-05-07
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar-check"
></i></span>
<span
class=
"post-meta-item-text"
>
更新于
</span>
<time
title=
"修改时间:2020-05-11 14:20:15"
itemprop=
"dateModified"
datetime=
"2020-05-11T14:20:15+08:00"
>
2020-05-11
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Hexo/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Hexo
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
由于博客使用的插件较多,文章内包含的图片越多越大,会影响到博客的加载速度,影响访问效果。其中图片对文章加载速度影响较大,如果可以的话,可以使用国内的一些图床,但如果图床挂了,也会导致图片无法访问,迁移麻烦等,所以本博客还是挂在Github上进行访问。为此开始从资源文件大小上进行优化,了解到可以使用
<strong>
Gulp
</strong>
对博客的js、css、img、html等静态资源文件进行压缩。
</p><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/07/hexo-compress/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/07/ssh-to-git-github-com-connection-reset/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/07/ssh-to-git-github-com-connection-reset/"
class=
"post-title-link"
itemprop=
"url"
>
ssh -T git@github.com Connection reset by XXX port 22
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-07 13:34:09 / 修改时间:14:18:27"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-07T13:34:09+08:00"
>
2020-05-07
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Github/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Github
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h2
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h2><p>
今天在用
<strong>
Hexo
</strong>
发布博客文章时,遇到上传
<strong>
Github
</strong>
失败问题,主要提示为
</p><figure
class=
"highlight bash"
><table><tr><td
class=
"gutter"
><pre><span
class=
"line"
>
1
</span><br><span
class=
"line"
>
2
</span><br><span
class=
"line"
>
3
</span><br><span
class=
"line"
>
4
</span><br><span
class=
"line"
>
5
</span><br></pre></td><td
class=
"code"
><pre><span
class=
"line"
>
Connection reset by 52.74.223.119
</span><br><span
class=
"line"
>
fatal: Could not
<span
class=
"built_in"
>
read
</span>
from remote repository.
</span><br><span
class=
"line"
></span><br><span
class=
"line"
>
Please make sure you have the correct access rights
</span><br><span
class=
"line"
>
and the repository exists.
</span><br></pre></td></tr></table></figure><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/07/ssh-to-git-github-com-connection-reset/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/06/hexo-config/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/06/hexo-config/"
class=
"post-title-link"
itemprop=
"url"
>
Hexo博客Next主题美化
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-06 15:01:22"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-06T15:01:22+08:00"
>
2020-05-06
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar-check"
></i></span>
<span
class=
"post-meta-item-text"
>
更新于
</span>
<time
title=
"修改时间:2020-05-07 11:44:34"
itemprop=
"dateModified"
datetime=
"2020-05-07T11:44:34+08:00"
>
2020-05-07
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Hexo/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Hexo
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><p>
本文主要说明在
<strong>
Hexo
</strong>
博客
<strong>
nexT
</strong>
主题下如何进行美化,具体对应效果可通过本博客页面进行查看。
</p><ul><li>
Hexo version: 4.2.0
</li><li>
nexT version:7.8.0
</li></ul><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/06/hexo-config/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article><article
itemscope
itemtype=
"http://schema.org/Article"
class=
"post-block"
lang=
"zh-CN"
><link
itemprop=
"mainEntityOfPage"
href=
"https://alderaan.xyz/2020/05/03/hexo-install-and-deploy/"
><span
hidden
itemprop=
"author"
itemscope
itemtype=
"http://schema.org/Person"
><meta
itemprop=
"image"
content=
"/images/avatar.jpg"
><meta
itemprop=
"name"
content=
"Alderaan"
><meta
itemprop=
"description"
content=
""
></span><span
hidden
itemprop=
"publisher"
itemscope
itemtype=
"http://schema.org/Organization"
><meta
itemprop=
"name"
content=
"Alderaan的博客"
></span><header
class=
"post-header"
><h2
class=
"post-title"
itemprop=
"name headline"
>
<a
href=
"/2020/05/03/hexo-install-and-deploy/"
class=
"post-title-link"
itemprop=
"url"
>
在GitHub上搭建Hexo个人博客
</a></h2><div
class=
"post-meta"
><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar"
></i></span>
<span
class=
"post-meta-item-text"
>
发表于
</span>
<time
title=
"创建时间:2020-05-03 10:04:45"
itemprop=
"dateCreated datePublished"
datetime=
"2020-05-03T10:04:45+08:00"
>
2020-05-03
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-calendar-check"
></i></span>
<span
class=
"post-meta-item-text"
>
更新于
</span>
<time
title=
"修改时间:2020-05-07 11:46:42"
itemprop=
"dateModified"
datetime=
"2020-05-07T11:46:42+08:00"
>
2020-05-07
</time></span><span
class=
"post-meta-item"
><span
class=
"post-meta-item-icon"
><i
class=
"far fa-folder"
></i></span>
<span
class=
"post-meta-item-text"
>
分类于
</span>
<span
itemprop=
"about"
itemscope
itemtype=
"http://schema.org/Thing"
><a
href=
"/categories/Hexo/"
itemprop=
"url"
rel=
"index"
><span
itemprop=
"name"
>
Hexo
</span></a></span></span></div></header><div
class=
"post-body"
itemprop=
"articleBody"
><h1
id=
"概述"
><a
href=
"#概述"
class=
"headerlink"
title=
"概述"
></a>
概述
</h1><p>
近来发现,之前学习过、实践过的东西,要用的时候经常一时想不起来。习惯性添加进谷歌浏览器的书签,也会因为对方博客文章删除等无法继续看到。特别的是,部署一个东西需要看几个网上资源才可以完成,书签列表越来越长,难以维护。为此,觉得还是很有必要通过写博客的方式进行分类记录,也方便分享经验。本着
<code>
能折腾就不闲着
</code>
的宗旨,在网上查阅有关资料后,决定在
<strong>
GitHub
</strong>
上搭建
<strong>
Hexo
</strong>
个人博客,顺便学习使用
<strong>
Markdown
</strong>
。
</p><div
class=
"post-button"
>
<a
class=
"btn"
href=
"/2020/05/03/hexo-install-and-deploy/#more"
rel=
"contents"
>
阅读全文
»
</a></div></div><footer
class=
"post-footer"
><div
class=
"post-eof"
></div></footer></article></div><script>
window
.
addEventListener
(
'
tabs:register
'
,
()
=>
{
let
{
activeClass
}
=
CONFIG
.
comments
;
if
(
CONFIG
.
comments
.
storage
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录