Results 1 to 5 of 5

Thread: how many characters is safe to write with nvram to one variable???

  1. #1

    how many characters is safe to write with nvram to one variable???

    how many characters is safe to write with nvram to one variable???

    I've learned on the killed unit that it's impossible to write
    the whole bunch of data(10kB) into one variable, so I want to
    write it this way:


    etcxx=M>7,O:V5R;F5L+VAO='!L=6<*"FEF(%L@+60@+VUN="]U<V)F<R]I;FET<F0@

    where xx is an increasing number from one to ??xxxxxx??

    Is it possible(probably question aimed to oleg)???

    And how many variables is nvram able to handle???
    eg for ex. etc0-etc10000 ???

    Thanks for help.

  2. #2
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    I've not checked this yet. You probably need to consult source code. In my opinion 200 bytes per variable should be fine. But just to warn you: nvram is limited in size. At most it could be 32k, it's now available 20k on my wl500g.
    If you need store data in flash I'm recomending the following. Due to the different flash types there is an unsed gap in the wl500g flash which is 64k in size. It's at 0x3e0000. So you can alter the kernel, so it will map this 64k as separate mtd device which could be used for storing everything.

  3. #3
    Join Date
    Nov 2003
    Location
    Eindhoven
    Posts
    2,407
    idd.. to see how much nvram you have left
    go to the console and type this:

    Code:
    nvram show
    at the end it will show something like
    size: 10909 bytes (21859 left)

  4. #4
    Thanks oleg,
    the free space in flash is fine.
    Do you have any idea how to map it or directly access it??

  5. #5
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    I've many ideas. If you need a block/char device to access it you will need to change the kernel (there is a mapping for this flash). If you don't need this you can mmap /dev/mtdblock/2 and use the last 64k in your program.

Similar Threads

  1. Is it safe to use WL-HDD in the car?
    By yanz in forum WL-HDD Q&A
    Replies: 2
    Last Post: 23-08-2005, 06:32
  2. get gateway from waninterface as variable
    By kraai in forum WL-500g Q&A
    Replies: 0
    Last Post: 27-06-2005, 19:02
  3. nvram variable meaning
    By DeF in forum WL-500g Custom Development
    Replies: 1
    Last Post: 13-02-2005, 21:30
  4. [DDNS] Using password with weird characters !?
    By monnier in forum WL-500g/WL-500gx Tutorials
    Replies: 0
    Last Post: 29-07-2004, 21:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •