MyTerminal prog

For issues with communication ports, protocols, etc.
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Postby dasyar » Jul 29, 2011 14:09

I am thinking about adding some kind of file transfer protocol to my term program, but I do not have the slightest idea as to where or how to start. I guess I need some ideas , and some example code.
phishguy
Posts: 1200
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Postby phishguy » Jul 30, 2011 3:32

I found the following xmodem code written in QBasic. You should be able to adapt that. I haven't tried it though.

http://www.o-bizz.de/qbdown/qbcom/files/xmodem.bas
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Postby dasyar » Jul 30, 2011 10:29

Thanks phishguy, I just downloaded the code, I will see if it makes any sense to me. From a quick glance, I think I will design a new FBterm. I will still try to have it workable program for DOS, and Windows. For Linux, I get hung up on getting the ports to work, so somebody else will have to do that.
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Postby dasyar » Jul 31, 2011 20:15

This is a rough coded FBterm.bas rev 2.0. If somebody would look at the code, and let me know if I am on the right track. It does not have a functioning Xmodem, just some empty subroutines. What would be the pitfalls with the code? All suggestions are welcome.

Thanks

Code: Select all


'FBterm.bas
'FBterm.exe
'Version 2.0
'July 27, 2011


'''''''''''''''''''''''''''''''''''''''
Declare Sub ReceiveXmodem(ByVal blksize As integer,ByVal file As String)
Declare Sub SendXmodem(ByVal blksize As Integer, ByVal file As String)

Locate ,,0     ' Turn the cursor off

Dim As String Key, buffer,rfile,sfile
Dim As Integer cp,b,p,column,row,flag,pos1,pos2,echo1,e,blksize2,r,s
Dim numtosend As String
Dim numtosend2 As UByte
Dim t As Double
Dim As String baud(0 To 9) = {"110","300","1200","2400","4800","9600","19200","38400","57600","115200"}
Dim As String port(0 To 3) = {"COM1:","COM2:","COM3:","COM4:"}
Dim As String echo(0 To 1) = {"On","Off"}


Dim Corig As UInteger

Dim x As Integer, y As Integer, buttons As Integer
Dim res As Integer

Corig = Color()

''''''''' Subroutines and Functions '''
Sub PrtColText(ByVal x As Integer, ByVal y As Integer, ByVal color1 As Integer, ByVal color2 As Integer, ByRef text As String)
   Locate x,y
   Color color1,color2
   Print text
End Sub

Sub OrigColor(ByVal loval As UInteger, ByVal hival As UInteger)
   Color loval,hival
End Sub
'''''''''''''''''''''''''''''''''''''''

''''''''' Define the screen '''''''''''
Screen 12
Width 80,30
'''''''''''''''''''''''''''''''''''''''


cp = FreeFile
r=2
s=2

Cls


begin:
Locate 1,1
View Print 1 To HiWord(Width)

PrtColText(1,0,7,9,"                                    ")
PrtColText(1,37,7,9,"FBterm")
PrtColText(1,43,7,9,"                                      ")
PrtColText(2,0,0,4,"Quit")
PrtColText(2,5,7,9,"  ")
PrtColText(2,7,0,4,"Connect   ")
PrtColText(2,17,7,9,"  ")
PrtColText(2,19,0,4,"Port")
PrtColText(2,23,7,9," ")
PrtColText(2,24,7,9,"     ")
PrtColText(2,29,7,9," ")
PrtColText(2,30,0,4,"Baud")
PrtColText(2,34,7,9," ")
PrtColText(2,35,7,9,"      ")
PrtColText(2,41,7,9,"                                        ")




Locate 2,24
Print port(p);
Locate 2,35
Print baud(b);

OrigColor(LoWord(Corig),HiWord(Corig))

Do
   
   res = GetMouse(x, y, , buttons)

''''''''' Esc key '''''''''''''''''''''   
   Key = InKey$
     If key = Chr$(27) Then
        'Exit Do
        GoTo Cend
     EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' Quit ''''''''''''''''''''''''
'' X ''
If x > 0 And x <= 32 and y > 16 And y < 32 And buttons And 1 Then
   GoTo Cend
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' Connect '''''''''''''''''''''
If x > 48 And x <= 128 And y > 16 And y < 32 And buttons And 1 Then
   Sleep 255,1
   Exit Do
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' port ''''''''''''''''''''''''
If x > 144 And x <= 177 And y > 16 And y < 32 And buttons And 1 Then
   p += 1
   If p = 4 Then p = 0
   Locate 2,24
   Color 7,9
   Print "     "
   Locate 2,24
   Print port(p);
   Sleep 250,1
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' baud ''''''''''''''''''''''''
If x > 233 And x <= 265 And y > 16 And y < 32 And buttons And 1 Then
   b += 1
   If b = 10 Then b = 0
   Locate 2,35
   Color 7,9
   Print "      "
   Locate 2,35
   Print baud(b);
   Sleep 250,1
EndIf
'''''''''''''''''''''''''''''''''''''''
 

Sleep 1
Loop


PrtColText(2,7,0,4,"Disonnect")
PrtColText(2,45,0,4,"Send Number")
PrtColText(2,57,0,4,"Echo")
PrtColText(2,61,7,9," ")
PrtColText(2,62,7,9,"On ")

PrtColText(2,66,7,9," ")
PrtColText(2,67,7,9,"File")
PrtColText(2,71,7,9," ")
PrtColText(2,72,0,4,"Off ")
PrtColText(2,75,7,9," ")
PrtColText(2,76,7,9,"S")
PrtColText(2,77,7,9," ")
PrtColText(2,78,7,9,"R")


View Print 3 To HiWord(Width)
OrigColor(LoWord(Corig),HiWord(Corig))
Locate 1,3,0
Open Com port(p) & baud(b) & ",n,8,1,cs0,ds0,cd0,rs" As #cp

If Err <> 0 Then
   Print "Error opening";
   Sleep 200,1
   Cls
   GoTo begin
EndIf


t = Timer
Do
   
   res = GetMouse(x, y, , buttons)
   Key = InKey$

column = Pos
row = CsrLin
  If Key = Chr$(13) Then
     Print #cp, Chr$(10);
     Print Chr$(10);
  EndIf
 
  If Timer - t > .5 Then
     flag = Not(flag)
       If flag Then
          Print "_";
       Else
          Print " ";
       EndIf
      
       Locate row,column
       t = Timer
  EndIf
 
 
 

''''''''' Quit ''''''''''''''''''''''''
'' X ''
If x > 0 And x <= 32 and y > 16 And y < 32 And buttons And 1 Then
   'GoTo Cend
   Print "ERROR - Do a DISCONNECT first!"
   Sleep 240,1
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' Disonnect '''''''''''''''''''
If x > 48 And x <= 128 And y > 16 And y < 32 And buttons And 1 Then
   Close #cp
   View Print 1 To hiword(Width)
   PrtColText(2,5,0,4,"         ")
   OrigColor(LoWord(Corig),HiWord(Corig))
   Sleep 240,1
   cls
   GoTo begin
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' Send number '''''''''''''''''
If x > 360 And x <= 448 And y > 16 And y < 32 And buttons And 1 Then
   Input "Enter a number to send (0 - 255) space delimited";numtosend
   pos1 = InStr(numtosend, " ")
   If pos1 = 0 And Len(numtosend) > 0 Then
      Print #cp, Chr$(Val(numtosend));
      Print Chr$(Val(numtosend));
   Else
      numtosend2 = Val(Left$(numtosend,pos1))
      Print #cp, Chr$(numtosend2);
      Print Chr$(numtosend2);
      Do While pos1 > 0
         pos2 = pos1
         pos1 = InStr(pos1+1, numtosend, " ")
         numtosend2 = Val(Mid$(numtosend,pos2+1,pos1-pos2))
         Print #cp, Chr$(numtosend2);
         Print Chr$(numtosend2);
      Loop
   EndIf
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' echo ''''''''''''''''''''''''
If x > 456 And x <= 480 And y > 16 And y < 32 And buttons And 1 Then
   e += 1
   If e = 2 Then e = 0
   View Print 1 To HiWord(Width)
   Locate 2,62
   Color 7,9
   Print "   "
   Locate 2,62
   Print echo(e);
   View Print 3 To HiWord(Width)
   Color 7,0
   Cls
   Sleep 250,1
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' file off ''''''''''''''''''''
If x > 559 And x <= 592 And y > 16 And y < 32 And buttons And 1 Then

   View Print 1 To HiWord(Width)
   Locate 2,72
   Color 0,4
   Print "   "
   Locate 2,72
   Print "Off"
   Color 7,9
   Locate 2,76
   Print " "
   Locate 2,76
   Print "S"
   Locate 2,78
   Print " "
   Locate 2,78
   Print "R"
   View Print 3 To HiWord(Width)
   Color 7,0
   Sleep 250,1
   r=2
   s=2 
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' file S ''''''''''''''''''''
If x > 600 And x <= 608 And y > 16 And y < 32 And buttons And 1 Then
s=2
   View Print 1 To HiWord(Width)
   Locate 2,76
   Color 0,4
   Print " "
   Locate 2,76
   Print "S"
   s = 0
   Locate 2,72
   Print "   "
   Locate 2,72
   Color 7,9
   Print "Off"
   Locate 2,78
   Print " "
   Locate 2,78
   Print "R"
   View Print 3 To HiWord(Width)
   Color 7,0
   Sleep 250,1
      
EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' file R ''''''''''''''''''''
If x > 616 And x <= 624 And y > 16 And y < 32 And buttons And 1 Then
r = 2
   View Print 1 To HiWord(Width)
   Locate 2,78
   Color 0,4
   Print " "
   Locate 2,78
   Print "R"
   r = 1
   Locate 2,72
   Color 7,9
   Print "Off"
   Locate 2,76
   Print " "
   Locate 2,76
   Print "S"
   View Print 3 To HiWord(Width)
   Color 7,0
   Sleep 250,1
      
EndIf
'''''''''''''''''''''''''''''''''''''''

If s = 0 Then
   Input "File Name: ";sfile
   blksize2 = 256
   SendXmodem(blksize2,sfile)
   Print "File Sent"
   Sleep 250,1
   Cls
EndIf

If r = 1 Then
   Input "File Name: ";rfile
   blksize2 = 256
   ReceiveXmodem(blksize2,rfile)
   Print "File Received"
   Sleep 250,1
   Cls
EndIf


''''''''' Terminal screen '''''''''''''      
     If Key <> "" Then
         If Key = Chr$(13) Then  ' This handles CR/LF
            Print #cp, Chr$(13);
            Print Chr$(10);
         Else
            Print #cp,Key;   ' Send the char
            If echo(e) = "Off" Then
               'echo off
            Else
               Print Key;
            EndIf
                  'Print Key;       ' This is the echo
         EndIf
     EndIf
    
     While LOC(cp) > 0
        buffer = Input(LOC(cp),#cp)  ' Grab the incoming chars
        Print buffer;                ' Print the char
     Wend
     Sleep 1,0
'''''''''''''''''''''''''''''''''''''''
   r=2
   s=2 
Loop

Cend:

Close

End

Sub ReceiveXmodem(ByVal blksize As integer,ByVal file As string)
   
   return
End Sub

Sub SendXmodem(ByVal blksize As Integer, ByVal file As String)
   
   Return
End Sub

dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Postby dasyar » Aug 01, 2011 11:36

After looking at the Xmodem program, I think I will have to translate it to fbc, just to see if it really works. If it does not, then the time wasted would be in the translation time. To bad it does not compile as is in fbc.
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Postby dasyar » Aug 02, 2011 19:47

After looking at the FBterm code, I decided it needed some cleanup, and a couple of new functions. I added an 'echo on/off', and a 'cls' to the menu bar. I also tried my luck with the use of subroutine and function declarations. The menu bar is fairly intuitive, click on the red tabs for functionality.

I think I got all the bugs, but if somebody would run the program, and see what happens. Feedback would be nice, and I did not add file transfer functionality yet.

Does anybody have any idea if freeBASIC will be offered in a 64 bit version? Would like to run FBterm on my Win 7 64 bit computer, without getting into the 32 bit emulation mode.



Code: Select all

' FBterm.bas
' FBterm.exe
' Version 2.0 revision 02
' August 2, 2011

Screen 12
Width 80,30
Locate ,,1

' Globals
Dim Shared Corig As UInteger
Dim Shared t As Double
Dim Shared As Integer column, row, flag, pos1, pos2, row1, column1
Dim Shared As String Key, buffer, numtosend
Dim Shared As UByte numtosend2

''''''''' Headers for Functions and Subroutines '''''''''''
Declare Sub InfoBar()
Declare Sub InfoBar2()
Declare Sub PrtColText(ByVal x As Integer, ByVal y As Integer, ByVal color1 As Integer, ByVal color2 As Integer, ByRef text As String)
Declare Sub OrigColor(ByVal loval As UInteger, ByVal hival As UInteger)
Declare Sub TextCursor()
Declare Sub sendnum()

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Locals
Dim As Integer b, p, e
Dim As String baud(0 To 7) = {"1200","2400","4800","9600","19200","38400","57600","115200"}
Dim As String port(0 To 3) = {"COM1:","COM2:","COM3:","COM4:"}
Dim As String echo(0 To 1) = {"On"," Off"}

Dim As String Escape = Chr(27)
Dim As Integer res, x, y, buttons

Corig = Color()

''''''''' Start of Program ''''''''''''
   Cls
begin:
   InfoBar()
   Locate 2,24
   Color 7,9
   Print port(p);
   Locate 2,37
   Print baud(b);

''''''''' Main Screen '''''''''''''''''         
Do
   res = GetMouse (x, y, , buttons)

   Key = InKey$
   
   If Key = Escape Then   
      Exit Do
   EndIf

''''''''''' Mouse over Quit '''''''''''
   If x > 1 And x <= 32 And y > 16 And y < 31 And buttons And 1 Then
      'Exit Do
      GoTo Cend
   EndIf
'''''''''''''''''''''''''''''''''''''''

'''''''''' Mouse over Connect '''''''''
   If x > 49 And x <= 112 And y > 16 And y < 31 And buttons And 1 Then
      Sleep 200,1
      Exit Do
   EndIf
'''''''''''''''''''''''''''''''''''''''

'''''''''' Mouse over port ''''''''''''
   If x > 144 And x <= 176 And y > 16 And y < 31 And buttons And 1 Then
      p += 1
      If p = 4 Then p = 0
      Locate 2,24
      Color 7,9
      Print port(p);
      Sleep 200,1
   EndIf
'''''''''''''''''''''''''''''''''''''''

'''''''''' Mouse over baud ''''''''''''
   If x > 248 And x <= 280 And y > 16 And y < 31 And buttons And 1 Then
      b += 1
      If b = 8 Then b = 0
      Locate 2,37
      Print "      "
      Color 7,9
      Locate 2,37
      Print baud(b);
      Sleep 200,1
   EndIf
'''''''''''''''''''''''''''''''''''''''
   
Loop
''''''''' End of Main Screen ''''''''''

''''''''' Live Terminal '''''''''''''''
   InfoBar2()
   Open Com port(p) & baud(b) & ",n,8,1,cs0,ds0,cd0,rs" as #1
'   Open Com "COM1:115200,n,8,1,cs0,ds0,cd0,rs" As #1
   If Err <> 0 Then
      Print "Error opening",port(p);
      Sleep 2000,1
      Cls
      GoTo begin
   EndIf



Do
   res = GetMouse (x, y, , buttons)
   Key = InKey$
   TextCursor()



'''''''''' Mouse over Disonnect '''''''''
   If x > 49 And x <= 136 And y > 16 And y < 31 And buttons And 1 Then
      Close #1
      OrigColor(LoWord(Corig),HiWord(Corig))
      Sleep 200,1
      Cls
      GoTo begin
   EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' Mouse over echo '''''''''''''
    If x > 336 And x <= 368 And y > 16 And y < 31 And buttons And 1 Then
       e += 1
       If e = 2 Then e = 0
       View Print 1 To HiWord(Width)
       Locate 2,48
       Color 7,9
       Print "    "
       Locate 2,48
       Print echo(e);
       View Print 3 To HiWord(Width)
       Color 7,0
       Cls
       Sleep 200,1
    EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' Mouse over Send Number ''''''
   If x > 424 And x <= 512 And y > 16 And y < 31 And buttons And 1 Then
      sendnum()
   EndIf
'''''''''''''''''''''''''''''''''''''''

''''''''' Mouse over Cls ''''''''''''''
   If x > 520 And x <= 544 And y > 16 And y < 31 And buttons And 1 Then
      Cls
   EndIf
'''''''''''''''''''''''''''''''''''''''

'''''''''' Terminal Screen ''''''''''''
    If Key <> "" Then

       
       If Key = Chr$(13) Then   ' Check for CR
          Print #1, Chr$(13);   ' CR
          Print Chr$(10);       ' LF
       Else
          Print #1,Key;
             If echo(e) = "On" Then
                Print Key;
             Else
                'Echo off
             End If
       EndIf
    EndIf
   
    While LOC(1) > 0
       buffer = Input$(LOC(1),#1)
       Print buffer;
    Wend
'''''''''''''''''''''''''''''''''''''''

Sleep 1   
Loop
''''''''' End of Live Terminal ''''''''
Cend:

Close

End
''''''''' End of Program ''''''''''''''

''''''''' Functions and Subroutines '''

Sub InfoBar()
   Cls
   Locate 1,1
   View Print 1 To HiWord(Width)
   PrtColText(1,1,7,9,"                                   ")
   PrtColText(1,36,7,9,"FBterm")
   PrtColText(1,42,7,9,"                                       ")
   PrtColText(2,1,0,4,"Quit")
   PrtColText(2,5,7,9,"  ")
   PrtColText(2,7,0,4,"Connect")
   PrtColText(2,14,7,9,"     ")
   PrtColText(2,19,0,4,"Port")
   PrtColText(2,23,7,9," ")
   PrtColText(2,24,7,9,"      ")
   PrtColText(2,30,7,9,"  ")
   PrtColText(2,32,0,4,"Baud")
   PrtColText(2,36,7,9," ")
   PrtColText(2,37,7,9,"      ")
   PrtColText(2,42,7,9,"                                       ")
   OrigColor(LoWord(Corig), HiWord(Corig))   
End Sub

Sub InfoBar2()
   PrtColText(2,1,7,9,"      ")
   PrtColText(2,7,0,4,"Disconnect")
   PrtColText(2,23,7,9," ")
   PrtColText(2,30,7,9,"  ")
   PrtColText(2,36,7,9," ")
   PrtColText(2,42,0,4,"Echo")
   PrtColText(2,46,7,9," ")
   PrtColText(2,48,7,9," On")
   PrtColText(2,51,7,9,"  ")
   PrtColText(2,53,0,4,"Send Number")
   PrtColText(2,64,7,9," ")
   PrtColText(2,66,0,4,"Cls")
   PrtColText(2,69,7,9,"            ")
   View Print 3 To HiWord(Width)
   OrigColor(LoWord(Corig),HiWord(Corig))
   Locate 3,1,0   
End Sub

Sub PrtColText(ByVal x As Integer, ByVal y As Integer, ByVal color1 As Integer, ByVal color2 As Integer, ByRef text As String)
   Locate x,y
   Color color1,color2
   Print text
End Sub

Sub OrigColor(ByVal loval As UInteger, ByVal hival As UInteger)
   Color loval,hival
End Sub

Sub TextCursor()
   column = Pos
   row = CsrLin

   If Timer - t > .5 Then
      flag = Not(flag)
      If flag Then
         Print "_"
      Else
         Print " ";
      EndIf
   Locate row,column
   t = Timer
   EndIf
End Sub

Sub sendnum()
   Input "Enter a number to send (0 - 255) space delimited";numtosend
   pos1 = InStr(numtosend, " ")
   If pos1 = 0 And Len(numtosend) > 0 Then
      Print #1, Chr$(Val(numtosend));
      Print Chr$(Val(numtosend));
   Else
      numtosend2 = Val(Left$(numtosend,pos1))
      Print #1, Chr$(numtosend2);
      Print Chr$(numtosend2);
      Do While pos1 > 0
         pos2 = pos1
         pos1 = InStr(pos1+1, numtosend, " ")
         numtosend2 = Val(Mid$(numtosend,pos2+1,pos1-pos2))
         Print #1, Chr$(numtosend2);
         Print Chr$(numtosend2);
      Loop
   EndIf
''''''''' Get rid of garbage char '''''
   row1 = CsrLin          ' Get row position
   column1 = Pos          ' Get column position
   Locate row1,(column1-1)
   Print " "              ' Get rid of garbage char
   Locate row1,(column1-1)
End Sub




TJF
Posts: 3324
Joined: Dec 06, 2009 22:27
Location: N47°, E15°

Postby TJF » Aug 02, 2011 20:32

dasyar wrote:Does anybody have any idea if freeBASIC will be offered in a 64 bit version? Would like to run FBterm on my Win 7 64 bit computer, without getting into the 32 bit emulation mode.

There is no official solution yet.

You may have luck and your program compiles and runs with the C-emitter backend (compiler option -gen gcc, have a look at http://www.freebasic.net/wiki/wikka.php?wakka=CompilerOptgen -- experimental). In this case you can force gcc to generate 64 bit code.
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Postby dasyar » Aug 26, 2011 17:52

I just got my Ubuntu 11.04 32bit box running, and I got FBC .23 to compile without any complaints. So, I compiled FBterm, and there were no complaints from the compiler, amazing. The only problem that I am having is, up to 9600 BAUD the program runs fine, any BAUD higher than that, and the terminal starts to get garbage characters on the screen. Anybody have any ideas as to what might be causing this?
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Postby dasyar » Aug 26, 2011 19:19

I just got through testing the port using gtkTerm, and at 115200 BAUD I do not get any garbage characters. So, I am wondering if it could be a problem with FBC for linux? When I compiled my program using FBC for Widows, it ran without any problems.
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Re: MyTerminal prog

Postby dasyar » Oct 08, 2014 12:08

Well, it has been awhile since I have been here, and surprise surprise, FBC is at 1.0 and there is a 64-bit version plus some GUI capabilities. I am thinking that maybe my FbTerm.bas program could be updated to a GUI program running in 64-bit?

Since I have been here last, I also added some Raspberry Pi boards to my collection, will have to see if FBC works in that environment. I was dabbling with Python and tkinter to create some functional terminal programs that could be ported/used on my Windows 7 desktop and the Raspberry Pi, but I am thinking about FBC as possibly being a better solution, not sure yet. I also have to admit that I did come up with a C# terminal program, but it is not portable enough for my needs.

I also just tried to compile my last version of FbTerm.bas with the new 64-bit compiler, and it came up with quite a few errors, so it looks like I might have to try a scratch build of the program, looking into that now. Any recommendation as to which FBC IDE should be used on a Windows 7 64-bit box?
MrSwiss
Posts: 2021
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: MyTerminal prog

Postby MrSwiss » Oct 08, 2014 13:21

@dasyar,

with respect to your question about IDE on a WIN-Box, I'd recommend to use FBEdit,
because it's WIN (only) and the most complete IMHO (includes even a Ressource ED).

It also doesn't seem to have the CMD-line issues FBIDE is having, converting CMD-line
switches to LOWER-case (all of them, always).
TJF
Posts: 3324
Joined: Dec 06, 2009 22:27
Location: N47°, E15°

Re: MyTerminal prog

Postby TJF » Oct 08, 2014 16:16

I never used FBIde nor FBEdit.

Geany runs on all platforms (including ARM) and is the most complete IDE, when it gets extended with some custom commands to translate between C and FB source code. (I self-compiled version 1.25 since it has the advanced scintilla FB code highlighting.)

The main advantage: It supports highlighting for other languages as well, which is important when you work with RPi.
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Re: MyTerminal prog

Postby dasyar » Oct 08, 2014 18:27

Yes, I have used Geany before, but recent installations on a Debian 64-bit, and kubuntu 64-bit, was showing some problems, like when I requested a compile, all it would do is open an empty terminal window, and that was it. I always liked Geany, but now that it is acting up on different systems, I try to find something else.

I did go to the download area and put more focus on the Linux downloads, did not see anything that could possibly work on a Raspberry Pi, no I do not have the patience or knowledge to work with FBC source and come up with something that would run on an ARM processor. I leave that kind of stuff to the experts, but seems to me that there should be some interest in porting to the ARM processors, there are a lot of ARM based boards showing up.

I just worked with my FBterm.bas program and it seems I may have fixed the errors I was getting on the 64-bit compile, at least it now compiles; now I have to create a hardware setup so I could test out my program. If I indeed fixed the problem(s), the next big step is to get the necessary information together to create a GUI version. Hope this isn't to big of a learning curve, I get easily distracted by other shiny things. :-)
TJF
Posts: 3324
Joined: Dec 06, 2009 22:27
Location: N47°, E15°

Re: MyTerminal prog

Postby TJF » Oct 08, 2014 21:58

dasyar wrote:Yes, I have used Geany before, but recent installations on a Debian 64-bit, and kubuntu 64-bit, was showing some problems, like when I requested a compile, all it would do is open an empty terminal window, and that was it. I always liked Geany, but now that it is acting up on different systems, I try to find something else.

I use Geany on Xubuntu 14.04 64 bit (version 1.25), Xubuntu 12.04 32 bit (customized version 1.23) and Debian 32 bit (orig. version 1.24) on Beaglebone Black (3.8.13-bone37 kernel). None of those systems show the issues you describe. It seems that your build options are broken.
dasyar
Posts: 302
Joined: Dec 04, 2008 15:31

Re: MyTerminal prog

Postby dasyar » Oct 09, 2014 11:17

I decided to go with FbEdit, now I remember that is what I was using before. I just compiled with the 64-bit FBC, and I did not run into any problems with the IDE or the compiler. Since I do not use Linux or DOS that often, FbEdit will suffice, but if all of a sudden an FBC compiler for the Raspberry Pi shows up, then I would definitely switch over to Geany.

After fixing the errors for a 64-bit compile and running the program, the program looks and feels dated running out of a DOS window, but it is functional. I just came across a problem with the terminal IO screen, it does not seem to sending a CR to the other end, which makes it look a little quirky. Not sure what has to be done to solve that.

The other thing that I was thinking, while I am still working with this version, could I implement a function of Putty? That is a log in session to my Raspberry Pi using the LAN, so maybe in place of a com port selection I enter an IP address, could I do it with the FBC compiler?

Return to “Hardware Interfaces / Communication”

Who is online

Users browsing this forum: No registered users and 1 guest