Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

After wifi is used as a hotspot in SAIL-AM335x, other devices can access the external network through the wifi hotspot.

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

What I want to share with you today is the method for other devices to access the external network through the wifi hotspot in sail-am335x through the wifi hotspot. The specific steps are as follows:

1.335x has been transplanted before the hostapd; can be directly used as rtwap, the password is 87654321

2.dhcpd profile modification

Create an empty file / var/db/dhcpd.leases

Mkdir-p / var/db

Touch / var/db/dhcpd.leases

3.ifconfig eth0 up

Udhcpc-I eth0

Ifconfig wlan0 up

Ifconfig wlan0 10.5.5.1 netmask 255.255.255.0

Echo 1 > / proc/sys/net/ipv4/ip_forward / turn on IP forwarding /

/ sbin/iptables-t nat-A POSTROUTING-oeth0-j MASQUERADE

Set the promiscuous mode of the network card

Ifconfig wlan0 promisc

[3725.324000] device wlan0 enteredpromiscuous mode

Dhcpd-cf / etc/dhcpd.conf wlan0 &

Hostapd / etc/hostapd.conf-B

4. Iptables is needed in the previous command, and iptables needs to be migrated in the file system (iptables compilation)

. / configure-host=arm-arago-linux-gnueabi--prefix=/root/335x/localcode/iptables/install-disable-nftables--with-ksource=/root/335x/localcode/kernel-3.2.0-enable-static-disable-shared

Make

Make install

After compilation, you need to port iptables to the development board.

Iptables support also needs to be configured in the kernel

[*] Networking support->

Networking options-- > [*] Network packet filteringframework (Netfilter)-- > Core NetfilterConfiguration-- > (all selected) IP: NetfilterConfiguration-- > (all selected)

C method that other devices can access the external network through the YM hotspot after wifi is used as a hotspot in the wifi hotspot.

1.335x has been transplanted before the hostapd; can be directly used as rtwap, the password is 87654321

2.dhcpd profile modification

Create an empty file / var/db/dhcpd.leases

Mkdir-p / var/db

Touch / var/db/dhcpd.leases

3.

Ifconfig eth0 up

Udhcpc-I eth0

Ifconfig wlan0 up

Ifconfig wlan0 10.5.5.1 netmask 255.255.255.0

Echo 1 > / proc/sys/net/ipv4/ip_forward / turn on IP forwarding /

/ sbin/iptables-t nat-A POSTROUTING-oeth0-j MASQUERADE

Set the promiscuous mode of the network card

Ifconfig wlan0 promisc

[3725.324000] device wlan0 enteredpromiscuous mode

Dhcpd-cf / etc/dhcpd.conf wlan0 &

Hostapd / etc/hostapd.conf-B

4. Iptables is needed in the previous command, and iptables needs to be migrated in the file system (iptables compilation)

. / configure-host=arm-arago-linux-gnueabi--prefix=/root/335x/localcode/iptables/install-disable-nftables--with-ksource=/root/335x/localcode/kernel-3.2.0-enable-static-disable-shared

Make

Make install

After compilation, you need to port iptables to the development board.

Iptables support also needs to be configured in the kernel

[*] Networking support->

Networking options-- > [*] Network packet filteringframework (Netfilter)-- > Core NetfilterConfiguration-- > (all selected) IP: NetfilterConfiguration-- > (all selected)

The above steps are based on the sail-am335 development board of Electric Fish Electronics as an example.

After these small steps, other devices can successfully connect to the external network through the wifi hotspot.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report