usb driver problem

Thomas McGrath III mcgrath3 at mac.com
Sun Jan 23 00:37:20 EST 2011


The serialControlString seems to be the only way to set things for the serial port connection. Which of these might effect Buffering or cause the port to hang.

The possible settings are as follows:
* BAUD=number: the port's baud rate
* PARITY=N, O, or E: no parity, odd parity, or even parity
* DATA=numberOfDataBits
* STOP=numberOfStopBits
* to=on or off: use timeouts
* xon=on or off: software handshaking
* odsr=on or off: (output) data set ready
* octs=on or off: (output) clear to send
* dtr=on or off: data terminal ready
* rts=on or off: ready to sent
* isdr=on or off: (input) data set ready


Anyone more familiar with these setting? Would timeouts be a type of wait command? I am experiencing the hang until I disconnect, maybe that is a timeout issue or maybe timeout should be set. What is the difference between hardware handshaking and software handshaking???? Never heard of that before.. 

Data terminal ready? Is this or the next two a way to prepare or setup the port for data to transfer? As in I am about to send data and I am done sending data?

It would be helpful if there were more explanations in the docs on these. Any knowledgeable people feel free to chime in here as I am getting a heck of an education here.

And what about these:
read from process "serial.exe" for 1 int1
read from process "trap" for 4 int2
read from process "AppleScripts/Get Info" for 1 int4
read from file myFile for 3 uInt1
read from file "image.gif" for 3 real4
read from process currentInput for 1 real8
read from file "/etc/datoids" for 1 uInt2
read from file it for 17 uInt4



-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net

On Jan 23, 2011, at 12:19 AM, Thomas McGrath III wrote:

> Found some more information on this from the Arduino Forums. It seems to me that the disconnect connect in HT is similar to what I have been doing by hand. And that HT is doing some kind of buffering due to incorrect Flow Control Settings. But how can I test this in LC??? 
> 
>> "When my program starts I set up initial parameter by sending their values to Arduino in dialog mode, then I receive and log incoming data. I test my code with Serial Monitor in Arduino 0007 Alpha IDE and everything is OK - I send and receive information to/from Arduino. When I try to do this with Windows Hyper Terminal I can’t send information to Arduino. The information is sending to Arduino only when I disconnect and connect again. With data that I receive I don’t have problems. "
> 
> 
>> "my impression is that there seems to be a hidden control character that that the IDE sends to put the Arduino into "Serial Monitor" mode."
> 
> 
>> "For example to adjust my software system clock on Arduino Board in IDE I send something like this string: 
>> 
>> “h3im5dg” and <Enter> "
> 
> 
>> "In Hyper Terminal this don’t work, but I make it to work. I connect to COM3, write “h3im5dg”, click “Disconnect”, click “Connect” and characters are sent, the clock is set and I receive data from Arduino. If I don’t Disconnect-and-Connect I can’t send data.
>> It works, but this is very inconvenient way……….."
> 
> 
>> "HyperTerminal might be doing some sort of strange buffering, I'm not sure.  There's nothing magic about the Arduino serial monitor (it doesn't send any special codes to the board or anything). "
> 
> 
>> "I was experiencing a problem like this, i think i fixed it by changing the flow control settings." 
> 
>> "FOund the problem... In HyperTerminal you have to set flow control to off to stop HT from buffering the input... Works like a charm now.."
> 
> 
> 
> 
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> 3mcgrath at comcast.net
> 
> On Jan 22, 2011, at 6:52 PM, -=>JB wrote:
> 
>> Thanks for the reply and info.  This is a very interesting thread so
>> please keep us informed with anything you find that will help.
>> 
>> -=>JB<=-
>> 
>> 
>> On Jan 22, 2011, at 8:04 AM, Thomas McGrath III wrote:
>> 
>>> JB,
>>> 
>>> That's just it - in the Arduino IDE you have Serial Monitor and it actually has an option for "No line ending", "Newline", "Carriage return", "Both NL & CR" and then most of the time it looks like 9600 baud is used.You can select from 300 to 115200 baud. You can also check a box for autoscroll. But that's it. There is no place for any other options and yet it works fine.
>>> 
>>> The Serial Monitor uses the "/dev/tty.usbmodem1a21" instead of the "/dev/cu.usbmodem1a21" that LC likes to use.
>>> 
>>> Also there are no options for Hardware Handshaking or any other options like we would set in the serialControlString in LC.
>>> In my research I have seen people mentioning the 8 - 1 - none but all of the serial code that I've seen doesn't even set anything more than Serial.begin and Serial.println -- not even end. (--  Serial.begin(9600) and Serial.println(val) - -) I hooked up a button and connected it to Serial.end() to try to stop sending data but almost every piece of code I have seen does not use the Serial.end() at all.
>>> 
>>> I think there is a problem in both the code I am using to read the incoming serial data (looping and line endings) and maybe there is an issue with the buffering of the serial data coming from the Arduino Uno.
>>> 
>>> So, I can't find a good list of the parameters that I should use for the serial port and for entering in the serialcontrolstring.
>>> 
>>> Still looking though. 
>>> 
>>> Thanks,
>>> 
>>> -- Tom McGrath III
>>> http://lazyriver.on-rev.com
>>> 3mcgrath at comcast.net
>>> 
>>> On Jan 22, 2011, at 8:51 AM, -=>JB wrote:
>>> 
>>>> What are the parameters they list you need for the serial port
>>>> if you want the hardware to connect using a mac?  The stack
>>>> I sent you can set every parameter I saw in Rev when I wrote
>>>> it so I can easily alter the code to set the serialcontrolstring
>>>> using the parameters they provide you instead of giving you
>>>> all of the options it has now.
>>>> 
>>>> -=<JB<=-
>>>> 
>>>> 
>>>> On Jan 21, 2011, at 4:58 PM, Thomas McGrath III wrote:
>>>> 
>>>>> Do you have a more simple stack for LC? I just want to see if it connects...
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> -- Tom McGrath III
>>>>> http://lazyriver.on-rev.com
>>>>> 3mcgrath at comcast.net
>>>>> 
>>>>> On Jan 21, 2011, at 7:36 PM, Claudi Cornaz wrote:
>>>>> 
>>>>>> 
>>>>>> Tom,
>>>>>> 
>>>>>> Which version combination are you using?
>>>>>> 
>>>>>> Best wishes,
>>>>>> Claudi
>>>>>> 
>>>>>> _______________________________________________
>>>>>> use-livecode mailing list
>>>>>> use-livecode at lists.runrev.com
>>>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list