Serial port assignments to hardware interfaces

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Serial port assignments to hardware interfaces

Post by Steve Horn »

I've groused about this before, and I'm going to again. I had a failure of an Arduino device unrelated to HB. Anyway, replacing it with a good Arduino fixed the I/O motor control function; I can send commands to it via the Arduino IDE, or a port monitor (i.e. outside of HB). However, when assigning the known working COM port to its HB hardware interface, the list of COM ports does not match the list of ports in Device Manager. The HB list appears to list only those ports already assigned to other hardware devices. (Whats the point of that? They're already assigned.) The known working port is not on the list. If I am lucky enough to find an unused port on the HB drop down list, once I reassign the Arduino to that port in Device Manager, that port selection goes away in the HB list. Further, currently the HB lists includes COM 0, which is not recognized by Windows. I've shuffled port assignments around several times, trying to claim an unused port number in Device Manager, assign it to the Arduino in DM, then go to HB and the port isn't listed. Its my opinion that the HB list should agree with the list (in DM/Port Settings/Advanced) that you see when you reassign a port. Anyone with a significant number of COM ports assigned I suspect will run into this. Interesting to note that the port assigned to the failed Arduino was not able to be reassigned to the new Arduino, for reasons that escape me. COM port assignment drives me crazy. I go through this every time a serial device is added. :x
Steve
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Serial port assignments to hardware interfaces

Post by ScottBot »

I've been seeing this more lately also. I'll revisit the port list selection for the next version.
Scott
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: Serial port assignments to hardware interfaces

Post by Steve Horn »

Thanks. To make it simple, rather than try to determine from the OS which ports/COMs have been assigned to physical RS232 or USB ports, just allow the user to type in a COM #, or select from 1-256... and maybe filter that list to omit those already assigned in HB.
JMHO
Steve
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: Serial port assignments to hardware interfaces

Post by Steve Horn »

(Not even sure how to describe this...) fiddling with the Arduino port assignment, i decided to add a new Arduino hardware interface. Lo and behold, the COM drop down gave me a completely different list of ports to choose from. And one was actually doable and already had the Arduino assigned to it in Win DM. So after fiddling around in HB to get the device and hardware config to agree, and restarting HB at least once, I was able to reassign the original arduino hardware config to the new com port, delete the new arduino hardware config, and now everything seems to be talking. Assigning COM ports in HB is a lottery.
Steve
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Serial port assignments to hardware interfaces

Post by ScottBot »

Well... at least you won the lottery :wink:

I wonder if it's because you are now running as admin.
Scott
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: Serial port assignments to hardware interfaces

Post by Steve Horn »

I wondered about that. But, as is my normal m.o., i just start trying things and, ideally, something changes and a problem is corrected. So, the trail gets cold quickly.
Regarding the COM port dropdown listing, prior to last evening's efforts, the dropdown listed 8-9 ports, most (except COM 0) of which were already assigned to serial devices controlled by HB. When I added the "new" Arduino hardware device config, the port list was 3 deep, all of whech were not being used. And that was after I had looked at the genserialdev folder and file security, restarted HB running as Admin. Does that matter? And should I be starting HB as Admin from now on? What does that even mean, if I'm running Windows as Admin anyway?
Steve
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Serial port assignments to hardware interfaces

Post by ScottBot »

Running the app as admin will give it access to things (files, directories, etc.) that it may not have access to. Generally, you shouldn't need to do this, since the setup program will reduce the permissions for the everything needed. However the com port detection logic tries a couple of different ways to interrogate the system for the list of ports. It's possible that some of those calls could be getting restricted. The provider of that com port detection logic has a much newer update, so I'll update in the next release.
Scott
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: Serial port assignments to hardware interfaces

Post by Steve Horn »

Related, though distantly- i noticed when I run HB as admin the company name and app description does not appear in their columns in Process Explorer. ( I usually have to kill the HB process in PE after closing it, as I get a meesage "another instance..." when I try to restart it. Been that way forever and I've had no success in determining the cause. I just live with it.)
FWIW
Steve
Post Reply