Pages: [1]   Go Down
Author Topic: How to config serproxy at "com10"  (Read 4818 times)
0 Members and 1 Guest are viewing this topic.
China
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
I love Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!
my Arduino work at "com2" in one of my PC , and I can get it work with flash well, but these days , I use another PC that Arduino work at com10

then I make the .cfg like that, but it dosen't work , how to get it work , when at high com num , thank you!

# Comm ports used
comm_ports=1,2,3,10

# Default settings
comm_baud=9600
comm_databits=8
comm_stopbits=1
comm_parity=none

# Idle time out in seconds
timeout=300

# Port 1 settings (ttyS0)
net_port1=5331

# Port 2 settings (ttyS1)
net_port2=5332

# Port 3 settings (ttyS2)
net_port3=5333

# Port 4 settings (ttyS3)
net_port4=5340

Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll need to change:

net_port4=5340

to:

net_port10=5340

But I've never tried it with two-digit port numbers.  Let me know if it works.
Logged

China
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
I love Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you mellis !
But it can't work :"Failed to open comm port - connection refused"

Is it a bug ?  

and I download the source of serproxy , but I can't open it with VC++ 6.0 , it lose "*.mak" thank you!
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Make sure that the baud rate passed to beginSerial() in your Arduino code matches the baud rate in the serproxy.cfg file.  Also be sure that nothing else is trying to use COM10 at the same time as the serproxy.

Does the serial monitor in the Arduino IDE show you
data coming from the board on COM10?  (Again, make sure that the baud rate in the "Tools | Serial Monitor Baud Rate" matches the argument to beginSerial().)

Can you upload sketches to the board using COM10?
Logged

China
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
I love Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you mellis!
I just chang the com from 10 to 8 , it can work ,
so I think it maybe a bug.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Just had this same problem, but had no option to work on COM port less than 10 on Windows.. And it seems that is the problem:

Quote
The designers of Microsoft Windows could not conceive of machines with more than 9 serial ports. As a consequence, you cannot use conventional port names beyond COM9:
To deal with this oversight, newer versions of windows require the following notation for port numbers beyond 9:
 \\.\COM10
 \\.\COM11
 \\.\COM12
http://www.csparks.com/MotoBackup/index.xhtml

I managed to find the sources of serproxy-0.1.3 here:

https://developer.berlios.de/project/showfiles.php?group_id=3590

and if line 211 in sio.c is changed from

Code:
sprintf(filename, "COM%hd", sio->info.port);

to

Code:
sprintf(filename, "\\\\.\\COM%hd", sio->info.port);

then COM10 works too...

Same thing is done on this forum (in a Spanish language post):
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1159788663/7#7 smiley-wink

 [smiley=vrolijk_1.gif]
Logged

Quebec
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Was anyone ever able to patch and recompile the code as described in this thread ? I was able to retrieve the source code and make the change but got a bunch of errors upon compilation in Visual C++ 2008.

If anybody could tell me which compiler I should be using to compile this code or any pointers at all that would be great. I am in an environment (college classroom)  where I cannot reinstall the Arduino FTDI drivers. Fixing this problem is my only solution right now.

I realize this post started back in 2006 but it is the only information I was able to find regarding this problem. Any help would be greatly appreciated.

Cheers!
Logged

Quebec
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

By the way there is a Microsoft knowledge base article that describes the weird syntax for ports above 9 :

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q115831
Logged

Quebec
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There may be another way to solve this problem. FTDI has a procedure to assign virtual COM ports by location id instead of by the device's serial number (which is the default).

You can find the procedure at this address: http://www.ftdichip.com/Documents/AppNotes/AN232B-07_LocIDs.pdf

I'll try it out and let you know if it works out.
Logged

Quebec
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I finally was able to patch and compile the source code. You can find v0.1.4 executable and source code on my blog at : http://www.cote.cc/blog/serialproxy-v014-can-use-com-ports-above-9.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the solution!!!

Go to you Hardware Manager (Windows Control Panel), and chage the COM10 to anoher below COM10.
I changed my COM11 to COM3 or COM1 and it starts working.

To change the COM number, folow this:
http://www.reslers.de/IBUS/port.html
Logged

Hamburg, Germany
Offline Offline
Full Member
***
Karma: 3
Posts: 192
Hello world!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No need to recompile. You can just set the device in serproxy configuration:

comm_ports=9,40
...
serial_device40=\\.\COM40
...
net_port40=5340
Logged


Pages: [1]   Go Up
Jump to: