Giter VIP home page Giter VIP logo

Comments (6)

bobemoe avatar bobemoe commented on June 12, 2024 3

So I'm using the @danielmcmillan fork. Its allowed me to use this lib on STM32. Thanks.

Would really love to see this (or similar) added to the official package here as it would improve compatibility vastly.

from arduinors485.

romainreignier avatar romainreignier commented on June 12, 2024 1

This issue also prevents the use of this library on the M4 core of the Portenta H7 board that does not define SERIAL_PORT_HARDWARE
But it also prevents to build the MachineControl library for the M4 core as tracked here: arduino-libraries/Arduino_MachineControl#85

For me this solution would be the best:

Do not create a RS485 object on SERIAL_PORT_HARDWARE, but rather require the user to actively chose the desired port as a parameter in the begin method (I guess it is ok to have SERIAL_PORT_HARDWARE as the default value for the port parameter.) Drawback: This change is not backwards-compatible. Current users of the library will have to add a line to create the RS485 object manually.

from arduinors485.

larsvankleef avatar larsvankleef commented on June 12, 2024

@chris007de What would be the workaround for now? I would like to use SoftwareSerial.h and pass that to the RS458 Class would that be possible?

from arduinors485.

danielmcmillan avatar danielmcmillan commented on June 12, 2024

I'm using a fork as a workaround for now which changes the HardwareSerial parameter to a Stream danielmcmillan@0193f4e
I otherwise kept the interfaces the same, but it is not backwards compatible since whatever serial port is being used has to be manually configured (provided baud rate and config is ignored), and the default RS485 object no longer works (replaced with null dereference macro to save memory while retaining compatibility with libraries that use it as a default).

It is compatible with the ArduinoModbus library so long as a custom RS485 object is provided, so it can be used for Modbus over software serial.

from arduinors485.

rlstrand avatar rlstrand commented on June 12, 2024

This issue also fails on Raspberry Pi Pico as it does not define SERIAL_PORT_HARDWARE.

from arduinors485.

bobemoe avatar bobemoe commented on June 12, 2024

I'm trying to get this working on STM32 which is a platform that uses USBSerial rather than HardwareSerial.

The workarounds sound promising but L181 link above is to master which I now think is the wrong line number?

Tempted to try the fork but that is some commits behind now too.

What is the current workaround/solution to this?

Thanks

from arduinors485.

Related Issues (15)

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.