pyserial writes on Ubuntu but not MacFull examples of using pySerial packageHow to install python3 version of package via pip on Ubuntu?PySerial write() instant timeoutHow to write integers to port using PySerialDebugging pySerial write timeoutInstall pyserial Mac OS 10.10?pyseries can not read dataPySerial write is not working as expected

How do I explain that I don't want to maintain old projects?

Can one block with a protection from color creature?

Is it ok for parents to kiss and romance with each other while their 2- to 8-year-old child watches?

I'm feeling like my character doesn't fit the campaign

What's the difference between a type and a kind?

What do you call a situation where you have choices but no good choice?

Taking my Ph.D. advisor out for dinner after graduation

Can the Four Elements monk's Shape the Flowing River elemental discipline create stairs by expending a single ki point?

How to reclaim personal item I've lent to the office without burning bridges?

Why do Martians have to wear space helmets?

Why did the frequency of the word "черт" (devil) in books increase by a few times since the October Revolution?

Why is whale hunting treated differently from hunting other animals?

Computer name naming convention for security

What purpose does mercury dichloride have in fireworks?

Custom Geolocation Fields not populating in test class

What is the highest level of accuracy in motion control a Victorian society could achieve?

Is conquering your neighbors to fight a greater enemy a valid strategy?

Uniform initialization by tuple

How was the website able to tell my credit card was wrong before it processed it?

What are the effects of abstaining from eating a certain flavor?

Interpretation of non-significant results as "trends"

Math mode inside underbrace text

Sense of humor in your sci-fi stories

Need a non-volatile memory IC with near unlimited read/write operations capability



pyserial writes on Ubuntu but not Mac


Full examples of using pySerial packageHow to install python3 version of package via pip on Ubuntu?PySerial write() instant timeoutHow to write integers to port using PySerialDebugging pySerial write timeoutInstall pyserial Mac OS 10.10?pyseries can not read dataPySerial write is not working as expected






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















In a virtual environment with python version 3.5.2 and pyserial version 3.4, I am unable to write 10 bytes. I am sniffing the bus with a Salae logic analyzer. The same code and hardware works on an Ubuntu 16 virtual machine but NOT on the host Mac directly.



UART_DEVICE = '/dev/ttyUSB0' # '/dev/tty.usbserial-DN04ARYR'

class MyClass():

def __init__(self, port, baudrate=9600, timeout=0.5):
self._serial = serial.Serial()
self._serial.port = port
self._serial.baudrate = baudrate
self._serial.timeout = timeout
self._serial.open()

def __del__(self):
self._serial.close()

def send_test_packet(self):
packet = bytearray([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A])
print('About to write '.format(packet.hex()))
#num_bytes_written = os.write(self._serial.fd, packet)
num_bytes_written = self._serial.write(packet)
print("sent bytes".format(num_bytes_written))

mc = MyClass(UART_DEVICE)
mc.send_dummy_packet()


Python and pyserial version:



$ python --version
Python 3.5.2

$ pip freeze
pyserial==3.4


MacOS version: 10.14.3










share|improve this question






























    0















    In a virtual environment with python version 3.5.2 and pyserial version 3.4, I am unable to write 10 bytes. I am sniffing the bus with a Salae logic analyzer. The same code and hardware works on an Ubuntu 16 virtual machine but NOT on the host Mac directly.



    UART_DEVICE = '/dev/ttyUSB0' # '/dev/tty.usbserial-DN04ARYR'

    class MyClass():

    def __init__(self, port, baudrate=9600, timeout=0.5):
    self._serial = serial.Serial()
    self._serial.port = port
    self._serial.baudrate = baudrate
    self._serial.timeout = timeout
    self._serial.open()

    def __del__(self):
    self._serial.close()

    def send_test_packet(self):
    packet = bytearray([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A])
    print('About to write '.format(packet.hex()))
    #num_bytes_written = os.write(self._serial.fd, packet)
    num_bytes_written = self._serial.write(packet)
    print("sent bytes".format(num_bytes_written))

    mc = MyClass(UART_DEVICE)
    mc.send_dummy_packet()


    Python and pyserial version:



    $ python --version
    Python 3.5.2

    $ pip freeze
    pyserial==3.4


    MacOS version: 10.14.3










    share|improve this question


























      0












      0








      0








      In a virtual environment with python version 3.5.2 and pyserial version 3.4, I am unable to write 10 bytes. I am sniffing the bus with a Salae logic analyzer. The same code and hardware works on an Ubuntu 16 virtual machine but NOT on the host Mac directly.



      UART_DEVICE = '/dev/ttyUSB0' # '/dev/tty.usbserial-DN04ARYR'

      class MyClass():

      def __init__(self, port, baudrate=9600, timeout=0.5):
      self._serial = serial.Serial()
      self._serial.port = port
      self._serial.baudrate = baudrate
      self._serial.timeout = timeout
      self._serial.open()

      def __del__(self):
      self._serial.close()

      def send_test_packet(self):
      packet = bytearray([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A])
      print('About to write '.format(packet.hex()))
      #num_bytes_written = os.write(self._serial.fd, packet)
      num_bytes_written = self._serial.write(packet)
      print("sent bytes".format(num_bytes_written))

      mc = MyClass(UART_DEVICE)
      mc.send_dummy_packet()


      Python and pyserial version:



      $ python --version
      Python 3.5.2

      $ pip freeze
      pyserial==3.4


      MacOS version: 10.14.3










      share|improve this question
















      In a virtual environment with python version 3.5.2 and pyserial version 3.4, I am unable to write 10 bytes. I am sniffing the bus with a Salae logic analyzer. The same code and hardware works on an Ubuntu 16 virtual machine but NOT on the host Mac directly.



      UART_DEVICE = '/dev/ttyUSB0' # '/dev/tty.usbserial-DN04ARYR'

      class MyClass():

      def __init__(self, port, baudrate=9600, timeout=0.5):
      self._serial = serial.Serial()
      self._serial.port = port
      self._serial.baudrate = baudrate
      self._serial.timeout = timeout
      self._serial.open()

      def __del__(self):
      self._serial.close()

      def send_test_packet(self):
      packet = bytearray([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A])
      print('About to write '.format(packet.hex()))
      #num_bytes_written = os.write(self._serial.fd, packet)
      num_bytes_written = self._serial.write(packet)
      print("sent bytes".format(num_bytes_written))

      mc = MyClass(UART_DEVICE)
      mc.send_dummy_packet()


      Python and pyserial version:



      $ python --version
      Python 3.5.2

      $ pip freeze
      pyserial==3.4


      MacOS version: 10.14.3







      python-3.x pyserial






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 15:11







      tarabyte

















      asked Mar 25 at 21:27









      tarabytetarabyte

      5,4678 gold badges48 silver badges71 bronze badges




      5,4678 gold badges48 silver badges71 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55346658%2fpyserial-writes-on-ubuntu-but-not-mac%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid …


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55346658%2fpyserial-writes-on-ubuntu-but-not-mac%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?