Shop OBEX P1 Docs P2 Docs Learn Events
Ethernet Ethercog issue — Parallax Forums

Ethernet Ethercog issue

BTXBTX Posts: 674
edited 2009-07-13 21:06 in Propeller 1
Hi all !!
I'm trying an UDP reciever with the etherog and UDP socket provided in an OE UDP audio demo.
I've modified some code to get only the UDP reciever (not for audio).

My issue is that in ethercog I can't get broadcast working...and I don't know why.

I'm sending UDP packets from PC using some IP succesuflly ie: to 192.168.1.32, but when I try to send a brodcast packet it never is recieved at the propeller ethernet board.
I used in the ethercog code also a MAC like the least significant bit of the fisrt byte of MAC is active, I've activated the broadcast in the PC sender, I sent to 192.168.1.255 from PC but my board does not respons to it.

What should I consider to get broadcast working on ethercog ??

Have a nice weekend !!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.

Alberto.

Comments

  • BTXBTX Posts: 674
    edited 2009-07-13 19:55
    OK. I've solved the problem.

    To recieve Broadcast packets using the ethercog driver you should add this code:
                            call    #spi_read32
                            cmp     spi_reg, local_IP wz
                  if_nz     cmp     spi_reg, Broad_IP wz    (This line was added to this portion of the original code in the rx_ipv4 routine)
                  if_nz     jmp     #rx_frame_finish
    
    



    Also you should define the Broad_IP variable after the Local_IP variable after that, like:
    Broad_IP                long    $C0A801FF
    
    



    It's working fine recieving UDP packets as unicast and broadcast. cool.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • lonesocklonesock Posts: 917
    edited 2009-07-13 20:05
    Great job! I'm still planning on playing with this EtherCog code. (btw, did you use the release zip? Or are you using the latest SVN code? IIRC, there was one update to the SVN repo that was not included in the zip.)

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • BTXBTX Posts: 674
    edited 2009-07-13 21:06
    Hi Jonathan.
    Thx so much !! My best skill is not the progamming.....happy to hear if it is usefull.
    I'm using the release zip.
    Specifically the udp audio demo from Micah Dowty, downloaded from OE.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
Sign In or Register to comment.