-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packet not received #23
Comments
It's supported. What problem are you having?
…On Tue, May 12, 2020, 12:14 PM PB2 ***@***.***> wrote:
This lib seems to be unsupported. A much easier to use and supported
serial packet library can be found here
<https://github.com/PowerBroker2/SerialTransfer>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACJLRCRIWJ5D5IIXSUNL33RRGGWZANCNFSM4JNAWGTA>
.
|
By the way, python, with test code is linked in the readme.
…On Wed, Nov 13, 2019, 12:52 PM Paul (mightyboat) ***@***.***> wrote:
I'm trying to send a packet from Python to the Arduino but the handler is
never triggered. Maybe I misunderstand the packet format?
I'm using the COBS library to encode the data. Here's the packet as it is
sent using the standard python serial library:
b'\x03\x01\x04\x00'
Here's the Arduino code:
#include <PacketSerial.h>
PacketSerial myPacketSerial;
void setup() {
myPacketSerial.begin(9600);
myPacketSerial.setPacketHandler(&onPacketReceived);
}
void loop() {
myPacketSerial.update();
}
void onPacketReceived(const uint8_t* buffer, size_t size)
{
uint8_t tempBuffer[size];
memcpy(tempBuffer, buffer, size);
uint8_t id = tempBuffer[0];
myPacketSerial.send(id, 1);
}
Why am I not getting anything back?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AACJLRCIOYVKPVIHFIXGBY3QTRLGPA5CNFSM4JNAWGTKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZDX7FA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACJLRC3DOLUAQSLSLIID3DQTRLGPANCNFSM4JNAWGTA>
.
|
@gordon13 One thing of note -- the void send(const uint8_t* buffer, size_t size) const and you are giving it a value, thus it may not give the correct value. You may want to try:
Also, if the value of your |
I'm having the same issue.. I'm sending data and trying to send back data after it is received. It seems onPacketReceived is not firing. Any Ideas? |
FTR I've experienced this issue. Python |
Thank you! This works for me. |
I'm trying to send a packet from Python to the Arduino but the handler is never triggered. Maybe I misunderstand the packet format?
I'm using the COBS library to encode the data. Here's the packet as it is sent using the standard python serial library:
b'\x03\x01\x04\x00'
Here's the Arduino code:
Why am I not getting anything back?
The text was updated successfully, but these errors were encountered: