[Gambas-user] Problem with Ubuntu 12.04 + SerialPort Example
Mike Crean
mike.crean at ...2897...
Tue Dec 11 11:46:43 CET 2012
Hi abbat81,
Usually this indicates you are trying
to open the wrong device . Perhaps this code snip will help.
If you are connecting to an Ardunio
with USB look in /dev/ to see if ttyACM0 is there. Remember the file
names are case sensitive.
Regards
Mike
Label2.Text = "
ttyACM0,57600,N,8,1"
Sport = New SerialPort As "Sport"
Sport.PortName = "/dev/ttyACM0"
Sport.Speed = "57600"
Sport.Parity = 0
Sport.DataBits = "8"
Sport.StopBits = "1"
Sport.FlowControl = 0
Try
Sport.Open()
Goto PortOpen
SkipAcm:
If Error Then
Label2.Text = "
ttyUSB0,57600,N,8,1"
Sport = New SerialPort As "Sport"
Sport.PortName = "/dev/ttyUSB0"
Sport.Speed = "57600"
Sport.Parity = 0
Sport.DataBits = "8"
Sport.StopBits = "1"
Sport.FlowControl = 0
End If
Try
Sport.Open()
Goto PortOpen
If Error Then
Label2.Text = "
ttyS0,57600,N,8,1"
Try Sport.PortName = "/dev/ttyS0"
Sport.Speed = "57600"
Sport.Parity = 0
Sport.DataBits = "8"
Sport.StopBits = "1"
Sport.FlowControl = 0
Sport.Open()
If Error Then
Message(" Onboard Uart Comm
1 not found -- PROGRAM TERMINATING")
Quit
Endif
Endif
PortOpen:
________________________________
From: abbat81 <abbat.81 at ...787...>
To: gambas-user at lists.sourceforge.net
Sent: Monday, 10 December 2012 7:09 PM
Subject: [Gambas-user] Problem with Ubuntu 12.04 + SerialPort Example
Hi,
I have a problems with Ubuntu 12.04 but the same example is working good in
Ubuntu 11.04.
I get next:
"Cannot open serial port (5) in FSerialPort:39."
Can you help me?
--
View this message in context: http://gambas.8142.n7.nabble.com/Problem-with-Ubuntu-12-04-SerialPort-Example-tp40318.html
Sent from the gambas-user mailing list archive at Nabble.com.
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list