Skip to content

Sending array of bytes #3

@JMartinezEco

Description

@JMartinezEco

Hello!

First of all I want to thank you for the work you have done porting this library to Python for Raspberry Pi. You have done a great job.

I was already using your library for Arduino, which worked great, and I had to make one for Raspberry Pi. As soon as I saw this version I decided to make the effort to transfer everything I had to this library because I think it will be worth it.

The problem or doubt that I am having is the following:

My goal is to send an array of bytes from a Raspberry Pi to an Arduino and vice versa. The second part, from Arduino to Raspberry Pi was already working previously, and I used your library as follows.

//C++
// Send message via Lora
LoRa_Module.sendFixedMessage(addH, addL, chn, (uint8_t *)bytes_response, len_response);

where bytes_response is declared as:

byte bytes_response[70];

My target is the same on the Raspberry Pi, but I see that there are two methods implemented:

lora.send_fixed_message(add_h, add_l, ch, message).
y
lora.send_fixed_dict(ADDH, ADDL, CHAN, dict_message)

I understand that the dictionary version is not the one I am looking for, but the message version.

Is it possible to send an array of bytes from the Raspberry without String as it seems to be needed?

My objective in Python is something like:

# Python
full_request = [0x01, 0x034, 0x04]
response_code = lora.send_fixed_message(0x1, 0x9F, 0x06, full_request)

Thank you so much in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions