Giter Site home page Giter Site logo

Comments (6)

sultanqasim avatar sultanqasim commented on September 3, 2024

Strange, Iā€™m not sure why that happens. Could you try a previously tagged release instead of the current master branch to see if the same thing occurs? Iā€™m away from my computer at the moment but I can try later when I have a chance.

from sniffle.

jsmif avatar jsmif commented on September 3, 2024

OK, I tried the 1.10.0 and 1.9.3 tags, but they actually exhibit the same behavior. I thought it was perhaps the OS being an issue since I'm using Ubuntu 24.04 and the known-working-with-long-form host is Ubuntu 22.04. But no, I have a separate Ubuntu 22.04 VM which I could try on, and on that too both master and those two tags work for the short form and fail for the long form.

FWIW both

sudo screen /dev/ttyUSB0 921600

and

sudo screen /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_55ca6286e3e4f4fba5d0448333fa99fc-if00-port0 921600

Show valid well-formed base64 data, and I was using a dongle specifically reflashed to the "1M" sonoff firmware so I could just test the default behavior with no changes to the sniffle_hw.py.

So I went and grabbed the dongle from the Ubuntu 22.04 system where the long form works. The box is at commit 01e064b. The dongle is running the 2M firmware with the following diff (because I don't know which case is the one I should change away from 921600)

--- a/python_cli/sniffle/sniffle_hw.py
+++ b/python_cli/sniffle/sniffle_hw.py
@@ -97,9 +97,11 @@ class SniffleHW:
                 if serport is None:
                     raise IOError("Sniffle device not found")
                 else:
-                    baud = 921600
+#                    baud = 921600
+                    baud = 2000000
         elif is_cp2102(serport):
-            baud = 921600
+#            baud = 921600
+            baud = 2000000

When I then check out that commit, and make that change, the Ubuntu 22.04 VM works with the long form of the serial path fine.

from sniffle.

sultanqasim avatar sultanqasim commented on September 3, 2024

Ah, that gives me a good pointer to what's happening. The is_cp2102 function will return False if the supplied serial port path is not the canonical path to the dongle (i.e. /dev/ttyUSB0). Is /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_55ca6286e3e4f4fba5d0448333fa99fc-if00-port0 a symlink to /dev/ttyUSB0? If so, I can change the code to follow symlinks.

from sniffle.

jsmif avatar jsmif commented on September 3, 2024

Yep, it's a symlink

from sniffle.

sultanqasim avatar sultanqasim commented on September 3, 2024

Try now with (with bf91946)

from sniffle.

jsmif avatar jsmif commented on September 3, 2024

Yep, works now. Thanks!

from sniffle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.