View Single Post
Old 01-08-2018, 02:48 AM   #18
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
To recapitulate what we now know:
  • You are running the distribution of calibre found on https://calibre-ebook.com/.
  • A telnet connection from the local machine fails to connect (timeout), meaning that the problem is not related to CC or the network.
  • Selinux has been removed as a possible culprit.
  • The firewall has been removed as a possible culprit.
  • The same port number (e.g., 8080) works for the content server but fails for the wireless device. This supports both the selinux and firewall assertions.
Given all of this, it should work.

I have one last idea: some USB device on your machine is confusing calibre, preventing or severely delaying its device detection from proceeding beyond it. This is an extremely rare problem, and traces of it would show up in a calibre log.

Try the following:
  • Run calibre's debug device detection (Preferences / Miscellaneous / Debug device detection and post the results. Also try to identify all the USB devices that calibre sees. Unplug any that you don't need to actually run the computer.
  • Check if calibre is failing to service the connections
    1. Run calibre in debug mode.
    2. Attempt to connect using telnet.
    3. Close calibre to get the debug log
    4. Check the debug log for "SMART_DEVICE" lines. There should be a line like (the 2 numbers in ( ) are time stamps):
      Code:
      SMART_DEV ( 186.17:184.139) run attempt to open device socket
      This means that calibre received the connection. Normally that line is followed by
      Code:
      SMART_DEV ( 704.58:  0.919) open
      However, if calibre is "confused" the second line won't be there because calibre's device system never told the wireless device driver to finish opening the connection.

      If the first line is not there then calibre did not receive the connection. At this point we are back in mystery-land.
  • Try the above test using the Android device
    1. Run calibre in debug mode.
    2. One the device, reset the Wireless Device to use defaults for IP and port
    3. Attempt to connect from the device.
    4. Close calibre to get the debug log
    5. Check the debug log for "SMART_DEVICE" lines. There should be lines like
      Code:
      SMART_DEV ( 700.65:473.867) run received broadcast ('localhost', ('192.168.130.5', 54982)) calibre wireless device client (on anteater);8080,9090
      SMART_DEV ( 703.65:  3.002) run attempt to open device socket
      The first line indicates that calibre received the "are you there" broadcast. The second is the actual connection.
    6. Email yourself a CC debug log. Near the bottom of the log you should see lines like the following:
      Code:
      2018-01-08 08:30:51.432:  WDConnection: Starting connect process
      2018-01-08 08:30:51.434:  WDConnection: isWiFiConnected returns true
      2018-01-08 08:30:51.493:  WDConnection: Broadcasting ...
      [...] (might be some unrelated lines here)
      2018-01-08 08:30:52.941:  WDConnection: MDNS ServiceAdded. name=calibre smart device client (on anteater port 9090), address=192.168.130.4, port=9090
      2018-01-08 08:30:54.803:  WDConnection: received broadcast response calibre wireless device client (on anteater);8080,9090, address 192.168.130.4
      2018-01-08 08:30:54.882:  Networking: identical mdns & broadcast host 192.168.130.4 9090
      2018-01-08 08:30:54.884:  WDConnection: using broadcast server address 192.168.130.4 port 9090
      Verify that the date and time make sense to be sure you are looking at the same connection attempt that is captured in the calibre log.
chaley is offline   Reply With Quote