Skip to content

Conversation

4ib3r
Copy link

@4ib3r 4ib3r commented Nov 13, 2018

I wrote transport based on PJON library, it can operate without any additional hardware (simple wire from pin to pin). External PJON library is required to use this.

@mfalkvidd
Copy link
Member

mfalkvidd commented Nov 13, 2018

Nice work!

To keep consistency with the rest of the library, helping users understand how to use the MySensors features, it would be nice if the debug flag (PJON_DEBUG) could be renamed to MY_DEBUG_VERBOSE_PJON (similar to the other transports, for example RF24)
It would also be nice if the same debug print function was used, to keep output format consistent (easier for users to follow, and possible to decode using the log parser) and so that debug is printed on the correct device if redirected. See

#if defined(MY_DEBUG_VERBOSE_RFM69)
for how other transports do debug prints.

@4ib3r
Copy link
Author

4ib3r commented Nov 14, 2018

I added MY_DEBUG_VERBOSE_PJON in a similar way.

@mfalkvidd
Copy link
Member

mfalkvidd commented Nov 14, 2018

MySensors is designed to work without additional dependencies (install the MySensors library through the Arduino IDE Library Manager and all features and examples will work without additional libraries).

I see you removed the PJON library in an earlier commit. What was your reasoning behind the removal? Would it be a bad idea to include the library in MySensors (except that we'd need to keep it updated, just like we have to do with the rest of the drivers)?

@mfalkvidd
Copy link
Member

mfalkvidd commented Nov 14, 2018

This comment is not directly related to this pull request, but I am adding it here for reference.

To make the PJON transport easy to use for MySensors users, we should create a page similar to https://www.mysensors.org/build/rs485
We could probably link to https://github.com/gioblu/PJON/tree/master/src/strategies/SoftwareBitBang which already has detailed information on which pins can be used on different microcontrollers.

The name of the page could be something like Wired (PJON). Not sure if we should plan ahead for the other PJON "strategies" (which includes AnalogRead which uses visible light or IR so not wired).

@4ib3r
Copy link
Author

4ib3r commented Nov 14, 2018

PJON library has include directive with <>, when I simple copied library to driver directory, I got compilation errors. The simplest method to resolve this problem is remove library, and use it as external dependency.

@gioblu
Copy link
Contributor

gioblu commented Nov 15, 2018

Ciao @mfalkvidd and @4ib3r I see the <> may make the integration more complex, we are testing to see if we can switch to "" for internal inclusions without breaking things.

If help is required I am available.
Thank you for MySensors really great library.

@gioblu
Copy link
Contributor

gioblu commented Nov 15, 2018

Ciao @4ib3r I have pushed the inclusion change see: gioblu/PJON@6fcfd75

@4ib3r
Copy link
Author

4ib3r commented Nov 16, 2018

Thank you for your change @gioblu.

@gioblu
Copy link
Contributor

gioblu commented Nov 20, 2018

Ciao @4ib3r can I help you in any way?

@tekka007
Copy link
Contributor

tekka007 commented Jan 5, 2019

Closed due to inactivity

@tekka007 tekka007 closed this Jan 5, 2019
@gryzli133
Copy link
Contributor

is there a way to speed up the PJON integration in MySensors?

@gioblu
Copy link
Contributor

gioblu commented Apr 19, 2019

I would also be happy to contribute @tekka007 to make this functional and part of the next release.

@tekka007
Copy link
Contributor

Ok, I'll create a follow-up PR that includes the work done in this PR and the required changes for MySensors CI. Since I have no experience with PJON and limited bandwith for testing and troubleshooting, I'd appreciate if @4ib3r, @gryzli133 and @gioblu could step in for Q&As.

@gioblu
Copy link
Contributor

gioblu commented Apr 19, 2019

Ciao @tekka007 thank you very much.
I think could have sense to include the PJON implementation version 11.2: https://github.com/gioblu/PJON/releases
It is expected to be fully backward compatible so it can be substituted without pain.

Another thing may have sense to be changed is the name of the transport, being expressly dedicated to the SoftwareBitBang strategy it may have sense to say it in the name, so something like MyTransportPJON-SoftwareBitBang specially because other transports could be created leveraging of other strategies, like for example MyTransportPJON-ESPNOW.

As far as it seems it is probably unfeasible to try to make a single transport configurable to use any supported strategy.

The code seems fine, I see here:

bool transportSanityCheck(void)
transportSanityCheck is not true that is not implemented, it is already done by PJON on a lower level, if the packet is received it means it passed the 2 crcs and the packet "sanity check" of PJON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants