1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Lost network communication

Discussion in 'Troubleshooting' started by Gary Boyce, Jul 9, 2017.

  1. Gary Boyce

    Gary Boyce Member

    Joined:
    Feb 26, 2016
    Messages:
    118
    Likes Received:
    23
    In the middle of a long print I lost connection to Octoprint on the R2. I checked pings and my dhcp lease in my router, and verified the IP address through the touchscreen. I cannot ping the IP listed on the R2 screen and there was 2 leases in my router for the printer. I cleared leases, paused the print and went to the network connection utility on the screen. The network connection utility just says connecting but never moves on from there. I resumed the print for now. Any ideas on how I can get network communication back up?
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,477
    Likes Received:
    7,303
    Sounds like the IP address changed (maybe because the Pi lost connections for some reason).
    I would do a hard reboot after the print and see if you can reach it via a ping then (and confirm the IP it is holding via the router).
     
  3. Gary Boyce

    Gary Boyce Member

    Joined:
    Feb 26, 2016
    Messages:
    118
    Likes Received:
    23
    I want to avoid the reboot if possible. I really want to be able to monitor the print. I rebooted last time this happened but that doesn't tell me why its loosing connection. There was 2 leases in my router for the R2 and neither IP would ping. If I connect with USB to the printer can we troubleshoot this?
     
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,477
    Likes Received:
    7,303
    I have never connected to an R2 or C2 via USB and I have no real certainty on how that actually works (or if it does).

    I have only ever used my C2 via wireless/OctoPrint, but what you are describing is almost certainly something awry with the Pi side.
    Finish your print before troubleshooting this any further assuming it carries on printing correctly (and it should). There are likely some logs we can find that could help point out why the connection was lost.

    I moved all of my printers to effectively have fixed IP addresses (I just locked their MAC address to a given IP in the router).
     
  5. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,477
    Likes Received:
    7,303
    You can SSH/Telnet into the RaspberryPi while it is printing if you want to (assuming you can figure out what the actual IP address is).
    Grab Putty and give that a whirl.
     
  6. Gary Boyce

    Gary Boyce Member

    Joined:
    Feb 26, 2016
    Messages:
    118
    Likes Received:
    23
    I don't know how long this print has left. I suspect it will be another 24 hours. I will try to get some logs when it is done. Thanks.
     
  7. colton81

    colton81 Active Member

    Joined:
    Feb 21, 2017
    Messages:
    328
    Likes Received:
    71
    Not sure if it could help but maybe temporarily connecting a ethernet cable to it to see if it will connect up? For some reason on my pi the wifi completely went out and could not for the life of me get it to work anymore


    Sent from my iPhone using Tapatalk
     
    mark tomlinson and Gary Boyce like this.
  8. Gary Boyce

    Gary Boyce Member

    Joined:
    Feb 26, 2016
    Messages:
    118
    Likes Received:
    23
    I don't know why I didn't think of that! Thanks. That got me back in.
     
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,477
    Likes Received:
    7,303
    Awesome.
    That isolates it to the Pi WiFi side and if the problems continue they should be swapping that out*.


    *although not sure how prepared they are to do this, they may prefer to swap the entire printer and that would be a pain.
     
  10. Gary Boyce

    Gary Boyce Member

    Joined:
    Feb 26, 2016
    Messages:
    118
    Likes Received:
    23
    After this print I will get a copy of the SD card of the Pi and if they won't replace the Pi without replacing the whole printer then I'll just replace it myself if necessary.

    Sent from my SM-G930V using Tapatalk
     
  11. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,477
    Likes Received:
    7,303
    Good luck. I have been nagging them to make this available and so far, no joy. They said they would make the image file for RoboOS available, but they have yet to actually do that where we could confirm it. We have some folks who have done this themselves, but you need to rename the machine in the image when you do that. For whatever reason Robo some how expects unique machine names on their end... I suspect if you remove the Dial-Home-Device like @WheresWaldo suggests it is moot. I have not really investigated this yet.
     
    Gary Boyce likes this.
  12. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    498
    Likes Received:
    332
    My slowly failing router (has started giving me grief intermittently a few weeks ago with either the 2.4 or 5GHz WiFi being still there but no more traffic going through) was having a very hard time with the R2, maybe because of the continuous webcam streaming and would crap itself about 3 times a day. Rebooting the router always got connection back.
    Replaced the piece of junk a few days ago, no more problem.

    When the printer loses WiFi connection it switches to hotspot mode, you can then also connect to that.

    Re SD image, it would only take a few minutes for one of us to prepare an image with the owner's original name. If you need...
     
    mark tomlinson likes this.
  13. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    For what it's worth, my apartment complex and vicinity has about twenty wi-fi zones relating to my neighbors. I'm not kidding.

    What periodically happens is that a new neighbor will unbox their new wi-fi router, hook that up and forget to add a password to their zone. This makes it promiscuous and in some cases, pushes it to the top of your wi-fi adapter's "let's try this" list of things to attach to. I don't think that Raspbian by default is set to connect to public zones but it's not outside of the realm of possibility.

    The more likely scenario, however, if your area is like mine is that wi-fi in the same channel has deconstructive interference. There are only three useful channels here in the states: 1, 6 & 11. So if you have twenty neighbors then on average 7 of them have zones which are making your signal weaker. The upstair neighbor's bedroom router is actually closer to me than my own router in the other room.

    If DHCP leases are a problem for you, try either 1) issue a static IP address or 2) simply don't use the IP address to connect to your printer, use its hostname http://my-c2.local

    Your printer will advertise its hostname via pybonjour (Apple) and Samba (Windows) to the best of my knowledge every 60 seconds. So even if its DHCP lease expires then the hostname after a one-minute hiatus will work.

    By the way, those two-leases-for-one-MAC-address could be your router's fault, for what it's worth. But if the DHCP client on the Robo is being stupid and not managing its lease, perhaps it asked for another prematurely.

    Finally, I love to use ssh during a print job to monitor all sorts of things on the Raspi. Note that it will often become completely unresponsive while it's printing, often for a full three minutes. This is okay in the big scheme of things. So I will be in a terminal prompt remoting into the Raspi and type "cd ..", wait as much as three minutes for the terminal to change directories, "ls -l", wait patiently..., etc. This would suggest that the four cores of the Raspi are working hard and doing blocking calls much of the time. And yet, it usually updates the various sections of the OctoPrint server elements so it seems to work out.
     

Share This Page