Tiny Core Base > Raspberry Pi
eth0 to wlan0 Bridge
yeme:
I have had some success in getting this going except with 2 problems for me:
1. I cannot SSH via PuTTY into PiCore after the bridge is set and working
2. The bridged connection always disconnects after about 30 minutes.
When it is up, I can receive an IP for the connected client (or the client can have a static IP) and browse with performance similar to my RPi bridge I've been using. I can also ping my LAN and web from my client (laptop) and browse at network level shared folders on my LAN. I can also ping and browse network shares from my LAN to the connected client.
I also was able to have my connected IP camera work as it should for the 30 minute period the bridge was up. I could not however connect to the camera's web server admin page via browser as would normal.
Here is my modified bootlocal.sh script adapting Paul_123's original post:
Details:
RPi B+
PiCore 7 alpha 8
Added bridge-utils.tcz (thanks to bMarkus)
Here is my modified bootlocal.sh script using Paul_123's original post:
--- Quote ---#wlan0 up
/usr/local/bin/wifi.sh -a -w 2>&1 > /tmp/wifi.log
sleep 5s
ifconfig eth0 up
ifconfig wlan0 up
#setup br0
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 wlan0
sleep 10s
ifconfig br0 up
# wpa piece
#wpa_supplicant -Dwext -iwlan0 -bbr0 -c /etc/wpa_supplicant.conf & #(could not get this work for me)
#set br0 ip
sleep 5s
udhcpc -i br0
--- End quote ---
Upon startup when udhcpc is started I see:
getting lease (which it does 192.168.4.70)
deleting routers
route:.....no such process
adding dns 192.168.4.1 (my LAN gw/router's IP )
My ifconfig - this shows an IP assigned to the wlan0 and the Br0 whereas the ifconfig for the working bridge on the RPi only has an IP assigned to the Br0
--- Quote ---br0 Link encap:Ethernet HWaddr 74:DA:38:0D:27:5A
inet addr:192.168.4.70 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::76da:38ff:fe0d:275a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:408 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:97737 (95.4 KiB) TX bytes:1332 (1.3 KiB)
eth0 Link encap:Ethernet HWaddr B8:27:EB:DB:DF:72
inet6 addr: fe80::ba27:ebff:fedb:df72/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:526 errors:0 dropped:0 overruns:0 frame:0
TX packets:281 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:143673 (140.3 KiB) TX bytes:99120 (96.7 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 74:DA:38:0D:27:5A
inet addr:192.168.4.70 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::76da:38ff:fe0d:275a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:281 errors:0 dropped:224 overruns:0 frame:0
TX packets:460 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:121301 (118.4 KiB) TX bytes:156423 (152.7 KiB)
--- End quote ---
Finally my route info:
--- Quote ---Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default SpiR 0.0.0.0 UG 0 0 0 br0
default SpiR 0.0.0.0 UG 0 0 0 wlan0
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
192.168.4.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.4.0 * 255.255.255.0 U 0 0 0 br0
--- End quote ---
This table varies from the route table on the working Pi bridge. (SpiR is the router name)
I would be satisfied with this setup if the br0 stayed connected and remained that way.
Paul_123:
You cannot use the built in wifi.sh script. You must need to bring up the bridge first. You need to figure out how to use wpa_supplicant directly.
You will need a working wpa_supplicant.conf. Which should be as simple as this
--- Code: ---network={
ssid="MYSSID"
psk="passphrase"
}
--- End code ---
You can use wpa_passphrase to generate this too.
I found my SD card with the bridge setup. I modified the original wifi.sh script to do bridging.
If you use this,
bootlocal.sh looks like
--- Code: ---#!/bin/sh
# Start serial terminal
/usr/sbin/startserialtty &
# Set CPU frequency governor to ondemand (default is performance)
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Load modules
/sbin/modprobe i2c-dev
# Start openssh daemon
/usr/local/etc/init.d/openssh start
# ------ Put other system startup commands below this line
/home/tc/bridgewifi.sh -a
--- End code ---
I have attached the script.............. I have not re-tested this, but it was working under piCore 6.1
yeme:
Paul_123,
I will make the changes and let you know.
Thanks again for your attention to this for me!
yeme:
It works! I can now SSH via PuTTY also.
I placed your new script in /opt because I couldn't get it to persist in /home/tc - any problems with this location?
Paul_123:
It should persist in the /home/tc as long as you backup after putting the file there. But nothing wrong in /opt
Check the contents of /opt/.filetool.lst for the directories and files that get backed up
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version