0

Setting IP Address on HD1010 for a .brs



I have several questions regarding setting IP addresses on HD1010 running 3.1.46 (August 2009). I want to set the IP address of a unit from a Brightscript, and have the IP address apply thereafter.

The sample code on HDCompact_UsersGuide.pdf PDFpage109 Printpage103 ends with an nc.Apply, then a RebootSystem().

1) Does the IP address change upon the .Apply, or does it REQUIRE the Reboot for the IP address to take effect?

If the IP address does not take effect until after a reboot, then it seems to me that it would be impossible to set an IP address for a box without using a separate IP address-setting .brs file on a separate SD card. I'd like to set my IP address at the top of my .brs, wait if necessary, then go on with other code I'd write in the same .brs file.

2) In the sample code of HDCompact_UsersGuide.pdf PDFpage109 Printpage103 , is the IP address change lost if the power is cycled (e.g. it has not been saved to the registry)?

3) Doesn't the example code effectively operate as a reboot infinite loop?

The HDCompact_UsersGuide.pdf PDFpage108 Printpage102 also references an alternate method in MANUAL_IP_CONFIGURATION.ZIP which I downloaded August 27, 2009.

The downloaded code creates both a registry object reference and a network configuration object reference, but I could not find a binding between the network configuration and registry objects.

4) When the registry is flushed, does it automatically save the contents of the network object? Or does the flush save the prevailing settings of the box?
5) If there is more than one network configuration object, what happens upon registry flush?
6) What is typically found in a Compact model's registry that is saved upon flush?
I know there is a method to list out sections, but if you could provide a quick list all of us wouldn't have to individually write programs and list them out.

7) The instructions on HDCompact_UsersGuide.pdf PDFpage108 Printpage102 reference a video select button. Where is this button on the HD1010?

8) The downloaded autorun.brs does not appear to reference either a video select button or the restart prompt on described at the top of PDFpage109 Printpage 103. I'm confused--is this implemented in firmware?

I look forward to hearing your answers...thanks!!

4 comments

  • 0
    Avatar
    RokuLyndon


    The directions in the user's guide will be updated....The reboot isn't required.

    All you need is the following example:



    nc = CreateObject("roNetworkConfiguration", 0)

    nc.SetIP4Address("192.168.1.10")

    nc.SetIP4Netmask("255.255.255.0")

    nc.SetIP4Broadcast("192.168.1.255")

    nc.SetIP4Gateway("192.168.1.1")

    nc.Apply()



    The registry flush applies the IP address change immediately. It was needed with earlier versions of the firmware. I'll check if that's still the case. The script with the reboot was mean to be used independently, but it will be updated.



    There are some registry entries that are hidden. I don't have a full list of those. Normally, if you are using brightsign network manager, and do a registry list, there will be a networking section listed that has recovery details for brightsign network manager. Beyond that, there's not normally anything else that you see when you do a registry flush.



    With the 3.1 firmware, there's now also a key for crash logs. By default, it's missing, meaning crash logs are sent to a roku server. You can add the key and leave it with no value so that the sending of crash logs is disabled. Or, you can add your own server to have crash logs sent to. This will be documented in the updated user's guide.



    There is not a video select button on the compacts. That reference will be removed. There was one on the HD2000s.



    The IP address change is not lost when the power is cycled.



    The script on page 109 should have a delay and output to the screen telling the user to restart. At least, that was originally the case. That's the restart that's being referred to.  



    I'll have to check on what happens if you try to create two network objects. I do not believe you're allowed to.
  • 0
    Avatar
    atprf


    Thanks; this looks like a straightforward addition to any .brs file.  



    Could you further explain the lifetime of the IP settings of the sample code above?  Does it apply during the lifetime of the current .brs file?  



    If I want it to apply to other .brs files which come along later (but might not have IP settings), how would I do so?  And how would I get rid of any IP settings and have the unit use DHCP?
  • 0
    Avatar
    RokuLyndon


    The same way you can use the network object to manually set the IP address, in this case called "nc", you can call a SetDHCP function:



    nc.SetDHCP()

    nc.Apply()



    The IP address you set is permanent until you change back to dhcp.
  • 0
    Avatar
    venkat200


    "RokuLyndon" wrote:

    The same way you can use the network object to manually set the IP address, in this case called "nc", you can call a SetDHCP function:

    nc.SetDHCP()
    nc.Apply()

    The IP address you set is permanent until you change back to dhcp.


    Hai RokuLyndon,



    In this site http://www.ip-details.com/ you can easily check out the Ip-address details.
Please sign in to leave a comment.