Unfortunately I can't transmit any data from raspberry to dell laptop. I have created a small python script which uses serial module to listen to port every second and output the result. This script is started on Dell laptop. On my raspberry I am running another script that simply writes the keyboard input to serial port. I can see that something is transmitted because every time I type in a message and hit enter small orange light indicator blinks on my level shifter, and when running screen /dev/ttyAMA0 115200 it blinks with every keystroke I make, so something is going on. However the script on my dell laptop that runs in a loop reading its serial port /dev/ttyS0 reports nothing.
Here is the script used on Dell laptop:
Code: Select all
#!/usr/bin/env python
import time
import serial
ser = serial.Serial(
port='/dev/ttyS0',
baudrate = 115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=1
)
while 1:
print 'SERIAL PORT:', ser.readline()
time.spleep(1)Code: Select all
#!/usr/bin/env python
import time
import serial
ser = serial.Serial(
port='/dev/ttyAMA0',
baudrate = 115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=1
)
while 1:
message = input('>> ')
ser.write(message)
time.spleep(1)Needless to say that I tried various things, like screen, minicom and even java pi4j implementation -- the message is not transmitted from raspberry to dell although the light indicator is blinking.
Both user of Dell and Rasppi is in "dialout" group, rasp pi has its ttyAMA0 port open and working.
I am attaching photos of how the rasp pi is connected to the laptop, take a look please. So, my question is -- what am I doing wrong? Maybe I should just write and read to the same port on the same machine? How do I transmit data then?



