pySerialTransfer | Python package to transfer data | Wrapper library

 by   PowerBroker2 Python Version: 2.6.9 License: MIT

kandi X-RAY | pySerialTransfer Summary

kandi X-RAY | pySerialTransfer Summary

pySerialTransfer is a Python library typically used in Telecommunications, Media, Telecom, Utilities, Wrapper, Arduino applications. pySerialTransfer has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install pySerialTransfer' or download it from GitHub, PyPI.

Python package to transfer data in a fast, reliable, and packetized form. If using this package to communicate with Arduinos, see for the corresponding and compatible library (also available through the Arduino IDE's Libraries Manager).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pySerialTransfer has a low active ecosystem.
              It has 108 star(s) with 27 fork(s). There are 9 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 6 open issues and 46 have been closed. On average issues are closed in 10 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of pySerialTransfer is 2.6.9

            kandi-Quality Quality

              pySerialTransfer has 0 bugs and 23 code smells.

            kandi-Security Security

              pySerialTransfer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pySerialTransfer code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pySerialTransfer is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              pySerialTransfer releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 557 lines of code, 24 functions and 10 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pySerialTransfer and discovered the below as its top functions. This is intended to give you an instant insight into pySerialTransfer implemented functionality, and help decide if they suit your requirements.
            • Process rx object
            • Create a transaction object
            • Writes a struct object to buffer
            • Send a message to the server
            • Calculate the CRC for the given array
            • Calculate the overhead of the transaction
            • Open serial connection
            • Check the status of the packet
            • Returns the number of bytes available
            • Unpack a packet
            • Calculate the CRC for an array
            • Return a list of all serial ports
            • Close the connection
            • List of serial ports
            • Print the cs table
            • Convert value to lsb
            • Return byte value at position pos
            • Convert val to bytes
            • Return the number of bytes in a value
            Get all kandi verified functions for this library.

            pySerialTransfer Key Features

            No Key Features are available at this moment for pySerialTransfer.

            pySerialTransfer Examples and Code Snippets

            Example Python Script
            Pythondot img1Lines of Code : 96dot img1License : Permissive (MIT)
            copy iconCopy
            import time
            from pySerialTransfer import pySerialTransfer as txfer
            
            
            if __name__ == '__main__':
                try:
                    link = txfer.SerialTransfer('COM17')
                    
                    link.open()
                    time.sleep(2) # allow some time for the Arduino to completely r  
            Example Python Script with Callback Functionality
            Pythondot img2Lines of Code : 40dot img2License : Permissive (MIT)
            copy iconCopy
            import time
            from pySerialTransfer import pySerialTransfer as txfer
            
            
            def hi():
                '''
                Callback function that will automatically be called by link.tick() whenever
                a packet with ID of 0 is successfully parsed.
                '''
                
                print("hi")
                  
            Example Arduino Sketch
            Pythondot img3Lines of Code : 24dot img3License : Permissive (MIT)
            copy iconCopy
            #include "SerialTransfer.h"
            
            
            SerialTransfer myTransfer;
            
            
            void setup()
            {
              Serial.begin(115200);
              myTransfer.begin(Serial);
            }
            
            
            void loop()
            {
              if(myTransfer.available())
              {
                // send all received data back to Python
                for(uint16_t i=0; i <  

            Community Discussions

            QUESTION

            Using pySerialTransfer over bluetooth sockets
            Asked 2020-May-05 at 16:07

            I have working code that sends a struct from a Raspberry Pi to an Arduino using pySerialTransfer when the devices are connected via a USB cable. I'd like to do that over bluetooth instead of with a USB cable, however.

            Independently, using separate python code and a separate Arduino sketch, I've been able to get the Raspberry Pi & Arduino to communicate over bluetooth via a continuous stream of text or binary data.

            My issue is that I don't see how to combine the two approaches - i.e.: if I send a binary-encoded structure over bluetooth, I don't see how I get the benefits of the pySerialTransfer / SerialTransfer libraries to parse it on the receiving end. I see how I can do the parsing "manually", looking for special terminating characters, etc., but I was hoping to avoid the need for that with pySerialTransfer.

            Thanks for any pointers / suggestions / examples. All the working code I've been able to construct so far is here.

            pySerialTransfer Working Arduino C serial code ...

            ANSWER

            Answered 2020-May-02 at 00:19

            pySerialTransfer / SerialTransfer will arrange data in packet format with CRC so it fast and safe way to communicate over serial.

            In fact, there are no special character to terminate packet because binary data can be any character from 0x00 to 0xFF cover all ASCII code.

            Source https://stackoverflow.com/questions/61549081

            QUESTION

            Infinite loop of "During handling of the above exception, another exception occurred" when serial connection interrupted
            Asked 2020-Apr-25 at 00:53

            I have an Arduino which is communicating properly with my Mac over serial using the pySerialTransfer library, running for hours. Then there is an interruption of the serial of some sort - though I've been unable to identify the cause when this happens overnight, I can reproduce the behavior pretty easily by just unplugging the Arduino USB cable from the laptop. The python code on my laptop continues to run, but gets into this infinite error loop:

            ...

            ANSWER

            Answered 2020-Apr-25 at 00:53

            I started down the tack of approaches to kill function calls that run too long, with potential solutions using StopIt and multiprocessing. But those failed because it seems that what was actually happening was that pySerialTransfer was spawning a separate thread to handle the serial communication and then returning control back to the calling function, but keeping that separate thread alive, and that separate thread was the one stuck in infinite error loops. So I couldn't detect the condition by the solutions to terminate long-running function calls. And as mentioned in the comment thread, no exceptions were passed up to the caller either, so try-except clauses also failed.

            However, the one thing I could detect was that an error to stderr was logged, and so if I could redirect that and detect a new error there, then that would get me down the right path. Enter this guidance, which steered me towards this solution:

            Source https://stackoverflow.com/questions/61396116

            QUESTION

            How to reconstruct the structure in python from pyserialtransfer's list of numbers
            Asked 2020-Apr-22 at 18:07

            I am trying to communicate bi-directionally between my laptop & my arduino via passing a common struct back and forth, but am having trouble unpacking the bytes returned from the Arduino. Using pySerialTransfer, it seems rxBuff returns a list of numbers that I can't figure out how to convert into a byte-string for struct.unpack to render back into the numbers I started with.

            At present, the Arduino code simply receives the data and spits it back, no transformations or action on the Arduino side. Here's my Arduino code:

            ...

            ANSWER

            Answered 2020-Apr-22 at 18:07

            Is this what you are looking for:

            Source https://stackoverflow.com/questions/61371786

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pySerialTransfer

            You can install using 'pip install pySerialTransfer' or download it from GitHub, PyPI.
            You can use pySerialTransfer like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install pySerialTransfer

          • CLONE
          • HTTPS

            https://github.com/PowerBroker2/pySerialTransfer.git

          • CLI

            gh repo clone PowerBroker2/pySerialTransfer

          • sshUrl

            git@github.com:PowerBroker2/pySerialTransfer.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Wrapper Libraries

            jna

            by java-native-access

            node-serialport

            by serialport

            lunchy

            by eddiezane

            ReLinker

            by KeepSafe

            pyserial

            by pyserial

            Try Top Libraries by PowerBroker2

            ELMduino

            by PowerBroker2C++

            SerialTransfer

            by PowerBroker2C++

            DFPlayerMini_Fast

            by PowerBroker2C++

            ArduPID

            by PowerBroker2C++

            WarThunder

            by PowerBroker2Python