Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:52 09 May 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 : (DM) mini suspect start

     Page 2 of 2    
Author Message
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 02:10pm 07 Jun 2013
Copy link to clipboard 
Print this post

panky
I have been a bit carried away for longer than I expected and forgot about getting back setting up new key bindings. It will be a good diversion to try out setting up as you describe.

My real problem and what has me intrigued why xmodem fails to upload properly, but more about this later.

Added
I can now confirm that this works fine.

General
I found out that in PCLinuxOS repo is a very nice serial comms program called moserial which I have installed. Just took me some time to figure out how to get the ttyACM0 port linked to something like ttyS5 as moserial does not autodetect ACM naming. Not a big deal as on the internet I found a good description of what to do:

http://forums.debian.net/viewtopic.php?f=16&t=61943

The program is rather nice to use, and I had success with using xmodem to download the 'big' temperature program mentioned earlier. Rather exasperating that xmodem works fine here but I am running into another problem with moserial.

The program has split screen for receive and transmit characters plus a separate command line. The EDIT command will run but cursor movement is problematic. There may be way around this I don't know at this stage as I was going to have Minicom as my main comms.

What is more serious for me, I must have done something to upset MMBasic I think. I certainly need some good suggestions to get me out of this one. I thought it was a MiniCom configuration I might have been tinkering with so I returned to moserial which unfortunately confirms the same problem.

Has taken me quite some time to narrow it down, I simply did not believe what I was seeing, loosing DRIVE control which I did not have trouble with in the beginning.


Welcome to minicom 2.3

OPTIONS: I18n
Compiled on Jan 19 2010, 16:29:37.
Port /dev/ttyACM1

Press CTRL-A Z +-----------------------------+
| |
DuinoMite MMBasic Version 4.3A | Cannot open /dev/ttyACM1! |
Copyright 2011-2013 Geoff Graham| |
+-----------------------------+
> DuinoMite MMBasic Version 4.3A
Copyright 2011-2013 Geoff Graham

> FILES "A:*.*"


Here you see my startup via Minicom, notice the port is identified as ttyACM1 which is not a problem until I start trying to use the drive sepcifier. In this case when I try to list the programs held in memory with the FILES command the following message pops up


+-----------------------------+
| |
| Cannot open /dev/ttyACM1! |
| |
+-----------------------------+


The result is that the system locks up, the port has simply changed to ttyACM0. I have figured out that closing root konsole and reopening and configure to ttyACM0 I can connect again. Though the first connection has part of a an error message imbedded. I mention it as I did not really consider it important.


  Quote  
Welcome to minicom 2.3

OPTIONS: I18n
Compiled on Jan 19 2010, 16:29:37.
Port /dev/ttyACM0

Press CTRL-A Z for help on special keys

Copyright 2011-2013 Geoff Graham

> An internal error was trapDuinoMite MMBasic Version 4.3A
Copyright 2011-2013 Geoff Graham

>



From moserial I get a bit more of the error message:


An internal error was trapped and your
program has been lost (sorryDuinoMite MMBasic Version 4.3A
Copyright 2011-2013 Geoff Graham



If I immediately close down konsole and reopen again and start the terminal the error message part has cleared (in both MiniCom and 'moserial'), example from MiniCom



Welcome to minicom 2.3

OPTIONS: I18n
Compiled on Jan 19 2010, 16:29:37.
Port /dev/ttyACM1

Press CTRL-A Z for help on special keys

DuinoMite MMBasic Version 4.3A
Copyright 2011-2013 Geoff Graham

> DuinoMite MMBasic Version 4.3A
Copyright 2011-2013 Geoff Graham

>




Can anyone see if I am doing anything wrong?
Edited by plover 2013-06-09
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 05:21pm 07 Jun 2013
Copy link to clipboard 
Print this post

Ok, I know TeraTerm is the recommended program, so I have downloaded this and installed it in PCLinuxOS under Wine, the interface boundary between Linux and Window operating systems. I can run it fine but of course it only talks in COM1...COMx it seems.

My first linking effort failed but I think I know why so I am having another go.

Edit added
I have manged to get Teraterm to connect, and by sending a break signal I will get the initial couple of Logo messages.

The communications channel must be screwed up, it only just seems to work partially with long delays. For example if typing in "list" eventually after seconds I may get "ss" if I hit the backspace key I might then get "l t" could be tempted to say that may be the missing characters. Anyway this is no good.

On the same port /dev/ttyS5 I tried to connect with screen, seemed to work fine and I could actually change my MM.DRIVE$ value but the use of 'files' just shut down the terminal.

Edited by plover 2013-06-09
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 09:32pm 09 Jun 2013
Copy link to clipboard 
Print this post

I am still here, but getting a bit sidetracked. I believe there is something odd going on in the transmission when I touch DRIVE and FILES.

Presently I have actually returned to use screen that was not in the plan because I have a healthy respect for the complexity it seems to pose for me. The situation is that screen is probably the easiest to get working as it will connect and start logging transmission with

screen -L /dev/ttyACM0


I have no idea at this stage why screen logs show many 'strange' occurrences mainly of hex 08 = BS = ctl-H in the transmission when touching DRIVE and FILES.

I have not worked out any pattern yet and while screen is running VT100 I have not convinced myself how close. I am doing a fair amount of study as I have trouble with figuring out how to set the F-key bindings, I want to try and change it to my values.

since ctl-Q does not seem to work I wanted to see why. I have found that ctl-W does save and run when I am in EDIT mode.

Overall it feels like I have a running system with a few unexpected limitations, the main one that using FILES locks up and KILL the screen session.

JohnS
In case you follow the thread, do you run Olimex cards? I think you are running screen so if you run Olimex cards a few test with screen perhaps?
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 04:19am 10 Jun 2013
Copy link to clipboard 
Print this post

Still have not sorted out my understanding of screen and F-keys. I may be onto something though that seems to be related to MMBasic.

I had a few small files in memory and decided to do a clean out with the KILL command, 3 or 4 nicely obliged to take up extinction. One however is putting up a fight.

Below is my typicial assured way of terminating my screen session, as soon as I hit <enter> after the FILES statement it is over, screen is gone. When this happens the logfile catches what happens up to the moment just before it is over. In the beginning I thought the FILES command failed completely but this was the speed of the listing giving the impression. The files are listed but then something goes wrong.


> DuinoMite MMBasic Version 4.3A
Copyright 2011-2013 Geoff Graham

> files :A:"":A:"files "A:" A:"
FZ3.BAS
FZ4.BAS
SUB1.BAS
SUB2.BAS
MTEMP.BAS
M1.BAS
MT1
DA.BAT
D
FZ1.BAS
10 files, 142660 by <--- notice this does not finish


After my file clean up effort I only have two files I wanted to keep and the "D" which I can't get rid of.

Below is a complete terminal copy, showing the double logo with an internal error which I just ignore because it would go away if I do another restart just leaving the double logo.

In this case I am trying to KILL the "D" file, only one of the variations I have tried. I then tried to LOAD the file and also rename it but get Error: File not found.


DuinoMite MMBasic Version 4.3A
Copyright 2011-2013 Geoff Graham

> An internal error was trapDuinoMite MMBasic Version 4.3A
Copyright 2011-2013 Geoff Graham

>
> files "A:"
MTEMP.BAS
D
FZ1.BAS
3 files, 175268 byt


Again screen screen bit the dust and retreated. I think I must get rid of this "D" file, too much of an unknown.

Who needs cross word puzzles when this hobby stands in very nicely.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5915
Posted: 01:51pm 10 Jun 2013
Copy link to clipboard 
Print this post

It is possible that the "D" file actually has a control character in the name. Not visible but doing nasty things.

Because it's on drive A, not so easy to get rid of without deleting the lot.

I am not sure if KILL can use wildcards such as KILL "D*.*" which might delete all files starting with D.


Can you use a Windows PC and MMedit to see if it can be deleted?

Jim

VK7JH
MMedit   MMBasic Help
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 03:00pm 10 Jun 2013
Copy link to clipboard 
Print this post

TassyJim
I tried quite a few combinations of file names, when I found out that "D" was a problem.

When I turned in last night I decided that I would reflash in the morning. Since I am a bit off the track running Linux, add screen terminal emulator inside a normal terminal I was starting to loose a lot of confidence figuring where the problem might be.

Then discovering the "D" problem I felt it was time either to reflash, go to Windows or abandon the USB channel. I opted for reflash and this seems to have fixed the FILES problem. FILES can now run without killing my screen session.

I am not planning going to use Windows, but in the back of my head I may try MM Edit Linux but running it under Wine boundary interface (the same exe files used in Linux but a small amount of jiggery to file structure made so it can run windows files, amazing) but that is also adding complexity.

In EDIT F-keys are still a problem, none work. Presently I live on ctl-W which will SAVE-RUN. The ctl-Q does not work, most intriguing I was expecting all or none would work.

Right now I have discovered that after reflash when I use CAPITALS in programming, say DRIVE "A:" then when saving and listing this has turned to Drive "A:" most intriguing.

I have just been trying to get to Geoff site to get an earlier MMBasic but can't get connected. I am going to do some more investigation here as I did not seem to have CAPTIAL problems earlier and it is the same MMBasic 4.3 I reflashed.
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 05:15pm 10 Jun 2013
Copy link to clipboard 
Print this post

I have now found out how to run xmodem under screen, not too bad procedure

1.. When running MMBasic, then start {xmodem receive "nameyouwant"} no curlies of cours
2.. Use screen 'command' which is ctl-a and then enter {: !! sx -kb filetosend}

I made a small file to ensure default drive is a:

Print "Testing FILES problem"
Print MM.Drive$
Drive "A:"
Print MM.Drive$
' ready to test the FILES statement using default a: ie FILES <enter>
' SAVE by using RUN SAVE = ctl-w
Print "If this line prints memory is set to default drive A:"
'
' use ctl-w
' the F1...F5 keys don't work


Used my own text editor in Linux then saved it as AUT.BAS, later wanting to rename it AUTORUN.BAS, hoping each time I start for the time being drive a: is default.

I transferred it fine via xmodem as above.

When trying to use:

NAME "aut.bas" AS "autorun.bas"


Screen session is killed. Did not get any log output either. Starting up again and using FILES, again screen session killed. Here I just reflashed.

Then transferred the AUT.BAS file with xmodem but naming it AUTORUN.BAS before transfer to memory.

But it does not run on startup, I have manually run it, and it works as intended.

TassyJim
The first attempt I made using NAME, the log output showed that a file name AUTORUN.BAS was created but the original filename existed with maulded name, now called Axx1.BAS where x=x05 ie a control character. I have only seen this once.

 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5915
Posted: 08:47pm 10 Jun 2013
Copy link to clipboard 
Print this post

  plover said   TassyJim

I am not planning going to use Windows, but in the back of my head I may try MM Edit Linux but running it under Wine boundary interface (the same exe files used in Linux but a small amount of jiggery to file structure made so it can run windows files, amazing) but that is also adding complexity.

In EDIT F-keys are still a problem, none work. Presently I live on ctl-W which will SAVE-RUN. The ctl-Q does not work, most intriguing I was expecting all or none would work.

Right now I have discovered that after reflash when I use CAPITALS in programming, say DRIVE "A:" then when saving and listing this has turned to Drive "A:" most intriguing.



I did try MM Edit under Wine but my Linux days are a long time ago and I didn't have much success getting a reliable serial port.

Some of the Function keys might be used by Screen, stopping them from being sent to the Maximite.

Look at CONFIG CASE in the mmbasic manual. This is a setting for the Case of the commands.

I dream of the day I can get a version of MM Edit for Linux working.....

Jim

VK7JH
MMedit   MMBasic Help
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 01:25am 11 Jun 2013
Copy link to clipboard 
Print this post

TassyJim
Thanks for the manual hint about CONFIG CASE UPPER I tried it and it works fine. I think I may have got mixed some where.

What I have discovered after reflashing is the ctl-W apears to do a save from edit mode but in fact it does not, ctl-W now seems to do the job of just exiting from EDIT mode and I need manually to SAVE the file that is fine, it works.

I must say Wine has improved, I have two Windows programs that works as a team, very powerfull text editing, I really missed them. I had given up on Wine but could not find anything in PCLinuxOS that could replace them. So I returned to Wine testing when I noticed some updates to Wine and the two programs are now doing quite well. They are not meant for multi deskto operation and that confuses me a fair bit because I hop from desktop to desktop, each doing a particular task.

I think I did download a copy of MM Edit, it would be very simple for me to test it. I could do with a distraction from the Olimex/Screen problems.

Edit, added:
I just did quick download of MMEdit and it installed via Wine in under 10 seconds, as fast as I could click yes/no as required. I was quite prepared to let it crash, but no. Mind you at present I am running on a KDE64 bit system so I had expected trouble.

Now I have the task of trying to figure out how to use it. A skim of your help file given me a good idea of what to expect.

The next task is to get CHAT to connect to Micro board, bust so far it has come up with suggested COMx ports so I now need to link one of the ttySx serial devices. This sounds simple so I expect it will be where I am risking my neck.

3min later:
Well MME has been the simplest exercise I have done in this saga, now I am getting worried because things never goes that easy for me. I always find the most torturous route.

I just made a symbolic link to a spare ttyS* device, I picked ttyS5 and MME showed a new COM6 which was a bit unexpected but I selected the device and the MMBasic logo came on the screen.

I managed to load one of the files on the Olimex card back up to the PC. Then opened the file in MME. Nice with Syntax highlighting. I guess now my worries start because the last line is about 40 or more "SUB" icons.

I will stop and have break now while going is good. Probably the time to start actually reading in the Help file.
Edited by plover 2013-06-12
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5915
Posted: 02:42pm 11 Jun 2013
Copy link to clipboard 
Print this post

  plover said   TassyJim

I managed to load one of the files on the Olimex card back up to the PC. Then opened the file in MME. Nice with Syntax highlighting. I guess now my worries start because the last line is about 40 or more "SUB" icons.



Glad to hear that it is working.
It was the serial port linking that I had problems with. It seemed to work but was very slow.

Xmodem tends to pad the end of the file up to a 128 character boundary so I expect that that is what you are seeing. I have yet to see it cause a problem.

Jim


VK7JH
MMedit   MMBasic Help
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 04:17pm 11 Jun 2013
Copy link to clipboard 
Print this post

Later I read about the padding in xmodem then promptly got sidetracked on another interesting item. When I was tinkering this morning I noticed it was the file I first downloaded. While in MMBasic made small changes and saved to two new names. Those two did not have padding. It lines up.

My own special text editor keeps running stats of heaps of things, I just copied the whole file from the editing window to my editor. Total character count is 384 = 3 x 128. Yes that is it.

I think this may explain some curious extra characters I saw when working 'screen' and using xmodem. May go back and check that.

Now you mention the slow speed, that was the problem I experienced with Teraterm, It was not practical at all. I will try and see what happens if I used Teraterm in KDE64.

It is funny though when I link to ttyS5 then I see COM6 in MMedit, only just now I realise it is the different count start. COM1 = ttyS0 that is another item explained.

Edit, added:
Using the MMedit I set up another AUTORUN.BAS file and transferred it to the DuinoMite card. My print statement did not show up when I restarted the card so I thought it has not worked but when I did a PRINT MM.DRIVE$ the answer was A: this normally is B:. Another item out of the way.

Also went back to the KDE32 and tried running Teraterm I do not have trouble linking it to the the ttyACM0 but response as earlier noted, it is useless, something is screwed up. Internet search does not give much of an answer, the problem is noted but no answers giving a clue.

Having found theat MMedit works fine I will find it difficult to pursue the Teraterm problem. I will leave it alone from now unless I come across a clue.Edited by plover 2013-06-13
 
     Page 2 of 2    
Print this page


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

© JAQ Software 2024