Using serial port on Raspberry Pi
|
Do I need any extra modules to send/receive strings down the Raspberry Pi serial pins, or is it all built into the OS? Cheers, Gerald. |
|
PiSerial blockdrivers can be found here |
|
Cheers Ronald – I’ll give it a go. |
|
FYI as of today the development Pi ROMs should have working serial port support (OS_SerialOp + DeviceFS Serial1 interface). The Internal32 block driver (or similar) should work. If people need to stick with PiSerial or other solutions then they should be able to |
|
Is a PiSerial module aviable that works on a RPi2? |
|
I have a socket with flying leads – how do I connect it, please, to use this facility? RPi2 B running 5.23 (10-Oct-16). Could someone put a reference page up, please? |
|
Following from Jeffery’s post above (10th October), I have finally got RISC OS onto my borrowed Pi3 (which has a Serial add-on card, plugging into the GPIO pins) and have knocked up the following programs: REM>SerialReceive and: REM>SerialSend but am unable to communicate with my Windoze 10 laptop using a USB to serial adapter and TeraTerm software. Am I missing something? Cheers, Gerald. |
|
Is the cable connected correctly? If it is, you should be able to measure several volts on each of pins 2 and 3 of the 9 pin D type connector, relative to pin 5. This is general advice for checking an EIA-232 connection, so it’s worth remembering. If the cable is not correct, the chances are that only one of pins 2 and 3 will have significant voltage; this would indicate that you’ve got two transmitters trying to transmit to each other, and two receivers listening to each other – and that ain’t going to do anything useful. If it is like that, you could fix it by swapping pins 2 and 3 in the cable at one end. |
|
Another thing to try: if you connect pins 2 and 3 together and run both your apps in task windows, you should be able to type to yourself. |
|
Sorry, I forgot to mention that the serial cable is one I have previously used to get my work PC to talk to various bits of kit. However, I’ll stick a voltmeter on the pin and see if it shows anything. I was going to stick an oscilloscope on it. Never thought of connecting pins 2 and 3 together…good idea – I’ll give it a go. |
|
While PC’s are DCE presentation and require a null modem cable (cross-over) to connect to another DCE device most of the dev board serial port presentations are DTE and therefore the connections are pin-to-pin.
Normally you’d need to do some hardware handshake connections too but the Pi and various other dev boards don’t pass the handshake pins through and reply on software handshake. One trick is to connect the output of your board to the serial input on a PC and run Putty at the right baud rate. All printable characters sent will appear in the putty console window. |