Absolutely New on NGW100

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys, hopefully I posted in the right section.

I'm still trying to get the hang of this. I was tasked (as part of my studies) to take the NGW100 and make a webserver out of it.

While I'm familiar with command lines as such (I know dos!!! ;) ) I'm not the least bit familiar with linux and its commands.

So I'm asking you if you could point me to some sites or other resources that will help me through the day.

What I did so far: Connect The Ngw100 and started up hyperterminal from windows. Could see the booting sequence. Browsed around the files. I know two commands now: ls -l and cd. good old dos ;)
Ah yeah, and read this: https://www.avrfreaks.net/wiki/in...

My next tasks should be: The linux OS is to be saved in order to recover the original state (sorry im not a native speaker :( ).
And the next task is installing Midnight commander for easier data management that vi.

Can someone help me, getting some infos as how to do that?

Any help is appreciated. Thank you

Regards, rene

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The original filesystem is freely available and can be restored from uboot. You don't need to do anything to back this up.

If you want to cross compile something (including midnight commander), you'll need the toolchain installed then have a look at http://avr32linux.org/twiki/bin/... . You can get a toolchain at atmel.com/avr32

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm still trying to get the hang of this. I was tasked (as part of my studies) to take the NGW100 and make a webserver out of it.

Have you tried plugging in the network cable?? There is already a webserver on the Network Gateway :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ttyridal wrote:
Have you tried plugging in the network cable?? There is already a webserver on the Network Gateway :)

not bad :lol:

Women weaken legs...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually, now in that moment, the NGW IS connected to the network and operating :D

What I did the last days was, following https://www.avrfreaks.net/wiki/index.php/Documentation:NGW/Firmware_upgrade this and trying to get that img on the SD card, in order to get a recovery thingy. Thing is, i get a bad MBR error when i try and update the OS. Could it be that the SD card is b0rked? Because i had to use SD Formatter 2.0 (a panasonic tool) to get the thing running.

Other than that im quite happy so far.

Greetings, René

edit: I followed the networking tutorial https://www.avrfreaks.net/wiki/in... and changed the ip address (not the boot time configuration). Connected it to the university LAN.

Now I can ping it from this PC, but i can't access it via Browser nor via ftp.
Ip address and subnetmask is ok, i asked the Admin.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Regarding network access. Is it the WAN port (eth0) that is connected to your PC? In that case you need to allow httpd to answer on the associated subnet. It defaults to the LAN interface IP subnet (eth1) in the original SW.
See /etc/httpd.conf.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ReneG8 wrote:
Thing is, i get a bad MBR error when i try and update the OS. Could it be that the SD card is b0rked? Because i had to use SD Formatter 2.0 (a panasonic tool) to get the thing running.
A common mistake is to dd (byte-for-byte copy) a non-filesystem image to the card, or to cp (normal copy) a filesystem image to the card. It sounds like you _may_ have done the former.

Some of the images floating around the place include the partition table, boot records and filesystem spoodge ready for a direct byte-for-byte copy to the card. This then replaces all the existing filesystem info on the card. Other images are more like tarballs of files and need to be extracted to the card.

Another common mistake is to, for example, dd an jffs2 (flash filesystem) image to an SD card. The SD card should only boot off ext2 filesystems.

As I say, don't know whether you did any of those things, but something to check :)

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What I did do was: take a card given to me by my instructor and made a dd copy of a firmware update image. I actually followed this https://www.avrfreaks.net/wiki/in... precisely. I hope this explains everything squidgit. (btw i looooove australia, i'm trying to do my intership somewhere in your country.)

When i got another card and did the latter i worked fine tho. So this tasked is "mastered".

Quote:
If you want to cross compile something (including midnight commander), you'll need the toolchain installed then have a look at http://avr32linux.org/twiki/bin/... ... plications . You can get a toolchain at atmel.com/avr32

I have done this so far, as to download the toolchain and installing it. But I'm completely lost on how to operate there. Never done it, can't find helpfiles. And the page talks about things i don't understand (yet). Is there something like a tut or a starters guide? help :(

Today I'm gonna check the networking things and will probably update this post with my findings.

[edit1] Changed the Ip following this tutorial https://www.avrfreaks.net/wiki/in... . My Instructor gave me 192.168.230.227 as an ip for internal checking. When I ping said ip i get an answer, but I get a 403 when entering the ip in a browser.

YOu've been a great help so far, many thanks.

René

Last Edited: Mon. Oct 15, 2007 - 10:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ReneG8 wrote:
(btw i looooove australia, i'm trying to do my intership somewhere in your country.)
Great! If you're anywhere near the ACT look us up, I'll buy you a beer :twisted:
ReneG8 wrote:

I have done this so far, as to download the toolchain and installing it. But I'm completely lost on how to operate there. Never done it, can't find helpfiles. And the page talks about things i don't understand (yet). Is there something like a tut or a starters guide? help :(
Not really more of a tutorial than the link I already gave. The problem is that each software package tends to cross compile differently (if at all). Refer to the compilation instructions for Midnight Commander but, given it's a GNU application it will probably use the autotools system.

With this, you have a configure script to which you pass a series of options describing what you want to build and how. To see a complete list of options run ./configure --help. The option to specify which architecture to compile for is --host=avr32-linux. If this step throws an error regarding not being able to recognize avr32-linux then google for config.sub, download it and replace all the config.sub's in your source tree with the latest one.

If all other options are fine at their defaults then simply running

#: ./configure --host=avr32-linux --prefix=/usr/avr32-linux

should do it. The prefix option specifies where to place the headers and libraries if and when you run 'make install'. If you don't specify this then libraries for the avr32 will be installed in place of libraries for your host pc, you don't want that!

Once the configure script has completed, run make and all should be alright. Hopefully.

If I have a spare millisecond I'll try and compile it myself, see if anything unexpected pops up.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are still too fast, and expect too much from me, I'm afraid.

I know you probably don't have enough time, but please be more specific as what to do. :) Like "start up toolchain, do commando a, do commando b". You have to treat me like a complete noobie in that regard I'm afraid.

I appreciate your effort really.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:)

The toolchain isn't anything you can start, it's a collection of things, at least one of which will probably at some stage be started. Compilers, linkers etc.

To compile your own C stuff have an eye over https://www.avrfreaks.net/wiki/in...

For cross compiling, extract all the source to some directory and, as a starting point, run

#: ./configure --host=avr32-linux --prefix=/usr/avr32-linux
#: make

And see if anything breaks :)

Another option, to get your eye in, would be to have an eye over http://avr32linux.org/twiki/bin/... and try compiling some of the things which have instructions there. Simple ones would be NCurses, Lynx, LibAio etc. Even if these aren't useful to you it'll help you get a feel for what needs to be done where. MPlayer is slightly more advanced if you're feeling a bit adventurous.

Let us know how you go.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok and where actually do I do this?

Do i have to get it onto the ngw, do i have to do it on my windows pc? Because the command looks so linuxish.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok update on the networking situation.
I changed the ip address and was able to connect to the ftp and exchange data. But i was not able to get into the webinterface.
I assume i has to do with the still active (!?) dhcp.

How do I turn that off?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ReneG8 wrote:
ok and where actually do I do this?

Do i have to get it onto the ngw, do i have to do it on my windows pc? Because the command looks so linuxish.

In Cygwin.
ReneG8 wrote:
But i was not able to get into the webinterface.
I assume i has to do with the still active (!?) dhcp.

How do I turn that off?

If you can ftp it doesn't seem likely that dhcp is your issue. If you don't have a dhcp server on your network you may as well let the ngw be it. Do you want to stop your NGW being a dhcp server or a client? Do you want to give it a static IP or stop it trying to assign others a dynamic one?

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ReneG8:

Did you check out the /etc/httpd.conf (on the ngw) as thordur suggested?

If you can do ftp the problem is :
1) bad configuration
2) httpd not running

the defaults look something like this

~# cat /etc/httpd.conf

# Allow trafic from local LAN
A: 10.0.0.0/24
# Deny all other trafic
D: *

use

~# vi /etc/httpd.conf

and change that A: line to something like

A: *

(vi reference: http://www.lagmonster.org/docs/v...)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did what you said. Changed the A: line to a simple '*'. But unfortunately, after I changed the ip address I still wasn't able to connect via webinterface. ftp works fine though.

The situation for the LAN is: NGW is connected to University internal net so far. I was given a static LAN ip for th time being for the NGW. After I am finished configuring it it will get another one and be placed in the server room to act as a webserver with a homepage on it.

So ngw doesn't have to act as dhcp server and probbably shouldn't, to not cause any networking issues.

I am given a static ip for the ngw so no dhcp whatsoever.

In the httpd.conf there are entries which look like username/password entries. Am I able to change them or add other username/password. If so, is there any file containing the same username/password combinations for ftp, or are they the same? Because another task would be, to make the ngw haking secure. Me I have never hacked.

Thanks for your efforts so far. Squidgit I delayed the porting issues of MC so far, because I can get along with vi and the online help to it. Its somewhat more of an optional. Probably will get back to it later.

You helped me so much so far :)

[edit] things I did to narrow down the problem: Connected the board locally to the pc, via crossover and normal cable on the LAN port. No webinterface, I still get a 403 Forbidden. Even connected on the WAN port and tried to open up the WAN address. 403. Although the LAN address was still pingalbe by me. didn't check for ftp (just remembered).

Connected back to university LAN and entered the specific ip in the httpd.conf of this pc. Still I get a 403.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I did what you said. Changed the A: line to a simple '*'. But unfortunately, after I changed the ip address I still wasn't able to connect via webinterface. ftp works fine though.

I started with this:

~# cat /etc/httpd.conf

# Allow trafic from local LAN
A: 10.0.0.0/24
# Deny all other trafic
D: *

After following the instructions here to modify the /etc/init.d/S10Networking file for DHCP on my network, I too was unable to connect to ngw.example.net via the web browser. At first, I thought is was because I forgot to connect the WAN port to my network. Fixed that, but still didn't work.

What I had to do is to modify httpd.conf to this:

~# cat /etc/httpd.conf

# Allow trafic from local LAN
# A: 10.0.0.0/24
A: *
# Deny all other trafic
# D: *

Needed to comment the D: * entry.

The Eee PC + NGW100 = a nice development system.

Edit: I see I'm responding to an old post. Oh well, probably resolved already. Found this link through Google.

Tom