Active Topics

 


Reply
Thread Tools
Posts: 470 | Thanked: 173 times | Joined on Oct 2009 @ Melb
#1
I have a raspberry pi, and as you or may not know, the pi doesn't support wifi.

Been googling to no avail, everyboy just wants to use that 3g, but all I want is that wifi.


Is there any way to turn my N900 into a wifi dongle for my pi?

Cheers
 
Posts: 470 | Thanked: 173 times | Joined on Oct 2009 @ Melb
#2
Or even if you can do it with an N9?
 
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#3
It is possible with both but easier with N900 I will make a tutorial in the next days. At the moment I am pretty busy.
 
Posts: 38 | Thanked: 46 times | Joined on Dec 2012 @ rochester
#4
I believe if you should search " how to tether the raspberry pi" you might find some usefull tutorial or something. Does the raspberry pi recognize the n900 when you plug it in?
 
Posts: 470 | Thanked: 173 times | Joined on Oct 2009 @ Melb
#5
the issue is, all those tutorials just bridge usb > 3g

I need usb > wifi
 
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#6
I hope I did understand you right.

Here a small example that it looks like your rasperry pi is connected to the wlan:

Requirements:
N900 with iptables (powerkernel)

Assuming your networks are:

Wlan 192.168.1.x
USB 192.168.2.x

PC in wlan network 192.168.1.10
N900 in wlan 192.168.1.14 and usblan 192.168.2.15
raspberry pi (RPI) in usblan 192.168.2.14

PC
Code:
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.14 dev wlan0
N900
Code:
route delete default

iptables -t nat -A PREROUTING -s 192.168.1.0/16 -i wlan0 -j DNAT --to-destination 192.168.2.15

iptables -t nat -A PREROUTING -s 192.168.2.0/16 -i usb0 -j DNAT --to-destination 192.168.1.14
When you want to use only the local lan (no internet), you don't need the iptable rules. Instead you can activate forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forwarding


RPI
Code:
route add default gw 192.168.2.15 dev usb0
When you need internet don't forget to add a DNS.

Last edited by Halftux; 2013-07-17 at 18:35. Reason: IP digit error
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 16:40.