{"id":5696,"date":"2014-04-05T05:32:45","date_gmt":"2014-04-05T05:32:45","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/05\/problem-about-serial-collection-of-common-programming-errors\/"},"modified":"2014-04-05T05:32:45","modified_gmt":"2014-04-05T05:32:45","slug":"problem-about-serial-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/05\/problem-about-serial-collection-of-common-programming-errors\/","title":{"rendered":"problem about serial-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a0ffc2a4f1c1e499e1a3ca24e4c1166a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMikeyB<br \/>\nwindows-server serial<br \/>\nHow do I enable a serial console on Windows (2008 and\/or 2012) such that I can log into it like the Good Old Days of Real Servers and issue provisioning commands, ideally via PowerShell?$ cu -l \/dev\/ttyS0 Connected.Welcome to ad1.adlab.brazzers.comMicrosoft Windows [Version 6.1.7601] Copyright (C) 2009 Microsoft Corporation. All rights reserved.Login: Administrator Password: PS C:\\Users\\Administrator&gt; New-NetIPAddress -InterfaceAlias eth0 -IPv4Address 192.168.101.11 -PrefixLength 24 -DefaultG<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/vg3Si.png?s=32&amp;g=1\" \/><br \/>\nHennes<br \/>\nbios windows-server-2003 serial cmd.exe<br \/>\nI am trying to find the serial number of a windows server 2003 R2.I used a lot of tools but i couldn&#8217;t find the serial number.Note that i want the serial number and not the product key.I also used the following command on cmd:wmic bios get serialnumberbut the result is serial number and then empty lines, which is unexpected from my experience. How can i find the serial number? What is wrong?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e092c11abc762569e43e3f98d1cb2107?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkfuglsang<br \/>\narduino serial rf<br \/>\nI have a very simple setup with an Arduino Uno R3 connected to my Windows 7 x64 with Arduino 1.0.1.I have a RF receiver connected to the Arduino on the DI10 port using the SoftwareSerial library. I am using a AM-RRQ3-433 module. See rfsolutions.co.uk\/acatalog\/AM_Super-heterodyne_Receiver.htmlWhen I receive a byte from the RF receiver, I am simply writing it to the Serial (so that I can see it on my PC in the serial monitor). Doing so seems to conflict between SoftwareSerial and Serial, since the<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/29b0a81131a712b13b4681ec7274ca8f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMarve<br \/>\npostgresql primary-key serial<br \/>\nI run a small site and use PostgreSQL 8.2.17 (only version available at my host) to store data. In the last few months there were 3 crashes of the database system on my server and every time it happened 31 ID&#8217;s from a serial field (primary key) in one of the tables were missing. There are now 93 ID&#8217;s missing.Table:CREATE TABLE &#8220;REGISTRY&#8221; (&#8220;ID&#8221; serial NOT NULL,&#8221;strUID&#8221; character varying(11),&#8221;strXml&#8221; text,&#8221;intStatus&#8221; integer,&#8221;strUIDOrg&#8221; character varying(11), )It is very important for me that all<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/25b02331ea03bb3408ed04bfa4a885af?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTim<br \/>\nlinux serial asterisk<br \/>\nI&#8217;m working on a patch for chan_dongle for Huawei e177 modems which has one way audio problem.For debugging purpose I decided to write an external test case to read and write audio from and to the modem but I was unable the receive the audio stream in any of the serial files after the modem was mounted. I use minicom to issue the commands, I pick up an incoming call using the relevant AT command but no bytes stream arrives to any file. The only output I receive is from the AT command in \/dev\/tty<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e6e71330f0a50d37ad936ff09b80623e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nVlad Lazarenko<br \/>\nc++ sql postgresql key serial<br \/>\nWhat is the correct syntax to create a integer primary key auto incremental field in postgresql using C++?I started with db-&gt;ExecuteSQL(&#8220;CREATE TABLE mytable (\\&#8221;mytableid\\&#8221; INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,this compiles but the process crashes and no field is created.db-&gt;ExecuteSQL(&#8220;CREATE TABLE mytable (\\&#8221;mytableid\\&#8221; serial PRIMARY KEY NOT NULL,This works and does create the field correctly.Do I need the NOT NULL or is this not necessary with serial? Is this the best syntax and<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/672f146dca4d06407ad3fb7fea6c1241?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\naliz<br \/>\nlinux terminal screen serial embedded<br \/>\nI have built a custom embedded system using debian 6.0.using \/etc\/inittab i have made several (8) processes running on different \/dev\/ttyX terminals, which i can switch between using Alt+FX key combination. the thing is using this setup i need to attach a keyboard\/monitor to device and reboot it, to be able to operate on it, which is so undesirable. i know linux supports terminals through serial port and i have a couple of them on the device, but i need to have all these processes output in a si<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2d02132b9f29fef6ba8116f898386587?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTiago Queiroz<br \/>\narduino serial<br \/>\nI have a PanStamp (arduino compatible) and everything was working fine until I change the amount of data I&#8217;m sending through serial.send_altitude is called every second using timer interruption (TimerOne library).This is the original function that sends data (and does not hang):void send_altitude() { cli();float_byte altitude; byte buffer[6];\/\/ Do one trash read to avoid fluctuations analogRead(ALT_SENSOR); delay(5); altitude.asFloat = getAltitude(ALT_SENSOR);buffer[0] = 0x05; \/* Size *\/ buffer[<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1d23ac8bea21ef15ac1ec943bc06289f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMarcel<br \/>\narduino serial linux monitor eclipse<br \/>\nI like to program my Arduino using Eclipse. However, I still need the Arduino IDE to use the Serial port monitor.This is very inconvenient and breaks my work flowI tried to use RXTX but this would cause Eclipse to crash. I also tried to use a workaround using a SSH-Server but I didn&#8217;t succeed.Has anyone managed to monitor an Arduinos output from within Eclipse on a Linux x64 machine (I use Debian Testing), who could give some detailed instructions?Thank you in advance!!!<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/22c2a81ffc7aeed2599f9aaa8d95a69d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTyilo<br \/>\narduino serial<br \/>\nWhen executing the following code on my Arduino Micro, only the first line is printed:void crash(void) {abort(); }void setup(void) {Serial.begin(9600);while(!Serial.available()) {Serial.println(&#8220;Please input something to begin&#8221;);delay(500);}Serial.println(&#8220;First&#8221;); \/\/ Gets printeddelay(500); \/\/ Make sure Arduino is done writing to the serial connectionSerial.println(&#8220;Second&#8221;); \/\/ Doesn&#8217;t get printedcrash(); \/\/ Makes the Arduino device crash }void loop(void) {}I would like to something like this<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0f6045d98b2893c9687e586c0fc5d909?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser899119<br \/>\njava javascript serial<br \/>\nI have lost hours and hours trying to fix this, but without success, so maybe someone can help me :)I am using http:\/\/www.walking-productions.com\/jsserial\/new\/JSSerial.html for reading data from serial RF-ID reader to automatically fill my text field. I managed to make everything work OK if I make a button and call openport(); and startTimer();.However if I call openport(); from onload or in any part of my html without a user interaction, I got Uncaught Error: Error calling method on NPObject in<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/932d3fbb93a7cc8bc8ee1bd74de8929a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSean<br \/>\nmatlab gui timer serial joystick<br \/>\nI am trying to create a gui in matlab that periodically checks the status of my joystick input. The idea is to take this input and control a servo with it. So far I can get everything to work separately but never together. Right now, the micro controller is just set up to look at the serial line for and adjust the servo (between 0 and 180) based on this. This works just fine. Here is what I have so far,function Fooh.fig = figure(&#8216;position&#8217;, [1100 30 210 60]); h.serial = serial(&#8216;COM3&#8217;); fopen(h.s<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6f22c0743402181706136d7e9bed48ed?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nreve_etrange<br \/>\nserial db9<br \/>\nWhat does opening the standard PC serial port do, in electrical terms (i.e. what voltages on which pins)?For example, the ancient VB6 program which controls an apparatus I am tasked with maintaining toggles .PortOpen to control some TTL. The connection only used 2 pins (bad solders fell apart), so which pins do I solder to?The only labels \/ documentation refer to pins 7 and 9, saying 0V and 5V parenthetically, but does .PortOpen really just put 5V between RI and RTS?.As a post script, this isn&#8217;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6941f1a5205f666ee73b0a0986569a09?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nToby Jaffey<br \/>\nserial uart<br \/>\nI think it is possible due to how I can run vi straight from my serial port looking via TeraTerm. There, I can edit some text, go to the next line, then come back and edit the first line! How do they do this?What character over UART could I send through to go &#8220;up a line&#8221;?EDIT: Apparently line feed works. &#8220;\\f&#8221; to clear the screen. However, this only works for Hyperterminal on my machine and not Teraterm. Anyone know why?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5a89e44fd4d9a4ef1c9361af575587a8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nblalor<br \/>\nmicrocontroller serial ttl<br \/>\nI&#8217;ve been trying to find a good description of the TTL serial &#8220;standard&#8221; without much luck. I understand that serial transmit (TX) and receive (RX) lines idle high (at VCC) and that they drop to ground when a bit is transmitted. As such, they&#8217;re inverted from the norm, where a &#8220;1&#8221; is high and &#8220;0&#8221; is low. What I don&#8217;t understand is who&#8217;s responsible for holding the line high and how a zero is transmitted. Does the sender drive the line to high and low? Or does the receiver hold the line high<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e19d48e9ce02e93f267625a7dc2f1981?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\netuardu<br \/>\narduino serial<br \/>\nI&#8217;m trying to send ASCII characters from Arduino UNO to a computer serial port. I&#8217;m using a cable with a male COM connector, attached to the computer&#8217;s serial port, and three wires (TX, RX and Ground) on the Arduino side. I used pins 12, 13 and Gnd as shown in the picture:And I am running this piece of code to send a string every second on the serial port:#include &lt;SoftwareSerial.h&gt;SoftwareSerial mySerial(13, 12); \/\/ RX, TXvoid setup() {mySerial.begin(9600); }void loop() {mySerial.printl<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/05f21edaba50f07643a05c8954874ad8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRockyboy_ruby<br \/>\nnode.js serial<br \/>\nUsing coffeescript to code One solution | see this postI have two loops. I want to take each value from array &#8216;a&#8217; and then loop through all the values of &#8216;b&#8217; process them and move to next value in array &#8216;a&#8217;output expected:1 a b c 2 a b c 3 a b cError I see: [ 1, 2, 3 ][ &#8216;a&#8217;, &#8216;b&#8217;, &#8216;c&#8217; ]123TypeError: Cannot read property &#8216;length&#8217; of undefinedat Object.forEachSeries(~\/src\/node_modules\/async\/lib\/async.js:103:17)Async = require(&#8216;async&#8217;)@a = [1,2,3]@b = [&#8216;a&#8217;,&#8217;b&#8217;,&#8217;c&#8217;]console.dir @aconsole.dir @bAsync.f<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d32a10a2f047dec1e5582e74cba6b3ec?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAndrew Marshall<br \/>\nc pointers serial<br \/>\nI am working with doing some serial communications in C in Linux. I am doing this using file descriptors. For some reason after char* s = &#8220;Hello world&#8221;, I can write s to the serial port using the write method, no problem. I am using a serial monitor program to check the other end. However, I cannot send any other sort of data. I get a &#8220;Bad Address&#8221; error from the write function.However, I noticed that if I did something very strange: int* x = &#8220;5&#8221;; That I could then send this x. My question is, w<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c0fb94706f182bbaae804d99ccfebbe6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKen<br \/>\nusb drivers crash modem serial<br \/>\ni&#8217;m working on an sms related program using a ftdichip modem in gentoo-2.6.30 with ftdi_sio driver v1.4.3. But i&#8217;m running into a weird situation now: when OS starts up, my program will try to open \/dev\/ttyUSB0 infinitely without sleep until it succeeds(due to not considered properly when coding), and then i plugin my USB serial modem, a bug message will show up immediately with dmesg, and if i unplug modem, the system will have no response. the BUG message is :[ 43.769794] BUG: unable to hand<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6a350b21fd58489ac951a72324548184?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nNoBugs<br \/>\nubuntu usb serial rxtx xbee<br \/>\nI&#8217;m connecting a device with librxtx-java to Ubuntu. The code previously worked in 10.04, but in 12.04 it can&#8217;t discover the usb-serial connected to the computer.java.util.Enumeration&lt;CommPortIdentifier&gt; portEnum = CommPortIdentifier.getPortIdentifiers();while ( portEnum.hasMoreElements() ) {CommPortIdentifier portIdentifier = portEnum.nextElement();System.out.println(portIdentifier.getName() + &#8221; &#8211; &#8221; + getPortTypeName(portIdentifier.getPortType()) );}This section of the code never goes<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6a35d74f4e5c15cd50cb45d3e517e4ca?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKevin<br \/>\njava serial comm<br \/>\nI have a problem with comm ports in JAVA. I&#8217;m using Java version, 1.5 because that version still have access to windows COMM ports (serials).The problem is that the command throws the exception:javax.comm.PortInUseException: Port currently owned by Unknown Windows ApplicationThe thing is that the application opens the comm port for the first time, then I close the comm when the user exits some window. But the user may return to that window, and therefore I try to open again the same port:I close<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c85cffa22f096c7ab0405592200a7324?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSpechal<br \/>\npostgresql search integer serial<br \/>\nI have an integer column and I need to search for rows in which the said column starts with 19In MySQL I would use SELECT &#8230; WHERE id LIKE &#8216;19%&#8217;ERROR: operator does not exist: integer ~~ unknown LINE 1: select * from &#8220;table&#8221; where &#8220;id&#8221; like &#8216;19%&#8217;<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MikeyB windows-server serial How do I enable a serial console on Windows (2008 and\/or 2012) such that I can log into it like the Good Old Days of Real Servers and issue provisioning commands, ideally via PowerShell?$ cu -l \/dev\/ttyS0 Connected.Welcome to ad1.adlab.brazzers.comMicrosoft Windows [Version 6.1.7601] Copyright (C) 2009 Microsoft Corporation. All rights reserved.Login: Administrator [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5696","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5696"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5696\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}