>>And I will finally learn a python ;)
Thanks for using my language. I read and thought about your code but in the
end I chose to use SSH rather then telnet. SSH support is already present
in the debian distribution I am using so I could get it working without
writing any more code on the beagle bone side.
>> If that's a sustained rate, and not burst, it is likely extreme for
serial protocols.
After rechecking my numbers, I agree it was a bad idea for me to be using
serial for this data rate. I have switched to using SSH. I attach a minimal
example below that I wrote to prove that the communication is faster and
error free. To run this the paramiko library is required.
import paramiko
import time
# setup logging
paramiko.util.log_to_file('BBB_paramiko.log')
port = 22
# hostname = '192.168.1.34' # highest measured bytes per second over
ethernet: 7,868,481
hostname = '192.168.7.2' # highest measured bytes per second over usb:
5,941,004
username = 'root'
password = ''
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(hostname, port, username, password)
stdin, stdout, stderr = client.exec_command('yes 1234567890', bufsize=2**24)
print('streaming started')
startTime = time.perf_counter()
total_data = 0
for i in range(10_000):
line = stdout.readline()
if line == '1234567890\n':
total_data += len(line)
else:
print(line)
# x = stdout.read(10_000) # this is faster then readline
# total_data += len(x)
print(f'bytes per second:
{int(total_data/(time.perf_counter()-startTime))}')
client.close()
The above program transfers data with no losses at an average rate of
2,580,544 bytes per second. The speed changes according to how the data is
processed on the PC side so that is probably the speed limitation now. Now
that I have proven the communication works fine I will make my pressure
data stream over SSH. At some point in the future I will probably remove
the checksums on the pressure data once I can show there are no checksum
failures in production.
I don't need any more help, thanks everyone.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/693dd66c-6764-479d-9c36-d573dad7c7d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.