添加WEP 加密WiFi支持 for RTEMS-libbsd on BBB BSP

本文介绍了如何为 RTL8188EU USB WiFi 芯片驱动添加 WEP 加密支持,并提供了在 rtems 操作系统中配置 WEP 加密的具体步骤。此外还讲解了如何通过 shell 命令设置 WEP 连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在实现USB WiFi 芯片 rtl8188eu驱动后,接下来开始实现加密WiFi: WEP,目前rtems的GitHub上的master 已经merge了本人贡献的WEP代码,可以自行前去下载。



1.Add the WEP module suppport in nexus-devices.h

我们需要加密算法模块的支持,因此在nexus-devices.h中添加wlan_wep模块的支持。

+SYSINIT_MODULE_REFERENCE(wlan_wep);


2.Add the encrypted module support in rtems-kernel-init.c

The crypto module not support in kernel-init.c. So we need add this support:


diff --git a/rtemsbsd/rtems/rtems-kernel-init.c b/rtemsbsd/rtems/rtems-kernel-init.c

index 594e1ba..4138bc1 100644

--- a/rtemsbsd/rtems/rtems-kernel-init.c

+++ b/rtemsbsd/rtems/rtems-kernel-init.c

@@ -72,6 +72,8 @@ typedef void (*ratectl_modevent)(int);

RTEMS_BSD_DEFINE_SET(ratectl_set, ratectl_modevent);

typedef void (*scanner_modevent)(int);

RTEMS_BSD_DEFINE_SET(scanner_set, scanner_modevent);

+typedef void (*crypto_modevent)(int);

+RTEMS_BSD_DEFINE_SET(crypto_set, crypto_modevent);

RTEMS_BSD_DEFINE_SET(sysctl_set, struct sysctl_oid *);


RTEMS_BSD_DEFINE_RWSET(sysinit_set, struct sysinit *);



WEP支持就算完成了,那么如何在shell command中配置WEP连接


1.Firstly, we need create a wlan device via ifconfig:

ifconfig wlan0 create wlandev rtwn0
The wlan name is wlan0, the real WiFi device name is rtwn0.


2. Connect WEP WiFi via ifconfig

ifconfig wlan0 inet 192.168.1.100 netmask 255.255.255.0 \
     ssid my_net wepmode on weptxkey 1 wepkey 1:0x3456789012


The ip address is inet, the ssid of my_net is the name of router name, the weptxkey is a index of key, the default is 1, wepkey is the WiFi password.

With these two command, you can connect WiFi via WEP encrypted WiFi.


And by the way, we need set the mode of WEP in wireless router in "open system", instead of the "shared" mode. Because it uses the WEP key in a very restricted way, the attacker can easily break the key

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值