Shop OBEX P1 Docs P2 Docs Learn Events
QS Prop board and Ethernet board not working for DHCP requests — Parallax Forums

QS Prop board and Ethernet board not working for DHCP requests

Buck RogersBuck Rogers Posts: 2,185
edited 2014-07-21 13:38 in Propeller 1
Hello!
So today from Microcenter I promptly buy the WZ5200 Ethernet board for the QS Prop board. I am trying to run the DHCP demonstration object. First I try changing the subnet setting from 255.255.255.255 to 255.255.255.0, especially since that's my setting, and it definitely wasn't working with the first. Currently its not working with that setting. And as it happens I decided to buy it because of reasons outlined here, http://forums.parallax.com/showthread.php/156471-Sparkfun-enters-the-IoT-mix it seems that Sparkfun left out the Prop in its considerations for the Internet of Things idea they have running.

Since the code is portable (italics mine) I decided to setup the same instance on my Raspberry Pi model B and work out how to accept a stream of serial data that the board collected, and form it into a stream that the application could manage and display.

Currently its on its 131 iteration and presents an error code of 1.

What else can I do to obtain an IP address this way?

Comments

  • homosapienhomosapien Posts: 147
    edited 2014-07-20 07:53
    For more accurate help, you will need to tell us exactly what object you are using (and perhaps where you got it) as your
    I am trying to run the DHCP demonstration object.

    and exactly what you mean by:
    and it definitely wasn't working

    (No response? Incorrect IP? etc.)
  • Buck RogersBuck Rogers Posts: 2,185
    edited 2014-07-20 08:54
    homosapien wrote: »
    For more accurate help, you will need to tell us exactly what object you are using (and perhaps where you got it) as your



    and exactly what you mean by:



    (No response? Incorrect IP? etc.)

    Hello!
    Then? Running the DhcpObjectDemo Spin code. In fact it was the named one inside the folder that was loaded.

    And you are asking
    (No response? Incorrect IP? etc.)
    It happens that the board was responding to the terminal okay, but it wasn't getting an IP address assigned.

    Ideally it should have stopped the first six times after not getting one, but it was programmed to keep going and going, and eventually it would get one.
  • homosapienhomosapien Posts: 147
    edited 2014-07-20 09:45
    So you are using DhcpDemo.spin.

    As written, the main loop will loop until DoDhcp returns true. Why would you think it would only loop 6 times?

    If DoDHCP does return true, it will either print a specific error or a general 'Unidentified Error' message to the serial terminal after each attempt to setup DHCP. What error was it showing you?
  • Buck RogersBuck Rogers Posts: 2,185
    edited 2014-07-20 13:28
    homosapien wrote: »
    So you are using DhcpDemo.spin.

    As written, the main loop will loop until DoDhcp returns true. Why would you think it would only loop 6 times?

    If DoDHCP does return true, it will either print a specific error or a general 'Unidentified Error' message to the serial terminal after each attempt to setup DHCP. What error was it showing you?

    Hello!
    It was presenting an error one.

    As for looping six times, that was chosen purely at random for this discussion.
  • homosapienhomosapien Posts: 147
    edited 2014-07-21 05:32
    1) If you run the DhcpDemo.spin with no changes (meaning do NOT change any coded IP addresses), does it repeatedly return error #1,"Unidentified Error"?



    2) When you say:
    Ideally it should have stopped the first six times after not getting one, but it was programmed to keep going and going, and eventually it would get one.

    "eventually it would get one" do you mean it would get the error #1, the "Unidentified Error" or one, as in a DHCP IP response?
  • Buck RogersBuck Rogers Posts: 2,185
    edited 2014-07-21 06:55
    homosapien wrote: »
    1) If you run the DhcpDemo.spin with no changes (meaning do NOT change any coded IP addresses), does it repeatedly return error #1,"Unidentified Error"?



    2) When you say:



    "eventually it would get one" do you mean it would get the error #1, the "Unidentified Error" or one, as in a DHCP IP response?

    Hello!
    Yes it does. And yes it does get an error #1.
  • homosapienhomosapien Posts: 147
    edited 2014-07-21 13:38
    Do you think the WizNet has a good internet connection? Are the LEDs on the magJack active, one blinking, one steady on?

    Have you tried any other demos that might establish that it is the DHCP that is the issue and not a power or internet connection issue? Try the dnsDemo.

    Or you can try the TcpSocketServerDemo. This demo does not use DHCP, the IP is set in the code. After you load the QS with the program you will need to use a web browser to navigate to the IP and port that the QS is monitoring - namely 192.168.1.105:8080 as is hard coded in the downloaded version. The web browser should show "Hello World" if successful.
Sign In or Register to comment.