Raspberry pi serial port
Pages: 1 2
Terry Swanborough (455) 53 posts |
Thanks for the heads up on the baud rate calculation. My personal view is the operation of the serial port should be included I am just pleased that someone got around to finishing off access to the serial port Well Done :-) |
Tank (53) 375 posts |
Terry, that’s typical… |
Terry Swanborough (455) 53 posts |
Well its just my opinion :-) Any easy access to the serial port will be an improvement. Regards |
Ronald May (387) 407 posts |
I’ve been working with single byte transfers and Terry’s drivers are fine, though I found certain certain BASIC structures in my program would stop the RX. The difference was subtle, using THEN instead of ELSE after some lines of code I would have thought would be skipped transparently. |
Tank (53) 375 posts |
Ronald, Do you mean you can transmit(TX) OK but receive(RX) doubles up ?
If you are using the !SerialDev drivers, then yes the same calls are available. P.S another update available from the same location |
Ronald May (387) 407 posts |
@Tank |
Tank (53) 375 posts |
Ronald, I see what you mean now… Also, I have changed the SWI name to PiSerial_ for the allocation request, so you will need to change your code to suit if you try the new build. If you wish to send me your email address, to webmaster@tankstage.co.uk I could use you as my test bed.., and we can keep the chatter here to a minimum. |
Tank (53) 375 posts |
With help from Ronald, I think most of the module will work now… |
Ronald May (387) 407 posts |
The said problem has been found and fixed. (by Tank) Looking at the timestamp, the latest has been uploaded, just check that the timestamp is 04:33:23 09 Jun 2013 or newer on your PiSerial module or download again. |
Arno (2152) 9 posts |
Hello Tried the module successfully with 115200 baud on external terminal connected to Pi. Regards Arno |
Ronald May (387) 407 posts |
Hi Arno, you haven’t described what test you use. I assume you know the speeds have to be set on both machines? If connecting to Raspian, the default is 115200. |
Arno (2152) 9 posts |
Hi Ronald, |
Ronald May (387) 407 posts |
OK, so you know for sure that the Win7 terminal is changing speed from connecting to other machines, that only leaves the method for setting the parameters with RISC OS Pi. I am still on RC8 so later I will install RC11 on my Pi and then I will re-run what I have used previously and report back with the results. |
Arno (2152) 9 posts |
Thank you, RISC OS is RC11 here. In the meanwhile I tried the program from Terry with the speed calculation from Tank and had success. |
Ronald May (387) 407 posts |
I’ve installed RC11 and I can use 38400 with the blockdrivers. You could try setting the speed with this utility. |
Arno (2152) 9 posts |
Thank you for the tool. I was able to set the speed with Terry’s program and work with the |
Arno (2152) 9 posts |
@ Ronald: |
Tank (53) 375 posts |
Arno, sorry I didn’t have time to help you earlier, but it seems Ronald sorted you anyway…. |
Ronald May (387) 407 posts |
Tank, there is a change to RISC OS 5.20 that has added OS_SerialOp 10, (get devicefs name). some details I have from the 5.20 changelog. OS_SerialOp 10 (5.20+) It appears to be used with serial mouse detection, and I don’t know if reason code 10 is of any other use yet. |
Jeffrey Lee (213) 6048 posts |
Your guess at the call details is pretty much correct. There’s some “official” docs on the wiki: https://www.riscosopen.org/wiki/documentation/show/OS_SerialOp%2010
Yes – or at least as much as the hardware allows. e.g. the BB & BB-xM only have the RX & TX lines connected, so hardware flow control and modem lines won’t work. My memory is a bit hazy, but IIRC the OS serial device drivers break down as follows:
See also this thread for a bit more background on the OS_SerialOp/DualSerial changes. |
Ronald May (387) 407 posts |
Thanks for the helpful overview, Jeffrey. |
Kim Faulkner (84) 30 posts |
Tank, |
Tank (53) 375 posts |
Kim, |
Rick Murray (539) 13840 posts |
Fitted a little USB→3.3V serial to my Pi. Chinese clone chip, bought cheap from Amazon. Thankfully the Prolific driver in my XP box was too ancient to attempt to verify the chip was ‘real’. Tank’s module works nicely, can send debug messages from an app. Serial blockdriver + HearSay2 = task freeze (Alt-ESCable), not sure why. Looks like I can build a version of DADebug that will write out to serial using the HAL’s debug. Nice! |
Pages: 1 2