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

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript