a hobby class on microcontrollers

e

on

be

a

rks

PS: I got a new COM port when I change the device. I am up to COM7 and COM8 now. Is there any way to reset it to COM4? I have nothing on COM4 and COM6. I am running WinXP pro.

Reply to
linnix
Loading thread data ...

Windows (at least XP) does seem to like to generate multiple ports for the same device. Over time, it has created three Bluetooth ports for the single Bluetooth hardware device on this laptop. Why?

Cleaning up should be possible by going into the Device Manager applet and doing a View | Show Hidden Devices. That shows the installed-but- not-connected devices and allows one to uninstall the duplicates. You can then go into Properties and force an assignment to a COM port of your selection for the remaining ones.

As always, mucking about like this can cause Bad Things to Happen ...

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

I tried removing them in regedit. They stopped working. I tried removing them in device manager. WinXP just re-install with another port. Finally, I did a super-restart (reinstall WinXP).

No kidding, wasted whole night for this.

Anyway, I got it to restart at COM3, COM4, COM5 and COM6 on a USB hub. WinXP even remember the order it was plugged in. Just hope that I won't have to change the hub.

I posted the new version of WDIP.EXE (Auto detect COM3 to COM11) and UDIP1A.HEX UDIP1B.HEX UDIP1C.HEX at:

formatting link

Reply to
linnix

I would ignore it.

When I open WDIP.EXE in a text editor, it seems like your are using "COM3", "COM4",... "COM12" for opening the COM port. Did you test it for "COM9"? This will fail on Windows. I'm using this C-code to open a COM-port:

char buf[100]; sprintf(buf, "\\\\.\\COM%i", m_comPort); m_portHandle = CreateFile(buf, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (m_portHandle == INVALID_HANDLE_VALUE) ...

Detecting which COM ports are available on a Windows system is difficult. The easiest solution would be trying CreateFile for some port range and testing the result, but this can hang the computer, if a driver is faulty (which is sometime possible for drivers of some cheap USB adapters), or for some Bluetooth drivers. But you can try one of the 8 other ways to test it:

formatting link

In my application the user has to execute an auto detect function of the program manually when installing the hardware and then the port number is saved for subsequent program starts, which is the least trouble, and the COM port can be choosen without auto detect, if it hangs.

If you don't have to use COM (e.g. if you need Bluetooth on Windows XP before service pack 2, you need the COM port interface, if you don't want to use a special Bluetooth stack from a company), use HID for your USB device, if you don't have high transfer speed requirements. I've written a Windows application with a HID device for Windows XP and it still works on Windows 7 without changes. If you use libusb or other drivers, you'll have to update your software for each new Windows version.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

",

Why? Is COM9 special on window?

RITE, 0, NULL,

Yes, I am using CreateFile to open them.

Reply to
linnix

Sorry, COM9 should work, but the trouble starts with COM10, see "Communications Resources" at the manual page:

formatting link

That's the reason for my special code to open the COM port. You should test it with your program. Maybe you can change the port number of your device in the device manager.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

This kind of problem is not unique to windows. I'm connecting to EUBR32C111-carrier-sub, a 32 bit renesas board from Glyn. Upon detection Ubuntu generates a USBtty whatever device, but the name depends on the circumstances. If I disconnect and reconnect, I get a different name. (This is the only way to power cycle, and power cycle seems to be the only way to reset communication.) So old situation: connect to /dev/XXX . Do a symbolic link to /dev/modem and configure kermit to use that. New situation: The program has to scan all ports that could possibly connect to the board. Then from the communication with some possibly unknown devices, infer on which port the renesas board sits. For kermit communication: always look in /dev and do a manual configuration.

I think this is a design error. If your system features serial device on USB ports, they should have a fixed name for each USB port. Then if there is no communication possible on the port the driver should respond so during open, or just make the device unreadable/unwritable.

Maybe Bill Gates tried to solve this matter, but goofed on implementation.

One thing that gives hope, is that although the board comes with USB drivers, they are not needed on Ubuntu. It is an Ubuntu driver, so it migh get fixed (even by myself.)

Yeah. You ask Windows to do things neither they or yourself understand via a complicated menu.

But you spark an idea. On linux I just may proceed as follows:

  1. remove all serial USB devices while still powered off, wait long enough
  2. connect/power on, now I'll get always the same device name
  3. alias to /dev/modem kermit, whatever

If there are more serial USB devices this will not help. Thank god that not everything is called COM on Linux.

--

--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
 Click to see the full signature
Reply to
Albert van der Horst

Out of curiosity, does the device you use feature a unique serial number? At least on Windows, a lot of annoying behaviour goes away once the OS is able to reliably identify devices.

On Linux you can also use udev rules to control the created device names.

-a

Reply to
Anders.Montonen

Thanks for pointing this out. I fixed the initial scanning, but still need to remove the invalid entries and handle combo change events.

Reply to
linnix

Yes, we do. We use it to ID multiple boards and versions on the USB bus.

Unfortunately, the Linux USB generic serial driver is not working right (Kernel 2.4). Will try again later.

Reply to
linnix

Jon,

On an 'as well as' basis (if you are a sucker for punishment?), I've just spotted the price of this ARM device, sounds not-like-anything- else :

NUC501ADN Shows 1924 in stock, at NuHorizons at $1.35ea

For that, you get USB, a 16 Bit Audio DAC, (mono) a Mic in, and std other peripherals.

It uses 32K RAM to keep the price down, and boots from USB, or SPI, and can run from SPI (slowly).

formatting link

only thing missing is the ability to power from USB ?

Their Nuc1xx tools are cheap, not sure on the flow for the Toy_uC, ( looks like N55UL501 is a new sibling?)

-jg

Reply to
-jg

Too bad the internal ROM is ... ROM.

What's the future of this thing? Any ideas? I don't know anything about the company.

But thanks, I'll look more into it just the same. The ability to boot from SPI makes me wonder about what kind of memories out there I might use for it. I'll have to look at that, as well. No experience with SPI memory devices.

Jon

Reply to
Jon Kirwan

On Jul 22, 7:11=A0pm, Jon Kirwan

That's under the Price column ;)

I'm not sure if the NUC501ADN precedes the N55UL501, or is some rename, as I cannot see both on the same document. The application would be high volumes.

Nuvoton is another marketdroid scramble of what used to be Winbond. They spun off the uC divn, and called it Nuvoton. Been making 8051's since adam was a boy...

Truckloads of SPI, and I think they mention 2-bit mode is supported too.

I think they chose this split, as a common use will be large Audio sound sets, pulled out of Megabyte SPI's. (and Winbond are a large SPI memory vendor..)

At that price, and with good sw, this could shake FTDI a little.

We've had a few apps go past, where just a little more IQ than the fixed FTDI would be good, and 32K RAM would be plenty.

-jg

Reply to
malcolm

This is the perfect FORTH machine.

The ROM is only to boot code out of the SPI flash.

The crypto engine is used to protect the code base.

32K (bytes) of code and data space is not much, but you can always overlay with code from the SPI flash.

And you only need to stock one part cpu and one part flash.

It would be interesting to see what products this gets put into.

don

Reply to
hamilton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.