[Gambas-user] serial port

Tony ajw4me at ...466...
Thu Dec 10 04:19:37 CET 2009


   yuhej wrote:

Hello,

I'm very happy with the serial port communication, just I have some more
question.

When I start the application, I don't know what ports will be used and how
many.
So I have an object array where I add new serial ports depending on the
hardware configuration.

>From this object array, I'm able to send and receive data. I just don't know
how to access to the serial port events (read). Can someone help me in this
matter?

Thanks,
Robi


yuhej wrote:
  

Useful info, I'll do like that.
Thanks, Robi

2009/9/19 nando [1]<nando_f at ...951...>



In my Linux serial port experience, serial port devices are named:

/dev/ttyS0..9 and upwards
/dev/ttyUSB0..9 and upwards depending on what is plugged in USB.

I have done a lot of serial port stuff with Gambas.

I know that trying to open then with the serial port control
will fail is non-exising port. This error can be detected.

It can be possible to open a port as a test to see if it exists, but you
may be changing parameters and stealing chars from an existing
connection.
I've had this happen too....really messes things up.

-Fernando


---------- Original Message -----------
From: yuhej [2]<robert1juhasz at ...626...>
To: [3]gambas-user at lists.sourceforge.net
Sent: Fri, 18 Sep 2009 21:08:04 -0700 (PDT)
Subject: [Gambas-user]  serial port



Hello,

I can see that Gambas can handle the serial ports which is a very good


news


for me.
Can someone tell me how can I get the list of the serial ports of my
computer? I wish to make an autodetect function and only allow to


select


from the working serial ports.

Robi
--
View this message in context:


[4]http://www.nabble.com/serial-port-tp25518421p25518421.html


Sent from the gambas-user mailing list archive at Nabble.com.




------------------------------------------------------------------------------


Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart


your


developing skills, take BlackBerry mobile applications to market and


stay


ahead of the curve. Join us from November 9-12, 2009. Register


now!


[5]http://p.sf.net/sfu/devconf
_______________________________________________
Gambas-user mailing list
[6]Gambas-user at lists.sourceforge.net
[7]https://lists.sourceforge.net/lists/listinfo/gambas-user


------- End of Original Message -------



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register
now!
[8]http://p.sf.net/sfu/devconf
_______________________________________________
Gambas-user mailing list
[9]Gambas-user at lists.sourceforge.net
[10]https://lists.sourceforge.net/lists/listinfo/gambas-user



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register
now!
[11]http://p.sf.net/sfu/devconf
_______________________________________________
Gambas-user mailing list
[12]Gambas-user at lists.sourceforge.net
[13]https://lists.sourceforge.net/lists/listinfo/gambas-user






   Hi,
   I'm not sure what your exact requirement is, but if it is persistent naming
   of a hotplug usb to serial adapter then this can be achieved thru udev. I
   have an Aten usb to serial adapter which when plugged may take ttyUSB0 to
   ttyUSB4 depending on what else e.g. wireless modem etc. is plugged in. You
   can create your own udev rule so that when the Aten adapter is plugged a
   symbolic link is created to the appropriate tty. In my case /dev/ttyATEN0 ->
   /dev/ttyUSB0-4.  The  adapter  can  then  be  addressed from Gambas as
   /dev/ttyATEN0.
   [14]http://www.reactivated.net/writing_udev_rules.html
   Hope this helps,
   Tony.

References

   1. mailto:nando_f at ...951...
   2. mailto:robert1juhasz at ...626...
   3. mailto:gambas-user at lists.sourceforge.net
   4. http://www.nabble.com/serial-port-tp25518421p25518421.html
   5. http://p.sf.net/sfu/devconf
   6. mailto:Gambas-user at lists.sourceforge.net
   7. https://lists.sourceforge.net/lists/listinfo/gambas-user
   8. http://p.sf.net/sfu/devconf
   9. mailto:Gambas-user at lists.sourceforge.net
  10. https://lists.sourceforge.net/lists/listinfo/gambas-user
  11. http://p.sf.net/sfu/devconf
  12. mailto:Gambas-user at lists.sourceforge.net
  13. https://lists.sourceforge.net/lists/listinfo/gambas-user
  14. http://www.reactivated.net/writing_udev_rules.html



More information about the User mailing list