Shop OBEX P1 Docs P2 Docs Learn Events
Chunking Data transfer - Page 2 — Parallax Forums

Chunking Data transfer

2»

Comments

  • Mike GMike G Posts: 2,702
    edited 2013-12-18 04:39
    From the prop tool click file then archive -> project. It creates a zip that can be uploaded to the forum.

    As i understand, the code works as expected on other Spinnerets. The code does NOT work as expected on one Spinneret. All Spinnerets have exactly the same setup.
  • oodesoodes Posts: 131
    edited 2013-12-18 04:50
    Yes as far I I know, I have another Spinneret at home which I will triple check with but that seems to be the case which is why I wondered had you encountered anything similar or heard of anyone that had a similar problems with some hardware aspect of the Spinneret
    ProGen_Server_131218 - Archive [Date 2013.12.18 Time 12.43].zip
  • Mike GMike G Posts: 2,702
    edited 2013-12-18 04:56
    At the top of the Init method you'll find
    PUB Init | i, t1
    
      'A hardware reset can take 1.5 seconds
      'before the Sockets are ready to Send/Receive
      wiz.HardReset(WIZ#WIZ_RESET)
                               
      pst.Start(115_200)      
      pause(500)
    

    Comment the HardReset line and see if that helps.
  • oodesoodes Posts: 131
    edited 2013-12-18 05:01
    I'll give it a go , as i mentioned its a sporadic problem so I'll have to wait until it occurs again.

    Appreciate your Patience

    Des
  • Mike GMike G Posts: 2,702
    edited 2013-12-18 09:18
    I recently had a power supply issue where the Spinneret would continually restart on a cold boot. A new power supply fixed the issue.

    Still, I would comments the HardReset line or pause(1500). The HardReset was needed for the W5200 the Spinneret does not need HardReset.
  • Mike GMike G Posts: 2,702
    edited 2013-12-19 04:18
    I took a look at the code attached to post 33. IMO, a UDP network is a better solution than a web server. With UDP the IP, port, number of bytes, and checksum are part of the message.
  • oodesoodes Posts: 131
    edited 2013-12-19 05:08
    Mike,

    Yep I know I done a butchering job on your web-server for that. Actually its not even really running as a Web-server(as you probably have noticed). The only goal of this Unit(spinneret) to to log the details of whats happening on my other Prop device. At start up its gets its IP and sends it to a central Server so the central server can request its log file every hour (this way log file never gets too large and fits in 1 packet and I don't have to chunk the data). The Central Server is the only device that is contactable from outside the network, its gathers up all the info from the 'Slave Units' and Serves up the data on your less butchered Version of the Web server .
    I know we discussed before sending each log entry as it happened but the nature of the project is to keep the volume of traffic on the network down to a minimum so it was spec'd to update on the hour or invoked through the browser on the Central Server.
    UDP network is a better solution than a web server

    I have no doubt that you are correct but with my limited skills this could be a task, is there a lot involved in setting up a UDP network?. What your saying will probably be a solution to my next and final Question before the Christmas Mike you will be glad to hear.

    Earlier today my Network went down and the DHCP assigned IP's that my Spinnerets got at Startup were no longer valid when the Network restarted. In this case is the only way around this to invoke the DHCP again?
    Do something like
    'pseudo
    if( I have no contact from server after an hour )
      call InitNetworkParameters
    

    Wiz.getIp will return the IP assigned at startup I take it before the network went down?

    Regards

    Des
  • oodesoodes Posts: 131
    edited 2013-12-19 06:31
    Mike ,

    Quoting myself here now :D
    is there a lot involved in setting up a UDP network

    So i would just have to INIT my socket as UDP and send the data as UDP , without having to change much of my original code
  • Mike GMike G Posts: 2,702
    edited 2013-12-19 11:29
    I know we discussed before sending each log entry as it happened but the nature of the project is to keep the volume of traffic on the network down to a minimum so it was spec'd to update on the hour or invoked through the browser on the Central Server.
    That's debatable. How much traffic is actually saved?
    Earlier today my Network went down and the DHCP assigned IP's that my Spinnerets got at Startup were no longer valid when the Network restarted. In this case is the only way around this to invoke the DHCP again?
    Yes, simply start up the DHCP process from time to time.
    Wiz.getIp will return the IP assigned at startup I take it before the network went down?
    I can't recall off the top of my head but it looks right.
    So i would just have to INIT my socket as UDP and send the data as UDP , without having to change much of my original code
    For the most part but I imagine you'll want to capture the client IP address when a UDP packet arrives. I'm sure there are other gotchas.
Sign In or Register to comment.