Thanks for your reply, radio is listening to signal and sending straight to a webserver.
I did manage to accomplish the task tho, I converted the images to hex, sent the hexes though serial port, collected the hexes and remounted the image on clinet-side.
I am having now a really smaller problem on the task. Sometimes the radio scrambles my receiving end, I get the messages out of order and I'm failing to use a number as an indicator inside the coding.
Code: Select all
import serial
import time
s = serial.Serial("/dev/ttyUSB0")
i = 1
f = open('/home/pi/camlog/cam1.txt', 'rb')
while True:
piece = f.read(512)
if not piece:
break
s.write('CAM1P')
s.write(i)
s.write('_')
s.write(piece)
#time.sleep(30)
s.write('\r\n')
i += 1
For some reason, i as an integer, isn't sent by serial, I have no idea why or how to go around this.