HP Forums
Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - Printable Version

+- HP Forums (http://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa (/thread-3549.html)



Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - John Galt - 04-04-2015 01:03 AM

Edit: I'm an idiot. All I had to do was to restart Linux.

The rest of this post was deleted because it is no longer relevant.

My thanks to Bit and Marcus anyway. All I had to do was think of you two and it's fixed. Amazing!


RE: Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - BarryMead - 04-04-2015 01:48 AM

(04-04-2015 01:03 AM)John Galt Wrote:  First thank you both (and others) for your help getting me to configure Ubuntu Linix in a VM so that I can use MySamBa on a Mac.

It was working wonderfully until I messed it up. I inadvertently wiped out my Linux partiton and had to create it from scratch again. Now, I am stuck at a point that should be simple for a Unix expert to fix, but I am not a Unix expert.

I would like to use Minicom to ensure my serial loopback works before attempting to use MySamBa. However, I cannot determine how to get Minicom to recognize the serial port as I did so easily in the past.

For background, this is what I would like to do:

http://www.hpmuseum.org/forum/thread-2510-post-25267.html#pid25267

This is what is happening now:

Code:
john@john-VirtualBox:~$ minicom
minicom: cannot open /dev/ttyUSB0: No such file or directory
john@john-VirtualBox:~$ ls /dev/ttyUSB0
/dev/ttyUSB0
john@john-VirtualBox:~$ minicom /dev/ttyUSB0
minicom: cannot open /dev/tty8: Permission denied
john@john-VirtualBox:~$

I already created the symbolic link, and I think it's correct:

Code:
john@john-VirtualBox:~$ ls -la /dev/ttyUSB0
lrwxrwxrwx 1 root root 4 Mar 29 22:17 /dev/ttyUSB0 -> com1
john@john-VirtualBox:~$

I am not able to store Minicom's default port parameters. If I attempt to store them Mincom replies "Error: Cannot write to /etc/minicom/minirc.dfl"

What am I doing wrong?

Obviously attempting to use MySamBa fails because I do not understand how Unix communicates to the serial port, and I already bridked one calculator due to my own ineptitude. I am trying to avoid repeating that mistake.
Your symbolic link is incorrect. it should be made like this.

ln -s /dev/ttyUSB0 .wine/dosdevices/com1

This is because the wine system looks in the .wine/dosdevices directory for these device symlinks.
With regard to your minicom problems you could try running minicom as root and you would not get
the permission error about writing to the /etc/minicom/minirc.dfl

Also if you run minicom with the -s paramter it will take you straight into the setup menu where you can
select serial port setup and pick serial device and set it to /dev/ttyUSB0

Hope this was helpful.


RE: Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - John Galt - 04-04-2015 02:33 AM

Thank you Barry. That is indeed helpful and I will keep it in mind.

What is the purpose of symbolic links? Can you explain why they are necessary? Until I understand that I'll never remember how to configure them properly.

I have only a vague understanding of its purpose. Is it merely so that MySamBa can associate "com1" with a device, otherwise "com1" would have no meaning to Linux, and MySamBa cannot comprehend anything else?

Anyway, restarting Linux was all I needed to do. After that, I simply entered Minicom, used Ctrl A O to enter its configuration menu, selected Serial Port Setup, set the Serial Device to /dev/ttyUSB0, saved that setup as default, and that was it. The "Permission Denied" roadblock did not reappear.

After confirming the loopback test worked, I used MySamBa, typed com1 in the "connect to" field, and sent the file to the WP 34S. Everything worked.


RE: Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - John Galt - 04-04-2015 03:32 AM

(04-04-2015 01:48 AM)BarryMead Wrote:  Your symbolic link is incorrect. it should be made like this.

ln -s /dev/ttyUSB0 .wine/dosdevices/com1

Barry, I hate to bother you but I checked my scrollback buffer and that is in fact the exact command I used. No surprise since it was probably you who provided it to me some months ago :-)

Why do you suspect the symbolic link is incorrect, from the information I posted earlier? The reason for asking is so I can determine what the symbolic link is supposed to look like, after it has been created.


RE: Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - Marcus von Cube - 04-04-2015 10:22 AM

(04-04-2015 01:03 AM)John Galt Wrote:  Edit: I'm an idiot. All I had to do was to restart Linux.

That should have fixed the device links. Once you create a bad assignment by swapping the ln parameters for example the original device node no longer works. A reboot should cure this.


RE: Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - John Galt - 04-04-2015 03:40 PM

Thanks Marcus. Why do you suppose I got "permission denied"? I added my account to the "dialout" group, but that was prior to rebooting. Was that the reason? I can think of no other.


RE: Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - BarryMead - 04-04-2015 05:54 PM

(04-04-2015 03:32 AM)John Galt Wrote:  Why do you suspect the symbolic link is incorrect, from the information I posted earlier? The reason for asking is so I can determine what the symbolic link is supposed to look like, after it has been created.
the ls -l /dev/ttyUSB0 command above should not point to com1

an ls -l of .wine/dosdevices/com1 should point to /dev/ttyUSB0 however. That is how I knew that the symlink
was wrong.

Symbolic links are "Pointers" that allow a file to be accessed by another name. Wine uses them to make
the windows devices point to Linux path names for the appropriate devices.


RE: Bit and / or Marcus: help setting up Ubuntu Linux for flashing with MySamBa - John Galt - 04-04-2015 06:28 PM

(04-04-2015 05:54 PM)BarryMead Wrote:  an ls -l of .wine/dosdevices/com1 should point to /dev/ttyUSB0 however.

Thanks Barry! That is exactly what it did after a reboot.

(04-04-2015 05:54 PM)BarryMead Wrote:  Symbolic links are "Pointers" that allow a file to be accessed by another name. Wine uses them to make the windows devices point to Linux path names for the appropriate devices.

Brilliant. That is the explanation I needed.