Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:43 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : linux question

     Page 1 of 2    
Author Message
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 05:47am 07 Sep 2013
Copy link to clipboard 
Print this post

I am trying to get UBW32 with mmbasic to connect to linux. Its not a dektop linux system, but is linux arm. A pcDuino board to be specific.

The UBW32 does not show up in USB devices so I am looking for direction on installing a USB-cdc module that will work.

Any help would be appreciated.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 10:22pm 07 Sep 2013
Copy link to clipboard 
Print this post

For anyone who doesn't realise, you don't have to connect to an ARM Linux - any will do.

But to connect a USB device (running mmbasic) you need a USB Host (or OTG that switches to being a Host).

So, does your pcDuino support being a host (or OTG)? Which may mean - are you using a suitable cable (which e.g. an OTG will need)?

---

Another way would be to connect COM (serial) port to COM (serial) port. Probably much easier with uC boards.

JohnEdited by JohnS 2013-09-09
 
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 06:48am 08 Sep 2013
Copy link to clipboard 
Print this post

It has USB ports plus usb OTG. That is not the problem. The developers saw fit to only compile the FTDI drivers so that arduino boards work but there are no modules for microchip devices. So I need to find a compiled module to load or source code to compile myself. Using a serial port in console mode will not work. My project requires USB.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 09:48am 08 Sep 2013
Copy link to clipboard 
Print this post

That doesn't sound right. You really think the driver knows or cares? I doubt it.

What does dmesg show when you connect it?

Have you any suitable udev rules?

JohnEdited by JohnS 2013-09-09
 
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 11:34am 09 Sep 2013
Copy link to clipboard 
Print this post

dmesg does not report anything when plugging it in.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 11:53pm 09 Sep 2013
Copy link to clipboard 
Print this post

Next, try
lsusb -v
before and after plugging it in, looking for what changes
you may need to install lsusb and may need to be root

Unless it's being seen you have no chance of talking to it.

If it's an unknown device that's being seen then you're half way.

JohnEdited by JohnS 2013-09-11
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 12:07am 10 Sep 2013
Copy link to clipboard 
Print this post

tail -f /var/log/messages


Andrew Rich VK4TEC
www.tech-software.net
 
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 01:43am 10 Sep 2013
Copy link to clipboard 
Print this post

John,

It does not show up in lsusb list either.

Andrew,

I did not look there. Next time I am home I will check that.


Everything that is FTDI based shows up fine. Nothing with microchip works.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 06:51am 10 Sep 2013
Copy link to clipboard 
Print this post

tail -f is no better than dmesg

If lsusb doesn't see it you've almost for sure got a hardware problem. Wrong cable or the like.

JohnEdited by JohnS 2013-09-11
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 12:09pm 10 Sep 2013
Copy link to clipboard 
Print this post

Not directly related to Linux but under Windows, I have a lot of trouble with microchip drivers.
Everything else results in Window Messages indicating 'device nodes changed' and 'insert' or 'remove' but microchip devices only ever give a 'device nodes changed' message.

Microchip definitely do things differently.

Jim

VK7JH
MMedit   MMBasic Help
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 12:56pm 10 Sep 2013
Copy link to clipboard 
Print this post

Could be under Windows but under Linux there is no Microchip driver being used as far as I can see.

It's an ARM Linux so Windows x86 isn't much of a guide.

Figure the hardware out is where I'd start.

John
 
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 11:04am 16 Sep 2013
Copy link to clipboard 
Print this post

I went as far as to reconfigure and compile the developers kernel to make sure all USB support was compiled in. Made no difference at all.

The odd thing is that if I put the UBW32 into bootloader mode it sees it. It just does not see it as a cdc_acm.

No idea what to try next.
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 11:20am 16 Sep 2013
Copy link to clipboard 
Print this post

If I was in that position and interested in communinicating with the UBW32, I would use a serial port on the UBW32 instead of being tied down to the direct USB idea.

Messy but it would work

- Andrew -
Andrew Rich VK4TEC
www.tech-software.net
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 10:58pm 16 Sep 2013
Copy link to clipboard 
Print this post

  cwilt said   I went as far as to reconfigure and compile the developers kernel to make sure all USB support was compiled in. Made no difference at all.

The odd thing is that if I put the UBW32 into bootloader mode it sees it. It just does not see it as a cdc_acm.

No idea what to try next.


When in bootloader mode, what do lsusb and lsusb -v show? I don't mean post it all - a short bit will do - but is it all plausible?

If it looks OK, as it seems it must, then if nothing is in lsusb -v when not in bootloader mode then you have a hardware problem I reckon. Whether it's timing or volts or what I don't know. Generally these sorts of USB problems are "fixed" by using a powered hub or the like, but really what is happening is that the hub is covering up some fault (marginally out timing or whatever) I think.

John
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 11:00pm 16 Sep 2013
Copy link to clipboard 
Print this post

  vk4tec said   If I was in that position and interested in communinicating with the UBW32, I would use a serial port on the UBW32 instead of being tied down to the direct USB idea.

Messy but it would work

- Andrew -


Simply not appropriate for this entire thread. Please stay on-topic.

John
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 11:02pm 16 Sep 2013
Copy link to clipboard 
Print this post

Oh - the reason I reckon it's a hardware problem is that you don't need any kernel magic to show the device in lsusb - it would appear as an unknown device if the right module wasn't found. (And then you'd go looking for why it wasn't seen as ttyACM0 or ttyUSB0 etc.)

BTW, other computers sometimes need USB devices plugging in via a powered hub. Similar reasons. May even be your board can't cope with power levels during CDC init or some such weird thing.

JohnEdited by JohnS 2013-09-18
 
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 12:35pm 17 Sep 2013
Copy link to clipboard 
Print this post

lsusb when bootloader is active looks normal.

Power is not an issue. First thing I did was use external power source.

I have now tried another linux distro and it did the same thing.

Now going to try a different linux arm board.

Update.....

I have tried 2 different ARM linux boards and 3 different distro's and still it does not show up in dmesg or lsusb. So I decided to go back to the beginning and loaded UBW32 bootloader and UBW32 factory firmware. Guess what.... it shows up in dmesg, and in lsusb, and as a tty device. OK! Loaded mmbasic using the factory UBW32 bootloader. Again it does not show up in Linux. ARGH!

I think I can safely eliminate hardware and OS at this point.Edited by cwilt 2013-09-19
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 09:03pm 17 Sep 2013
Copy link to clipboard 
Print this post

By external power what do you mean?

I would use
external DC PSU for power (i.e. power NOT from USB)
and
powered USB hub, plugging it between 'mite and Linux computer (so that it regenerates signals)

Is the above what you tried?

Also, which "tty" type(s) did you see?

John
 
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 04:55am 18 Sep 2013
Copy link to clipboard 
Print this post

By external power I mean lab grade power supply. I have 2 of them sitting next to my work bench. One supplies the linux board the other supplies the UBW32. Trust me, power is not the issue.


ttyACM0Edited by cwilt 2013-09-19
 
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 08:11pm 18 Sep 2013
Copy link to clipboard 
Print this post

Problem solved. Changed usb hub and everything worked. Both were powered, but different brands. No idea what the difference is but that was the cure. Sorry to bother.
 
     Page 1 of 2    
Print this page
© JAQ Software 2024