Shop OBEX P1 Docs P2 Docs Learn Events
Wiznet_Test, and most demos failing — Parallax Forums

Wiznet_Test, and most demos failing

Keith YoungKeith Young Posts: 569
edited 2011-03-18 22:05 in Accessories
I set up my Spinneret with +5V as shown, plug in the prop plug, and ethernet cord to back of my computer. I try runnind the UDP Demo's, and when they set any value such as IP, then the IP is read, is comes back as 0's. Same with Wiznet_Test.

The only one I've been able to echo the set IP address etc is W5100_UDP_Echo_Demo_Indirect. When using the recommended UDP tool, and sending the packet, the Spinneret never acknowledges it.

I am at a loss as to how I should fix this issue. As for the partially working udp indirect demo, maybe its a windows setting holding things back? As for the others though a failure doesn't make sense to me.

Know what I'm doing wrong?

Thanks,

Keith

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-03-14 20:01
    Keith, how about posting your code and configuration; IP, port, gateway... If you connected your PC directly to the spinneret did you use a cross-over cable?

    Describe what you expect to happen and the result. Please be descriptive, for example what is the name of the recommended UPD tool? How did you set up the UDP tool? What does partially working mean?
  • Keith YoungKeith Young Posts: 569
    edited 2011-03-14 20:42
    The code is the way the code is for the demos. The MAC is the one on the sticker, everything else is default. I've tried ipconfig and changed the subnet etc to the values shown in ipconfig and that also fails.

    No it's the standard cable that connects to internet or routers etc.

    I expect it to set a mac address then repeat what its set to, not set a mac address then get 0's.

    UDP Test Tool 2.5. I set it up the normal way. Partially working means the one out of many demos that partially works only can repeat the set addresses, but fails to echo any packets sent through the UDP Test Tool.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-03-15 03:47
    Keith,

    You should be able to rule out the need for a cross-over cable. The Wiznet supports auto-MDIX and most newer Ethernet cards do also. As long as one partner does, then the RX/TX pins should be resolved by the Ethernet hardware.

    This thread I posted: http://forums.parallax.com/showthread.php?130308-Private-Networking-with-your-propeller has a working example config for the PC Ethernet port and the Spinneret.

    The demos I tried did work when I first brought things up on my spinner.

    My first test load was a .zip file called "Website_Modified"....I can't find the thread right now.

    I haven't found any posted code yet that doesn't work....these guys seem very good about being careful with what they post.

    Keep trying, it does work in your configuration once you get things set up.

    Rick
  • Mike GMike G Posts: 2,702
    edited 2011-03-15 06:30
    Keith;

    It's most likely configuration. Sorry; I just don't understand default configuration and set up in the normal way. Here's is my configuration using "Brilldea W5100 UDP Echo Demo indirect Ver. 00.5" loaded in the Spinneret.

    Ipconfig
    ipconfig.gif


    Serial Terminal
    UdpSerialTerm.gif


    UDP Console
    UdpConsole.gif


    I attached a simple UPD console application for Windows.
    521 x 628 - 13K
    669 x 338 - 8K
    669 x 338 - 7K
  • Keith YoungKeith Young Posts: 569
    edited 2011-03-15 19:41
    Thanks! I'll let ya know how these ideas work.

    Keith
  • Keith YoungKeith Young Posts: 569
    edited 2011-03-16 11:11
    a6.JPG
    a4.JPG


    Is it a problem that I don't have an ethernet gateway? If so, how would I fix that? I know very little about networking.

    a5.JPG


    Thanks for all the help!

    Keith
    494 x 309 - 33K
    874 x 505 - 61K
    675 x 635 - 71K
    a4.JPG 33.4K
    a5.JPG 61.3K
    a6.JPG 71.1K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-16 11:31
    If you have a connection to the internet, you have a gateway. Typically it will be your router. In that case, the gateway address is IP address of the router. Under windows find that address by Control Panel -> Network Connections -> Double-click on network adapter -> Properties -> Click on Internet Protocol (TCP/IP) -> Properties, and you get something like this:

    attachment.php?attachmentid=79321&d=1300300302

    That's assuming a static network. If your LAN uses DHCP, I'm not sure how to recover the gateway address, since all my connections are static.

    -Phil
    808 x 608 - 33K
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-03-16 12:34
    Keith,

    If you have you Spinner plugged into the Ethernet port on you computer and with the above IP configurations, you'd want to configure your Spinner to be on the 169.254.11.x subnet that your computer's Ethernet adapter is on. You could give your Spinner an IP of 169.254.11.1 for example, a subnet mask of 255.255.0.0 and a default gateway of 169.254.11.190 (your PC) and you should be able to talk between them using the Ethernet connector and the 169.254.11.1 (Spinner) and 169.254.11.190 (PC) addresses.

    As you have it now, you are putting your Spinner (192168.1.4) onto a 169.254.x.y network with a default gateway it can never reach. It's listening but because of the addressing, NOTHING is getting to it. I imagine the Wiznet TCP/IP stack is just burning all the traffic from the "WRONG" network.

    Fix your addressing and I bet you can talk!

    Let us know!

    Rick
    Rick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-16 12:41
    I'm not sure why Schill deleted his post, but I'm glad I copied it:
    To find network information for a Windows machine, open a "DOS" window and type the following:

    ipconfig /all

    This will return information about every network adapter in your system (possibly also including some virtual ones that you didn't realize you had).

    Among other things, you will find "Default Gateway" in the output. You will also find your IP address (probably IPv4 Address).

    It was good advice, much better than the convoluted process I suggested to get the same info. Anyway, here's the result I got on my WinXP box from ipconfig:

    attachment.php?attachmentid=79325&d=1300304350
    669 x 332 - 13K
  • schillschill Posts: 741
    edited 2011-03-16 12:58
    I'm not sure why Schill deleted his post, but I'm glad I copied it...

    Because he accidentally hit the delete button when he was editing it (and hadn't saved a copy).

    It looks like Keith was already doing that anyway so I didn't bother to retype it.
  • Keith YoungKeith Young Posts: 569
    edited 2011-03-16 19:19
    I got the pic from my post above with ipconfig. However the issue I wondered was the Gateway. On the Ethernet part of my ipconfig it has no gateway, where my wireless does have a gateway. Since the spinneret connects to ethernet I need a way to get a gateway on ethernet, right? And I don't know how to do that.
  • Mike GMike G Posts: 2,702
    edited 2011-03-16 20:06
    A gateway is a path to another network. That would be your PC. As stated by mindrobots, set the spinneret gateway IP to your PCs IP.

    Spinneret: 169.254.11.1
    Gateway: 169.254.11.190
    Subnet mask: 255.255.0.0
    Port: 80 (later you might want to change to a non standard port)
    Since the spinneret connects to ethernet I need a way to get a gateway on ethernet, right?

    You mean access the Internet or create a home network?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-16 20:24
    Mike G wrote:
    A gateway is a path to another network. That would be your PC.
    Um, not usually. For most home networks, the internet gateway would be one's router, which would typically be connected to a cable or DSL modem. In my case it's my Linux box. which has one Ethernet outlet connected to the modem and the other to an Ethernet switch that distributes to the rest of my network.

    -Phil
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-03-17 05:45
    Keith,

    Are you wondering how to put an IP address into the config so it's seen as a Gateway address?

    It's slightly different for all the various flavors of Windows but shoudl be somethign like:

    Control Panel -> Network Connections -> right-click on the Ethernet adapter you want to change -> select properties
    from the panel that is displayed, highlight "Internet Protocol(TCP/IP) and then click on properties. Again, depending on your Windows version, you may have two TCP/IP entires one for IPV4 and one for IPV6 - you want IPV4.
    Select the button for "Use the following IP address:" and then you can enter the IP address, Subnet mask and Default Gateway. Plug agreeable numbers in (as outlined above) and you should be working.

    As Mike said above, a gateway is a device that can provide a path to another network. As a device, if you can't resolve teh address you are trying to talk to on your local network, you have to pass it to the default gateway to see if it can be routed to a netowrk the gateway knows about.

    I the example you are building, your PC will be on two networks. One it accesses through it's wireless interface - yoru network that leads to the internet through your Modem/Router (which is the gateway for that network segment). The other network is the one you just built between your PC and the Spinner on the Ethernet segment. For this one, the gateway doesn't really serve any purpose at this time.

    Hope this helps more than confuses.

    Rick
  • Mike GMike G Posts: 2,702
    edited 2011-03-17 05:56
    Phil, I thought a gateway connected network nodes. If an IP address is not found on a network the packet is passed to the gateway. In roughwoods case, he has two networks going on. From the description, the Spinneret is hanging off his laptop, the laptop is connected to a wireless device that connects to the Internet.
  • Mike GMike G Posts: 2,702
    edited 2011-03-17 06:14
    @roughwood, I think most of us have a router/modem connected to the internet and a switch somewhere. My switch connects my office devices to a wireless router. I have a desktop PC connected to the spinneret via serial for programming. That way I can remote to my desktop from my wireless laptop and program the Spinneret. Plus I can see the spinneret from any PC in the house..kids, wife...etc. Plus I can use the router to forward requests from the Internet to the Spinneret.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-03-17 06:19
    Mike, you're correct.

    A gateway (in this case, an old term for what is now considered a router), connects two networks and provides a means to get traffic between networks. When we set up a Spinner on a laptop like this, we make the laptop a dual homed device. It exists on two networks. The one network is the one through the wireless card 192.168.1.xxx - this has a gateway in his DSL/Cable modem and provides access to the Internet. Any traffic sent out this connection that's not a 192.168.1.xxx address will be passed to this networks default gateway for routing.

    The second network is the 169.254.xxx.yyy network we're trying to build between the laptop and the Spinner. At this time, we're calling the laptop the default gateway but there should really just be traffic between the laptop and the Spinner and not anything not destined for some device on this network.
  • Keith YoungKeith Young Posts: 569
    edited 2011-03-17 10:44
    MindRobots described my situation I think. Unfortunately I don't have access to my wireless router, which is my only source of internet here. My laptop has an ethernet port I use to plug the Spinneret to.

    Do I need 2 gateways in this case? So far I've been telling Spinneret the Wireless gateway since it's the only one I have an address for. As MindRobots says I think I do. I'll give that a try here real quick.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-17 11:05
    Okay, I understand the situation now. Your laptop would be the gateway, since it also connects to another network. That much wasn't clear before. And you don't need two gateways -- just the laptop. The stuff downstream from there will handle any further forwarding. But the laptop must be set up to do the routing from the Ethernet port to the wireless router and also to handle the network address translation for incoming packets. That won't happen automatically. Also, if you plug the Spinneret into your laptop's Ethernet port without going through a hub or switch, I believe you will need to use a cross-over cable.

    -Phil
  • Keith YoungKeith Young Posts: 569
    edited 2011-03-17 11:18
    b1.JPG
    Here is the closest I have gotten so far!

    Every time I click send in the UDP tool, the Rx light on Spinneret flashes blue! However PST still reads waiting to recieve, and the UDP tool recieves no data back.
    b2.JPG
    b3.JPG

    pencil.png
    874 x 522 - 63K
    675 x 635 - 88K
    677 x 538 - 82K
    b3.JPG 63.4K
    b2.JPG 88.3K
    b1.JPG 81.7K
  • Keith YoungKeith Young Posts: 569
    edited 2011-03-18 11:58
    Even though the Spinneret is recieving, when I alter the demo slightly so that it sends what it recieves to the PST, it always says "9". I can't figure out what's wrong.
  • Mike GMike G Posts: 2,702
    edited 2011-03-18 22:05
    Hey roughwood,

    I plugged the Spinneret's RJ45 port directly into my Win7 Laptop's RJ45 connection (my laptop connects wireless to the Internet). I opened the network connections properties (right click), double clicked on Internet Protocol TCP/IP(v4).

    Clicked the "Use the following IP address" radio button. Entered a unique IP for my network - 192.168.1.130; Subnet of 255.255.255.0; and default gateway given to me by my router; 192.168.1.1.

    I did not change my Spinneret configuration.

    Tested by entering http ://1 92.168.1.120 (my spinneret) in a browser address bar. index.htm rendered as requested from the laptop. My desktop could no longer connect, which is expected since the spinneret is hanging off the laptop and not the router.
Sign In or Register to comment.