Alternatively, join us on Discord.

Using a Router to program and communicate with Atmel AVRs

Started by DarkestEx, May 07, 2015, 12:13:15 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DarkestEx

May 07, 2015, 12:13:15 am Last Edit: September 26, 2016, 04:57:16 pm by DarkestEx
I bought myself a Netgear WNR2200 Router. Not that I need it for it's original purpose, but it is a quite advanced little Linux computer with Wifi and USB actually.
It also has 4 MB Flash for the kernel (you can still use USB with overlay ext4 or fat32 fs to expand up to 32 GB or even more). I built my own firmware for it, which is based on the same Linux distribution as the stock one: OpenWrt.
I am using the trunk version Chaos Calmer which works great on this model, although I needed to patch some files to get it working.
I compiled USB drivers, got the USB chip working and included avrdude (only on overlay fs right now), gcc (overlay fs) and some usb serial FTDI drivers.
I am playing with the idea of letting the router (which I set to client mode wifi), connect to an Arduino / Atmel ATmega chip to get linux and web capabilities.
The router is (as far is I know) more powerful than the Arduino Yun and also a lot cheaper. I bought the router from amazon as used. It was one product that has already been opened but then sent back. It is alright, only the packaging was damaged.

I hope this is somehow useful.
Greetings, Benedikt

Snektron

whoa thats cool, i didn't know Routers ran on Linux :o Maybe i can hack into my own router which we dont use anymore the same way...
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DarkestEx

Quote from: Cumred_Snektron on May 07, 2015, 07:47:56 am
whoa thats cool, i didn't know Routers ran on Linux :o Maybe i can hack into my own router which we dont use anymore the same way...

I am sure thats possible.
You should really try it.
Just ask me if you need any help.

DJ Omnimaga

Wait, does a router have a CPU? I am curious about how well it could run actual softwares such as a small game or text displaying routine?

Snektron

Well appearantly it has. I haven't really though about it before though...
Also i think it would be quite well, considering you probably need a few hundred Mhz to run such a thing
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Duke "Tape" Eiyeron

A router does have a system (at least the high-end ones) to manage filtering, groups and redistribution. I remember in class having to use minicom to communicate to a router to configure it. I remember well this exercise becaus my glasses broke just before an eight-hour work. Cue headache after 20 minutes.

DarkestEx

Quote from: DJ Omnimaga on May 09, 2015, 04:51:55 am
Wait, does a router have a CPU? I am curious about how well it could run actual softwares such as a small game or text displaying routine?

Yes it does ;)
Think about it: These things need to deliver gigabit Ethernet and do WLAN, so they need some kind of processor and OS to handle all this.
Most routers run Linux as their OS, but some do run a proprietary RTOS.

E.g. the router I'm using in this case (Netgear WNR2200) has following specs:
CPU: Atheros AR7241 (MIPS architecture) @ 360 MHz
RAM: 64 Mb
Flash: 8 Mb
Interfaces: 1x USB 2.0, 5x Ethernet (1x WAN + 4x LAN @ 100 Mbit/s), Wifi (IC: AR9287, bgn, Host + Client Mode), JTAG, Serial, SPI
I/O: ~22 LEDs, 3 Buttons, and possibly more GPIO inside
Image:
Big Image: ShowHide


Yes, it certainly is able to run a terminal game over SSH.
It could probably even drive an LCD or using another PC as an X11 server and run a graphics game.

Streetwalrus

Some routers run some kind of BSD too. pfSense is based on freebsd and is another custom router firmware.

DJ Omnimaga

Quote from: DarkestEx on May 09, 2015, 09:12:10 pm
Quote from: DJ Omnimaga on May 09, 2015, 04:51:55 am
Wait, does a router have a CPU? I am curious about how well it could run actual softwares such as a small game or text displaying routine?

Yes it does ;)
Think about it: These things need to deliver gigabit Ethernet and do WLAN, so they need some kind of processor and OS to handle all this.
Most routers run Linux as their OS, but some do run a proprietary RTOS.

E.g. the router I'm using in this case (Netgear WNR2200) has following specs:
CPU: Atheros AR7241 (MIPS architecture) @ 360 MHz
RAM: 64 Mb
Flash: 8 Mb
Interfaces: 1x USB 2.0, 5x Ethernet (1x WAN + 4x LAN @ 100 Mbit/s), Wifi (IC: AR9287, bgn, Host + Client Mode), JTAG, Serial, SPI
I/O: ~22 LEDs, 3 Buttons, and possibly more GPIO inside
Image:
Big Image: ShowHide


Yes, it certainly is able to run a terminal game over SSH.
It could probably even drive an LCD or using another PC as an X11 server and run a graphics game.
Can it run DOOM? O.O

DarkestEx

Quote from: DJ Omnimaga on May 13, 2015, 06:54:54 am
Quote from: DarkestEx on May 09, 2015, 09:12:10 pm
Quote from: DJ Omnimaga on May 09, 2015, 04:51:55 am
Wait, does a router have a CPU? I am curious about how well it could run actual softwares such as a small game or text displaying routine?

Yes it does ;)
Think about it: These things need to deliver gigabit Ethernet and do WLAN, so they need some kind of processor and OS to handle all this.
Most routers run Linux as their OS, but some do run a proprietary RTOS.

E.g. the router I'm using in this case (Netgear WNR2200) has following specs:
CPU: Atheros AR7241 (MIPS architecture) @ 360 MHz
RAM: 64 Mb
Flash: 8 Mb
Interfaces: 1x USB 2.0, 5x Ethernet (1x WAN + 4x LAN @ 100 Mbit/s), Wifi (IC: AR9287, bgn, Host + Client Mode), JTAG, Serial, SPI
I/O: ~22 LEDs, 3 Buttons, and possibly more GPIO inside
Image:
Big Image: ShowHide


Yes, it certainly is able to run a terminal game over SSH.
It could probably even drive an LCD or using another PC as an X11 server and run a graphics game.
Can it run DOOM? O.O

Probably yes :P

Snektron

Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DarkestEx


DarkestEx

May 13, 2015, 03:25:12 pm #12 Last Edit: May 13, 2015, 03:27:42 pm by DarkestEx
Wooha, that would cost me 22€ for the TFT.  O.O
As soon as I can confirm that I have access to the hardware SPI, I will go ahead and buy the TFT.

DJ Omnimaga


DarkestEx

So I think that I will make a WiFi music player with an LCD out of it.
That will probably be the best thing to do with it. The doom thing will have to wait.

Powered by EzPortal