Making 1072 A Wifi Router

Supporting 2.6 and up
n1849778
Phidgeteer!
Posts: 58
Joined: Thu Oct 21, 2010 5:22 pm
Contact:

Making 1072 A Wifi Router

Postby n1849778 » Mon Nov 28, 2011 4:27 pm

Hello All Phidgets-tians,

I am trying to write a program in C for SBC 1072 which will mimic similar function as a WiFi router. Similar function as a Linksys or D Link router, just to name a few.

I am not looking to make it overly complicated with firewall, port forwarding, website blocking and such. But it should be detectable by a wireless card on a laptop and be able to connect to the SBC 1072 just like a router. Once connected, the use should be able to browse the Phidgets web pages from their laptop.

Is this task possible in Phidget SBC 1072? Or does Phidget have another card with these wireless connection capability?

Thanks in advance.

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Making 1072 A Wifi Router

Postby Patrick » Tue Nov 29, 2011 10:44 am

The wireless adapter we sell doesn't support Manager mode - so you won't be able to have it show up as a router would. You could run it in Ad-Hoc mode. I'm not sure if there are any USB adapter with Manager mode support and Linux support both.

Setting up routing, NAT, DHCP, iptables, etc. should be quite easy if you are familiar with Linux networking.

-Patrick

n1849778
Phidgeteer!
Posts: 58
Joined: Thu Oct 21, 2010 5:22 pm
Contact:

Re: Making 1072 A Wifi Router

Postby n1849778 » Wed Nov 30, 2011 2:09 pm

With Ad-hoc mode in Linux, will I be able to "pick-up" the SBC as a WiFI access point (much like a router) with out having to do further configuration(s) in the laptop?

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Making 1072 A Wifi Router

Postby Patrick » Wed Nov 30, 2011 5:15 pm

It will show up as an ad-hoc network in your list which you can join.

-Patrick

n1849778
Phidgeteer!
Posts: 58
Joined: Thu Oct 21, 2010 5:22 pm
Contact:

Re: Making 1072 A Wifi Router

Postby n1849778 » Thu Dec 01, 2011 5:19 pm

Patrick,

Is there any manual or guide I can read about this for topic? Thanks.

n1849778
Phidgeteer!
Posts: 58
Joined: Thu Oct 21, 2010 5:22 pm
Contact:

Re: Making 1072 A Wifi Router

Postby n1849778 » Fri Dec 02, 2011 7:30 am

Is the Wifi card sold my Phidgets uses MadWifi driver?

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Making 1072 A Wifi Router

Postby Patrick » Fri Dec 02, 2011 9:49 am

We use the zd1211rw driver which runs on the mac80211 stack.

The ad-hoc network would need to be set up from the command line.

-Patrick

n1849778
Phidgeteer!
Posts: 58
Joined: Thu Oct 21, 2010 5:22 pm
Contact:

Re: Making 1072 A Wifi Router

Postby n1849778 » Wed Dec 07, 2011 10:24 am

Patrick,

With ad-hoc mode, I can see the SBC wifi SSID and connect to it.But the SBC does not provide IP address to my laptop wifi. I have to manually assign the IP address.

If I install DHCP server on the SBC using "apt-get", will the DHCP server function only apply to the wifi adapter? Or does it apply to both the wifi adapter and the ethernet port?

Thanks!

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Making 1072 A Wifi Router

Postby Patrick » Wed Dec 07, 2011 10:31 am

You just need to configure the DHCP server to provide addresses to whichever adapter you like.

If you turn on forwarding and setup the firewall properly, you could probably even use the SBC to bridge your internet connection from ethernet to wireless - acting as a sort of Wireless Access point. This does require a bit of work and it helps if you have experience with networking and Linux.

I've heard that Master mode for our adapter is supported as of kernel 2.6.39, so it may even be possible to become a full-fledged access point whenever we next upgrade the kernel.

-Patrick

n1849778
Phidgeteer!
Posts: 58
Joined: Thu Oct 21, 2010 5:22 pm
Contact:

Re: Making 1072 A Wifi Router

Postby n1849778 » Fri Dec 09, 2011 6:37 am

Patrick,

This is what I have right now for Kernel version.

Linux version 2.6.36.3 (patrick@debian) (gcc version 4.3.5 (Debian 4.3.5-4) ) #21 PREEMPT Fri Feb 18 11:05:40 MST 2011

I was trying to upgrade my Kernel using you web downloaded Kernel patch, "phidgetsbc2-kerneldev_1.0.0.20110615.tar", and I get the following error messages.


Using username "root".
root@10.0.45.94's password:
Linux butter 2.6.36.3 #21 PREEMPT Fri Feb 18 11:05:40 MST 2011 armv4tl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@butter:~# cd /usr/
root@butter:/usr# patch -p1 < ./linux-2.6.36.3-phidget_sbc2.patch
patching file arch/arm/configs/phidget_sbc2_defconfig
patching file arch/arm/configs/phidget_sbc_defconfig
patching file arch/arm/Kconfig
Hunk #1 FAILED at 54.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm/Kconfig.rej
patching file arch/arm/mach-s3c2410/Kconfig
Hunk #1 FAILED at 178.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm/mach-s3c2410/Kconfig.rej
patching file arch/arm/mach-s3c2410/mach-phidget_sbc.c
patching file arch/arm/mach-s3c2410/Makefile
Hunk #1 FAILED at 32.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm/mach-s3c2410/Makefile.rej
patching file arch/arm/mach-s3c2440/Kconfig
Hunk #1 FAILED at 186.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm/mach-s3c2440/Kconfig.rej
patching file arch/arm/mach-s3c2440/mach-phidget_sbc2.c
patching file arch/arm/mach-s3c2440/Makefile
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm/mach-s3c2440/Makefile.rej
patching file drivers/leds/leds-s3c24xx.c
Hunk #1 FAILED at 90.
1 out of 1 hunk FAILED -- saving rejects to file drivers/leds/leds-s3c24xx.c.rej
patching file drivers/media/video/uvc/uvc_driver.c
Hunk #1 FAILED at 1651.
Hunk #2 FAILED at 1991.
Hunk #3 FAILED at 1999.
Hunk #4 FAILED at 2007.
Hunk #5 FAILED at 2015.
Hunk #6 FAILED at 2023.
Hunk #7 FAILED at 2031.
7 out of 7 hunks FAILED -- saving rejects to file drivers/media/video/uvc/uvc_driver.c.rej
patching file drivers/media/video/uvc/uvc_v4l2.c
Hunk #1 FAILED at 531.
1 out of 1 hunk FAILED -- saving rejects to file drivers/media/video/uvc/uvc_v4l2.c.rej
patching file drivers/media/video/uvc/uvc_video.c
Hunk #1 FAILED at 55.
Hunk #2 FAILED at 1218.
2 out of 2 hunks FAILED -- saving rejects to file drivers/media/video/uvc/uvc_video.c.rej
patching file drivers/media/video/uvc/uvcvideo.h
Hunk #1 FAILED at 183.
Hunk #2 FAILED at 463.
Hunk #3 FAILED at 653.
3 out of 3 hunks FAILED -- saving rejects to file drivers/media/video/uvc/uvcvideo.h.rej
patching file drivers/mtd/nand/nand_ids.c
Hunk #1 FAILED at 81.
1 out of 1 hunk FAILED -- saving rejects to file drivers/mtd/nand/nand_ids.c.rej
patching file drivers/mtd/nand/s3c2410.c
Hunk #1 FAILED at 864.
1 out of 1 hunk FAILED -- saving rejects to file drivers/mtd/nand/s3c2410.c.rej
patching file drivers/net/dm9000.c
Hunk #1 FAILED at 34.
Hunk #2 FAILED at 48.
Hunk #3 FAILED at 80.
Hunk #4 FAILED at 721.
Hunk #5 FAILED at 1364.
Hunk #6 FAILED at 1537.
Hunk #7 FAILED at 1578.
7 out of 7 hunks FAILED -- saving rejects to file drivers/net/dm9000.c.rej
patching file drivers/net/dm9000.h
Hunk #1 FAILED at 51.
1 out of 1 hunk FAILED -- saving rejects to file drivers/net/dm9000.h.rej
patching file drivers/rtc/Kconfig
Hunk #1 FAILED at 30.
Hunk #2 FAILED at 52.
2 out of 2 hunks FAILED -- saving rejects to file drivers/rtc/Kconfig.rej
patching file drivers/rtc/Makefile
Hunk #1 FAILED at 8.
1 out of 1 hunk FAILED -- saving rejects to file drivers/rtc/Makefile.rej
patching file drivers/rtc/systohc.c
The next patch would delete the file .gitignore,
which does not exist! Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored
patching file kernel/time/ntp.c
Hunk #1 FAILED at 74.
Hunk #2 FAILED at 331.
Hunk #3 FAILED at 532.
3 out of 3 hunks FAILED -- saving rejects to file kernel/time/ntp.c.rej
The next patch would delete the file .mailmap,
which does not exist! Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored
patching file Makefile
Hunk #1 FAILED at 188.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file net/ipv4/arp.c
Hunk #1 FAILED at 732.
1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/arp.c.rej
root@butter:/usr#
root@butter:/usr#


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 0 guests