Join us on Discord!
You can help CodeWalrus stay online by donating here.

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 2 Guests are viewing this topic.

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
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

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...
  • Calculators owned: TI-84+
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.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Dream of 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?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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
  • Calculators owned: TI-84+
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.
  • Calculators owned: A lot.

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: [spoiler=Big Image][/spoiler]

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.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

novenary

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

Dream of 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: [spoiler=Big Image][/spoiler]

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
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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: [spoiler=Big Image][/spoiler]

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
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Snektron

  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DarkestEx

  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

DarkestEx

#12
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.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Dream of Omnimaga

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Powered by EzPortal