Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:47 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 : Help with Minicom (Zorin Linux)

Author Message
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 02:25pm 04 Dec 2013
Copy link to clipboard 
Print this post

DuinoMite Mega MMBasic 4.4

The PC sees the Duino (ttyACM0) but I get no screen and an error
(on terminal) 'can't open ttyACM0'
What should be settings on serial setup ?


Thanks for any help .....Edited by hitsware 2013-12-06
 
JohnS
Guru

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

You've not said even basic details but I guess you're on Linux. Try it as root and if OK then you need to set permissions, probably via udev.

John
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 12:17am 05 Dec 2013
Copy link to clipboard 
Print this post

Thank You ! .. :)

Yes, in the subject of post, Zorin (Linux)
(in which I'm way awkward (ignorant))
Based on Ubuntu

1)installed Minicom via dpkg
no errors shown

2)followed this (from Duinomite users manual)
(except installed minicom via usbdrive with
dpkg since I have no internet on target PC):

LINUX:

If you use Linux the DuinoMite drivers will be
automatically recognized and installed.

Open console and install minicom terminal program.
$ sudo apt-get install minicom

Then you should locate which virtual communication
port is DuinoMite by running this command:.

$ dmesg | grep tty

You will see cdc_acm driver something like:
[103473.694556] cdc_acm 5-1:1.0: ttyACM0: USB ACM device

Please remember ttyACM0: as you have to setup minicom to use it:

$ minicom -s

Setup the serial port to ttyACM0: and you will see the greet message:

MaxiMite BASIC Version x.xx
Copyright 2011, Geoff Graham
Olimex Port By kenseglerdesigns.com

Everything seems right except no 'greet message'
instead 'cannot open ttyACM0' message
Edited by hitsware 2013-12-06
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 01:36am 05 Dec 2013
Copy link to clipboard 
Print this post

Mate the devices in linux are

/dev/ttyUSB0
/dev/ttyACM0

Linux needs the /dev

Its not like windows "COM1"

try "stty -F /dev/ttyACM0"

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

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 03:04am 05 Dec 2013
Copy link to clipboard 
Print this post

Sorry, didn't see the other bit of info. Had I known you were following a specific set of instructions I could have said what Andrew's now said.

You still may need udev rules. google works for getting those if the thing you're following doesn't give enough detail.

John

 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 05:57am 05 Dec 2013
Copy link to clipboard 
Print this post

Thanks Guys !

That helped .... got 'permission denied'

If I use

sudo minicom -s


then save the settings as 'duinomite'
(I wasn't saving before)
it works ... I guess 'sudo' supercedes
the needed 'permissions'?

So now how do I use 'duinomite' to not
have to go through the whole setup each
session ?
 
Greg Fordyce
Senior Member

Joined: 16/09/2011
Location: United Kingdom
Posts: 153
Posted: 10:20am 05 Dec 2013
Copy link to clipboard 
Print this post

By using sudo to run minicom you are running it as a superuser/root user instead of your normal user. Since it works running as root you have a permissions problem, I suspect with /dev/ttyACM0. Navigate to /dev/ttyACM0 with your file manager, right click on it and select properties from the menu. Go to the permissions tab and see what group it belongs to. You then need to make sure your normal user account is a member of the same group.

Hope that helps, Greg.
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 03:02pm 05 Dec 2013
Copy link to clipboard 
Print this post

Is there any reason you dont dabble on your home system as the "root" user ?

I always use root , otherwise you will get all sorts of silly persmission issues.

I always install as root, run as root.

No issues

Here is what I do

1. apt-get install minicom
2. stty -F /dev/ttyUSB0 -echo
3. minicom -s
4. set the serial device to /dev/ttyUSB0

I did find some funnies with Hyperterminal in windows

- Andrew - Edited by vk4tec 2013-12-07
Andrew Rich VK4TEC
www.tech-software.net
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 03:47pm 05 Dec 2013
Copy link to clipboard 
Print this post

Anyways ......... Thanks Guys !
I'm at least up and running .....
I'll worry about 'permissions' later.
For now: (using root)
MMBasic works in the initial mode, but
when I go to EDIT the Function Keys don't
work. When I hit F2 instead of running I get
a 'Quit without changes ? Y/N' ??????
Is this due to some Minicom settings ?
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 07:19pm 05 Dec 2013
Copy link to clipboard 
Print this post

Minicom probable has a way of changing the function key assignments but luckily you have alternatives for some of the function keys:

You can also use control keys instead of the functions keys listed above. These control keystrokes are:
LEFT Ctrl-S
RIGHT Ctrl-D
UP Ctrl-E
DOWN Ctrl-X
HOME Ctrl-U
END Ctrl-K
PageUp Ctrl-P
PageDn Ctrl-L
DEL Ctrl-]
INSERT Ctrl-N
F1 Ctrl-Q
F2 Ctrl-W
F3 Ctrl-R
ShiftF3 Ctrl-G
F4 Ctrl-T
F5 Ctrl-Y


Jim
VK7JH
MMedit   MMBasic Help
 
JohnS
Guru

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

Using root will bite you one day. If you're OK with that then carry on but otherwise use udev rules etc to get permissions right :)

Not hard. And it's how UNIX and Linux are designed to be used.

John
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 01:16am 06 Dec 2013
Copy link to clipboard 
Print this post

  JohnS said   Using root will bite you one day. If you're OK with that then carry on but otherwise use udev rules etc to get permissions right :)

Not hard. And it's how UNIX and Linux are designed to be used.

John

What did I do or not do (at installation)
to make me have to use 'sudo' now ?
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 01:21am 06 Dec 2013
Copy link to clipboard 
Print this post

  TassyJim said   Minicom probable has a way of changing the function key assignments but luckily you have alternatives for some of the function keys:

You can also use control keys instead of the functions keys listed above. These control keystrokes are:
LEFT Ctrl-S
RIGHT Ctrl-D
UP Ctrl-E
DOWN Ctrl-X
HOME Ctrl-U
END Ctrl-K
PageUp Ctrl-P
PageDn Ctrl-L
DEL Ctrl-]
INSERT Ctrl-N
F1 Ctrl-Q
F2 Ctrl-W
F3 Ctrl-R
ShiftF3 Ctrl-G
F4 Ctrl-T
F5 Ctrl-Y


Jim

Good-O ! Thanks :)
I'll try that. It would be nice to straighten
that out, but if not at least makes EDIT usable
(which is MUCH nicer than the other mode)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 02:36am 06 Dec 2013
Copy link to clipboard 
Print this post

  hitsware said  What did I do or not do (at installation)
to make me have to use 'sudo' now ?

Probably nothing then. Briefly, what happens is that on plugging in (or resetting) the 'mite a new USB device appears, the kernel talks to it, then creates a new "special file" (in this case /dev/ttyACM0). During the process it's found out the VID & PID (vendor & product ID) of the USB thing. It looks to see if it has any info about the device under those IDs and may do things based on them (the udev rules stuff).

What you normally do is make sure you do have appropriate rule(s). Those would typically create the /dev/ttyACM0 with particular permissions, ownership, etc.

Also, you'd have the non-root user have suitable permissions etc.

In my case I have /etc/udev/rules.d/xxx.rules (where xxx is whatever name I like) that sets the device to be group plugdev and I'm a member of that group.

So, there is fuly controlled and secure, safe access to the device. No need to be root.

It really is worth using google and doing some reading as there are samples etc on the net all for free.

JohnEdited by JohnS 2013-12-07
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 06:05am 06 Dec 2013
Copy link to clipboard 
Print this post

O.K. ..... Thanks again.

I was wondering if it was because of where I saved the install
package to begin with. Directions I followed :

Dear Sir,
If the Software Center is not installing the .deb files you can
try using dpkg. To do so please place the .deb files into the root
of your home folder and run the following command in a terminal
window (Start Menu> Accessories> Terminal) relacing filename.deb
with the name of the .deb file you are trying to install:
sudo dpkg -i filename.debEdited by hitsware 2013-12-07
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 02:35pm 09 Dec 2013
Copy link to clipboard 
Print this post

I'm not familiar with Zorin OS (even if I installed it in an afternoon and tested it for a "Windows user" friend), but installing Arduino will set some rules and will add your user to the "dialout" group so, you can access /dev/ttyACM0 without root rights... see some forums posts for Ubuntu 13.04 (if your Zorin OS version is 7.1) using google...

So, your user must be member of dialout and plugdev groups and a proper rule for udev must be placed in the configuration file /etc/udev/rules.d/your_file

These are some of my rules:
[code]
# Copy the file in the right place and make yourself an plugdev group member
# sudo cp 41-microchip.rules /etc/udev/rules.d/
# sudo usermod -a -G plugdev $USER
#
# Pinguino8 (PIC18F)
ATTR{idVendor}=="04d8", ATTR{idProduct}=="feaa", MODE="0660",GROUP="plugdev"
#
# Pinguino32 (PIC32MX)
ATTR{idVendor}=="04d8", ATTR{idProduct}=="003c", MODE="0660",GROUP="plugdev"
#
# Pickit 2
ATTR{idVendor}=="04d8", ATTR{idProduct}=="0033", MODE="0660",GROUP="plugdev"
#
# Pickit 3
ATTR{idVendor}=="04d8", ATTR{idProduct}=="900a", MODE="0660",GROUP="plugdev"

#FreeJALduino
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000B", MODE="0660" , GROUP="plugdev"

#Sanguino
SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", GROUP="plugdev" SYMLINK+="sanguino arduino_$attr{serial}"
SUBSYSTEMS=="usb", ATTRS{product}=="ARDUINO NANO", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_nano_$attr{serial}"
[/code]

included in a file named "41-microchip.rules" and placed inside /etc/udev/rules.d/ folder
Warning: when you issue the commands written inside the "41-microchip.rules", you must be logged as your initial user created at the Linux install time. The user that you use every day.Edited by vasi 2013-12-11
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 05:19pm 09 Dec 2013
Copy link to clipboard 
Print this post

GULP :)

 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 08:11pm 09 Dec 2013
Copy link to clipboard 
Print this post

Maybe this can help you a little more:
http://wiki.pinguino.cc/index.php/Linux#Ubuntu_Oneiric_.2811 .10.29_amd64_64_bit

Instead of microchip group, you have plugdev (if you use my "file"), but you don't need to create it - it exists already. Edited by vasi 2013-12-11
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 03:35pm 10 Dec 2013
Copy link to clipboard 
Print this post

vasi ..

Thank you so much :)
Too complicated for me
I may ditch the PC hookup
and go back to stand-alone
DuinoMite/Fluxamasynth
(TV monitor/ps2keyboard)
I'm just trying to make
a smaller footprint !
MegaRegards <|:^))
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024