Closed mickeyvanolst closed 2 years ago
After looking a bit closer at the examples in the Arduino library, I found that adding a 1 to python line 38. Does make the initial portion of the string occur on the SD card.
link.send(sendSize, 1)
at this point I'm just a bit puzzled about the logic which keeps the rest of the data coming in. I noticed someone posted a similar issue about file transfer in the Arduino version of the library
Another error in the python script is that the substring isn't created in the right way.
dataStr = file[fileIndex:fileIndex+dataLen]
adding +dataLen makes the script work again (along with sending the ID number)
Thanks for your eyes on the example code - I made the bug fix. Can you confirm it's working for you?
Assuming it's fixed
Hi @PowerBroker2,
First off, amazing work, your library is quite impressive!
I'm trying to use it to send a large text file via Python over UART to a Teensy.
What I noticed is that there is a typo in your example file on this line, the ')' at the end prevents it from compiling.
https://github.com/PowerBroker2/pySerialTransfer/blob/949a7e2197f7bc9c889fcd7f9ad140f79082d444/examples/file/Arduino/rx_file/rx_file.ino#L34
A bigger issue though, is that combined with the Python example file, I can't get any data through. What I noticed through some tests is that the condition
myTransfer.currentPacketID() == 1
never seems to be true.Just to give you a bit of insight, I'm trying to store the incoming file onto an SD card, below you can see my code.
Any clue what could be going on here?
PS: The Python script is basically just like the one from the example, all I did was add some print logs