[Gambas-user] Gambas Scripting Problem

Arief Bayu Purwanto ariefbayu at ...626...
Tue Sep 16 10:58:08 CEST 2008


-----------------
' Gambas module file

DIM Sport AS NEW SerialPort

Sport.Speed = "115200"
Sport.PortName = "/dev/ttyUSB0"
Sport.Parity = 0
Sport.DataBits = "8"
Sport.StopBits = "1"
' keep DTR on
Sport.FlowControl = 0
Sport.Open()


PRINT Sport.DSR
PRINT Sport.DTR
PRINT Sport.CTS
PRINT Sport.RTS
PRINT Sport.DCD
PRINT Sport.RNG
---------------
that's all.

Nothing more. I just want to test open the SerialPort before move to actual
development.

On 9/16/08, Benoit Minisini <gambas at ...1...> wrote:
>
> On mardi 16 septembre 2008, Arief Bayu Purwanto wrote:
> > Dear All,
> >
> > Currently, I'm trying to connect to a GSM modem on server. This is a
> > headless server, so there's no way for me to access it's GUI. All I have
> is
> > console:(.
> >
> > For this purpose, I'm trying to test serial port example:
> >
> > -----------------' Gambas module file
> >
> > DIM Sport AS NEW SerialPort
> >
> > Sport.Speed = "115200"
> > Sport.PortName = "/dev/ttyUSB0"
> > Sport.Parity = 0
> > Sport.DataBits = "8"
> > Sport.StopBits = "1"
> > ' keep DTR on
> > Sport.FlowControl = 0
> > Sport.Open()
> >
> >
> > PRINT Sport.DSR
> > PRINT Sport.DTR
> > PRINT Sport.CTS
> > PRINT Sport.RTS
> > PRINT Sport.DCD
> > PRINT Sport.RNG
> > ------------
> > But, when I run it on console, all i've got is this error:
> >
> > silent at ...1976...:~/latihan$ gbs2 gbserial.gbs
> > CComponent.CalcSortKey.175: #13: Null object
> > 0: CComponent.CalcSortKey.175
> > 1: CComponent.SortComponents.205
> > 2: CComponent._init.124
> > 3: MMain.MakeVirtualProject.151
> > 4: MMain.Main.61
> >
> > Someone has a solution or some heads up to some resource?
> > Any help appreciated,
> > thank you.
>
>
> Please post your script file.
>
> Regards,
>
> --
> Benoit Minisini
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Arief Bayu Purwanto
About : http://about.freelancer.web.id/
Blog : http://bayu.freelancer.web.id/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gbserial.gbs
Type: application/octet-stream
Size: 312 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080916/c961ab8a/attachment.obj>


More information about the User mailing list