 |
Das deutsche QBasic- und FreeBASIC-Forum Für euch erreichbar unter qb-forum.de, fb-forum.de und freebasic-forum.de!
|
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
dididunst
Anmeldungsdatum: 04.01.2014 Beiträge: 1
|
Verfasst am: 04.01.2014, 21:46 Titel: No RS232 Baurate Control under Linux |
|
|
Hi
I found that the RS232 baudrate setting of Freebasic are not working under Linux.
Here is my simple test program (prepared and compiled within Geany under MINT14) to reproduce the odd behavior. I am assuming that the compiler has a bug and I would be pleased if this could be fixed. Please also read my comments in the source code.
It seems that I am not the only one who experienced this but no
response has been posted to another claim since almost 4 years.
Dididunst
Code: |
'This is a small test app in FreeBasic to demonstrate,
'that the serial ports are not working under FreeBasic
'if run under Linux.
'Prerequisites: the rights to use the serial ports under
'Linux. This has been taken care off and two other apps
'(one written in Gambas and the other in Python) work
'perfectly with the serial ports.
'
'Observations:
'Signals are received if the counter station is set to
'38.4kBaud. However the actual baudrate seems to vary
'and is unpredictable (sometimes 19.2, sometimes 9.6kBaud)
'The received signals are also not 100% error free and
'it seems that the baudrates are not compliant with
'standards.
Dim a as String
Dim i as Integer
Dim b as integer
b= OPEN COM ("COM1:1200,N,8,1" as #1)
if b=0 then
Print "Port sucessfully opened"
else
Print "Error while opening Port 1"
end if
'to see whether transmission is working
'(too be seen at the counter station)
Print #1,"Hello, here comes Freebasic"
'Receiving
Do
a=input (1,#1)
print a;
if inkey$()<>"" then exit do
loop
Print chr$(13)&chr$(10)&"Programm ended."
CLOSE #1
end |
 |
|
Nach oben |
|
 |
28398
Anmeldungsdatum: 25.04.2008 Beiträge: 1917
|
Verfasst am: 06.01.2014, 12:34 Titel: |
|
|
Use stty to set baud rates. |
|
Nach oben |
|
 |
Jojo alter Rang

Anmeldungsdatum: 12.02.2005 Beiträge: 9736 Wohnort: Neben der Festplatte
|
Verfasst am: 06.01.2014, 15:33 Titel: |
|
|
Das ändert nichts daran, dass es ein bug im FBC ist, da sich das Verhalten hier von früheren Versionen (0.14) unterscheidet, wo das Ganze noch funktionierte (die Geschichte wurde schon im IRC besprochen). _________________ » Die Mathematik wurde geschaffen, um Probleme zu lösen, die es nicht gäbe, wenn die Mathematik nicht erschaffen worden wäre.
 |
|
Nach oben |
|
 |
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
|