您尚未登录。

#1 2016-09-10 14:53:14

xtricman
エクス·トリクマン
注册时间: 2012-12-26
帖子: 1,267

Archlinux怎么共享Android手机的网络?

笔记本内置无线网卡坏了,想用Nexus 5X手机用RNDIS连上去给电脑上网。
之前在家里用台式机跟一部联想手机搞过,成功了。就是用systemd-networkd把手机连接之后多出来的那张网卡当成普通的dhcp有线网就成功了。参考https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP。
如今用一台笔记本电脑跟Nexus 5X搞,上不了网。networkctl一直显示configuring。
如何破解?难道真的要等我的无线USB网卡到了我才能装系统?到时候我都上课了……
以及这台笔记本内置鼠标也坏了……


反社会,精神极其不稳定,随时可能炸碎身边所有人

离线

#2 2016-09-10 15:49:17

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: Archlinux怎么共享Android手机的网络?

你 ip a 看看有没有一个叫 usb0 之类名字的网卡。有就 dhcpcd usb0 这样子获取一个 IP。获取不到你也可以猜猜看,配置一个静态 IP 上去(记得配置路由)。

我还没用过 systemd 的网络管理呢……

离线

#3 2016-09-10 16:00:40

xtricman
エクス·トリクマン
注册时间: 2012-12-26
帖子: 1,267

Re: Archlinux怎么共享Android手机的网络?

依云 说:

你 ip a 看看有没有一个叫 usb0 之类名字的网卡。有就 dhcpcd usb0 这样子获取一个 IP。获取不到你也可以猜猜看,配置一个静态 IP 上去(记得配置路由)。

我还没用过 systemd 的网络管理呢……

没有什么USB0的网卡,就是你Android手机是可以USB共享网络的,然后连上去之后会多出一张叫做enpxxxx的网卡,这张网卡的话,按理说就像一根从路由器LAN口上直接接出来的网线一样,但实际上dhcpcd是不行的,我试过,曾经用systemd搞成过,如今搞不定了。xp系统也是这样,装了驱动能连上,但是没有网。
估计要等USB无线网卡到货了…要是到时候连WiFi都连不上我就彻底傻逼了。


反社会,精神极其不稳定,随时可能炸碎身边所有人

离线

#4 2016-09-10 16:27:58

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: Archlinux怎么共享Android手机的网络?

名字的事情得找 systemd。我以前一开始是 dhcpcd 的,后来直接用 udev 规则设置静态 IP。可能你的系统不一样

你也可以试试把手机作热点用。

离线

#5 2016-09-10 23:23:14

xtricman
エクス·トリクマン
注册时间: 2012-12-26
帖子: 1,267

Re: Archlinux怎么共享Android手机的网络?

依云 说:

名字的事情得找 systemd。我以前一开始是 dhcpcd 的,后来直接用 udev 规则设置静态 IP。可能你的系统不一样

你也可以试试把手机作热点用。

网络的事情解决了,问题很简单,是手机端操作姿势不对。应该直接开了调试之后在便携热点里开USB共享,不是开发者模式里面。

但是有了一个更加奇葩的问题,这BIOS似乎不能启动grub,这你敢信?!U盘上的grub在几台电脑上都好好的现在就非强迫我usbwriter,然后硬盘上装了grub之后跟没装一个样,直接就认为我的硬盘不可引导。

然后我就搞syslinux吧,然后我是整块硬盘btrfs多个子卷的,syslinux装上了也不能运行…简直呵呵哒。


反社会,精神极其不稳定,随时可能炸碎身边所有人

离线

#6 2016-09-11 10:05:23

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: Archlinux怎么共享Android手机的网络?

-_-||| USB 网络共享不需要调试模式的。

好神奇。是没有 boot 标志呢,还是没有 55CC 那个东西?

离线

#7 2016-09-11 17:25:35

xtricman
エクス·トリクマン
注册时间: 2012-12-26
帖子: 1,267

Re: Archlinux怎么共享Android手机的网络?

依云 说:

-_-||| USB 网络共享不需要调试模式的。

好神奇。是没有 boot 标志呢,还是没有 55CC 那个东西?

I suddenly remind that I don't have a input method on my laptop...
I fix the builtin wireless network card on my laptop, which was regarded as broken for a few years.

I make the whole disk as BTRFS(So I don't have a partition table, neither a bootable label) and install grub on it, I've done it for so many times on other computers and succee every time.

I'm not sure it has the 0x55CC boot signature or not.But since I've succeed for so many times on so many computers, I think that not the problem.

My Archlinux still not bootable, I use the syslinux on my USB disk to chainloader my disk
(yeah, syslinux is from archlinux.iso, I dd it to my usb disk, and the grub on my disk suprisingly works with this method).


反社会,精神极其不稳定,随时可能炸碎身边所有人

离线

#8 2016-09-11 17:31:45

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: Archlinux怎么共享Android手机的网络?

没有分区表还可以安装 grub 啊?那它装到哪里去了呢?

离线

#9 2016-09-11 17:39:02

xtricman
エクス·トリクマン
注册时间: 2012-12-26
帖子: 1,267

Re: Archlinux怎么共享Android手机的网络?

依云 说:

没有分区表还可以安装 grub 啊?那它装到哪里去了呢?

GRUB usually cannot be installed on a partitionless disk, cuz it don't has enough gap space.

but BTRFS is an exception, See Wiki
https://wiki.archlinux.org/index.php/Btrfs#GRUB


反社会,精神极其不稳定,随时可能炸碎身边所有人

离线

#10 2016-10-30 16:33:51

Sasasu
会员
注册时间: 2016-03-02
帖子: 5

Re: Archlinux怎么共享Android手机的网络?

我也遇到了这个问题,我用的是 Nexus5X 7.0 networkmanager 1.4.2-1.
USB WIFI 蓝牙都不能让电脑通过 DHCP 拿到IP地址.怀疑是哪个组件有BUG了..

于是我给共享出来的wifi设置了静态ip.

[connection]
id=Nexus5X
uuid=a438c194-7019-432f-89a6-dfde276098bb
type=wifi
permissions=user:li:;
secondaries=

[wifi]
mac-address-blacklist=
mac-address-randomization=0
mode=infrastructure
seen-bssids=
ssid=Nexus5X

[wifi-security]
group=
key-mgmt=wpa-psk
pairwise=
proto=
psk-flags=1

[ipv4]
address1=192.168.43.2/24,192.168.43.1
dns=114.114.114.114;
dns-search=
method=manual

离线

页脚