Shop OBEX P1 Docs P2 Docs Learn Events
Wiznet W6300 - Page 3 — Parallax Forums

Wiznet W6300

13»

Comments

  • ke4pjwke4pjw Posts: 1,283

    @Rayman said:
    How does that work? Does the Wiznet ask the device for a preferred name?

    And then, everybody can address each other by name?

    The names have to be in the .local domain, but yes, if you have a nameresolver that supports MDNS, you can connect to other devices with the hostname. Windows will even go to just a short name. I don't know if other resolvers do that.

    How it works in this instance:

    I configure socket 4 on the W6100 to join the multicast group : 01:00:5E:00:00:FB
    I configure the socket to have a destination IP of 224.0.0.251
    I configure the destination port to be 5353
    I open the socket. It joins the multicast group and listens for UDP traffic destined for 224.0.0.251 on port 5353.

    In the webserver, when I am waiting for a connect, if none is detected, I execute a method to check if there is any data waiting on socket 4. If there is, I validate if it a MDNS query. If it isn't, I return. I then check to see of the queried hostname matches my own. If it doesn't, I return. If it does, I send an MDNS announcement via socket 4 with my IP address. The remote machine receives this query and then caches the IP address for the name in its resolver.

    I currently do not do service announcements and I am not sure if there is value in doing that.

  • RaymanRayman Posts: 16,092
    edited 2026-02-25 11:11

    @ke4pjw does the new chip offer any advantages in 1-bit mode?

    I’m a bit delayed in testing your board due to water leak and heating failure where it is, but will get on it soon.

  • ke4pjwke4pjw Posts: 1,283

    @Rayman said:
    @ke4pjw does the new chip offer any advantages in 1-bit mode?

    It requires 3 less pins than quad mode. It's kind of nice that you can do 1, 2, or 4 pins modes with software.

    Let me know how it works for you.

    --Terry

  • RaymanRayman Posts: 16,092

    @ke4pjw Testing it now...

    First thing is that this only seems to work in Spin Tools IDE, is this right?

    Also, if there's no uSD inserted, the code just appears to hang :(
    Maybe good time to switch to the @"Stephen Moraco" uSD driver?

  • RaymanRayman Posts: 16,092

    It's working! (of course...)
    Just changed uSD pins to match this hardware, changed MAC to avoid having a duplicate with W6100 already on network, and also incremented IP address for same reason.

           'Configure Mac Address
      MACADDRESS[0] := $00 'wiznet don't change
      MACADDRESS[1] := $08 'wiznet don't change
      MACADDRESS[2] := $DC 'wiznet don't change
      MACADDRESS[3] := $00
      MACADDRESS[4] := $00
      MACADDRESS[5] := $02  'RJA changing
    
      ' Set IP Address. Set to 0.0.0.0 for DHCP
      IPADDRESS[0] := 192'0
      IPADDRESS[1] := 168
      IPADDRESS[2] := 1'0'137
      IPADDRESS[3] := 3'2'150  'RJA avoiding W6100 device
    
      ' Set Subnet Mask. Set to 0.0.0.0 for DHCP
      SUBNETMASK[0] := 255
      SUBNETMASK[1] := 255
      SUBNETMASK[2] := 255
      SUBNETMASK[3] := 0
    
    ' Set Gateway Address. Set to 0.0.0.0 for DHCP
      GATEWAY[0] := 192
      GATEWAY[1] := 168
      GATEWAY[2] := 1'0'137
      GATEWAY[3] := 1'10'1
    
    ' Set DNS Server Address. Set to 0.0.0.0 for DHCP
      DNS[0] := 192'8
      DNS[1] := 168'8
      DNS[2] := 1'8
      DNS[3] := 1'8
    
  • RaymanRayman Posts: 16,092

    This was even easier than with W6100. There was something keeping the web server from working correctly there, but code seems all good now.
    Thanks!

Sign In or Register to comment.