Post Reply 
[WP-34S] Cable and flashing options for Mac users
01-20-2015, 09:55 PM
Post: #41
RE: [WP-34S] Cable and flashing options for Mac users
Can you use it within a virtual machine running Windows? My development system is a Mac but I've never tried to flash a 30b from OS-X, always with MySamba on XP under Parallels. The latter reliably assigns my USB devices to the virtual machine.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-20-2015, 10:08 PM (This post was last modified: 01-20-2015 10:08 PM by John Galt.)
Post: #42
RE: [WP-34S] Cable and flashing options for Mac users
(01-20-2015 09:55 PM)Marcus von Cube Wrote:  Can you use it within a virtual machine running Windows? My development system is a Mac but I've never tried to flash a 30b from OS-X, always with MySamba on XP under Parallels. The latter reliably assigns my USB devices to the virtual machine.

Thank you Marcus, I really appreciate your words of wisdom. I watched the video of your presentation and realize you used XP and a VM for development on a Mac. I do not use Windows but I have no doubt what you describe would work with the Prolific chip.

When someone refers to a "serial port" as implemented in the HP-30b, I did not fully appreciate the fact that the communication protocol is such a "mess" (the word I chose to characterize it earlier). Yes it's serial, but I made the assumption it would conform to a common protocol – similar to the 48GX, for example. My mistake.

At a subliminal level I knew the lack of a crystal in the 30b would require some programming contortions, but its implications are now quite clear.
Find all posts by this user
Quote this message in a reply
01-20-2015, 10:30 PM
Post: #43
RE: [WP-34S] Cable and flashing options for Mac users
(01-20-2015 10:08 PM)John Galt Wrote:  At a subliminal level I knew the lack of a crystal in the 30b would require some programming contortions, but its implications are now quite clear.

Even if HP had equipped every 30b with a crystal the problems would remain the same. That's because the Atmel SOC (system on a chip) design allows for running it off a simple R/C oscillator. The Boot loader is part of the chip and must therefore cope with unpredictable variations in speed. In order to establish a communication link to the host it uses some convoluted protocol to find out what the actual speed of the oscillator is. Once a link is established, the protocol is much less tricky.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-20-2015, 10:59 PM
Post: #44
RE: [WP-34S] Cable and flashing options for Mac users
(01-20-2015 09:55 PM)Marcus von Cube Wrote:  Can you use it within a virtual machine running Windows? My development system is a Mac but I've never tried to flash a 30b from OS-X, always with MySamba on XP under Parallels. The latter reliably assigns my USB devices to the virtual machine.

I never tried it on a Mac but MySamba also works perfectly under Wine on Linux, you just have to create a symbolic link for the serial port.

For example: ~/.wine/dosdevices/com1 => /dev/ttyUSB0
Find all posts by this user
Quote this message in a reply
01-20-2015, 11:04 PM (This post was last modified: 01-21-2015 02:05 AM by John Galt.)
Post: #45
RE: [WP-34S] Cable and flashing options for Mac users
(01-20-2015 10:59 PM)Bit Wrote:  I never tried it on a Mac but MySamba also works perfectly under Wine on Linux,

(Edited to remove irrelevant information)

OK, I have Ubuntu Linux running in Oracle's VirtualBox, installed Wine, downloaded MySamba and the Prolific driver for Windows. Progress!

Next problem is creating the symbolic link as you described... not sure how to do that.

So, I opened Terminal and started typing:

john@john-VirtualBox:/dev$ ~/.wine/dosdevices/com1 => /dev/ttyUSB0
bash: /dev/ttyUSB0: Permission denied
john@john-VirtualBox:/dev$ sudo ~/.wine/dosdevices/com1 => /dev/ttyUSB0
bash: /dev/ttyUSB0: Permission denied
john@john-VirtualBox:/dev$

Obviously I'm groping in the dark. How do I create a symbolic link?
Find all posts by this user
Quote this message in a reply
01-21-2015, 10:58 AM
Post: #46
RE: [WP-34S] Cable and flashing options for Mac users
(01-20-2015 11:04 PM)John Galt Wrote:  How do I create a symbolic link?

ln -s original_file symbolic_link

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-21-2015, 03:06 PM (This post was last modified: 01-21-2015 03:07 PM by John Galt.)
Post: #47
RE: [WP-34S] Cable and flashing options for Mac users
Something like this?

Code:
john@ john-VirtualBox:~/.wine/dosdevices$ ls
c:  d::  z:
john@ john-VirtualBox:~/.wine/dosdevices$ sudo ln -s com1 /dev/ttyUSB0
[sudo] password for john: 
john@ john-VirtualBox:~/.wine/dosdevices$ ls
c:  d::  z:
john@ john-VirtualBox:~/.wine/dosdevices$ cd /dev
john@ john-VirtualBox:/dev$ ls ttyUSB0
ttyUSB0
john@ john-VirtualBox:/dev$

I have no idea if that's correct. I also downloaded and ran Prolific's Windows Driver Installer Setup Program here: http://prolificusa.com/pl-2303hx-drivers/

The driver installation appears to have finished successfully, installing something... somewhere... but I have no idea where drivers are supposed to reside on a Windows system.

The latest roadblock is that MySamBa still shows no ports to choose from - its "connect to" dropdown list is empty. Should "com1" now appear under dosdevices?
Find all posts by this user
Quote this message in a reply
01-21-2015, 05:20 PM (This post was last modified: 01-21-2015 06:15 PM by Bit.)
Post: #48
RE: [WP-34S] Cable and flashing options for Mac users
(01-21-2015 03:06 PM)John Galt Wrote:  Something like this?

Code:
john@ john-VirtualBox:~/.wine/dosdevices$ ls
c:  d::  z:
john@ john-VirtualBox:~/.wine/dosdevices$ sudo ln -s com1 /dev/ttyUSB0
[sudo] password for john: 
john@ john-VirtualBox:~/.wine/dosdevices$ ls
c:  d::  z:
john@ john-VirtualBox:~/.wine/dosdevices$ cd /dev
john@ john-VirtualBox:/dev$ ls ttyUSB0
ttyUSB0
john@ john-VirtualBox:/dev$

I have no idea if that's correct. I also downloaded and ran Prolific's Windows Driver Installer Setup Program here: http://prolificusa.com/pl-2303hx-drivers/

The driver installation appears to have finished successfully, installing something... somewhere... but I have no idea where drivers are supposed to reside on a Windows system.

The latest roadblock is that MySamBa still shows no ports to choose from - its "connect to" dropdown list is empty. Should "com1" now appear under dosdevices?

Don't use sudo when creating the symlink. The reason is that you're creating the link in a directory you own and it simply points to a device. Referring to another file system object via symlinks doesn't require elevated privileges in Unix system, you only need that to use the object (either directly or via a symlink).

Use this command:
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

After that check if MySamba shows a COM1 device.

/dev/ttyUSB0 is the first serial port accessible over USB, which is what most people would have. You'll need permission to use the device, which usually means your user account has to be a member of the 'dialout' group. If you're unsure, post the output of the following two commands here (while the USB serial cable is plugged in, because these device nodes are usually created on the fly) so we can verify:
id
ls -l /dev/ttyUSB0

You cannot use the kernel component of Windows drivers under Wine and you rarely need the userspace component. Installing Windows driver packages is generally not recommended.
Find all posts by this user
Quote this message in a reply
01-21-2015, 05:54 PM
Post: #49
RE: [WP-34S] Cable and flashing options for Mac users
(01-21-2015 03:06 PM)John Galt Wrote:  Something like this?

Code:
john@ john-VirtualBox:~/.wine/dosdevices$ ls
c:  d::  z:
john@ john-VirtualBox:~/.wine/dosdevices$ sudo ln -s com1 /dev/ttyUSB0
[sudo] password for john: 
john@ john-VirtualBox:~/.wine/dosdevices$ ls
c:  d::  z:
john@ john-VirtualBox:~/.wine/dosdevices$ cd /dev
john@ john-VirtualBox:/dev$ ls ttyUSB0
ttyUSB0
john@ john-VirtualBox:/dev$

I'm afraid you've mixed it up and now have a defunct /dev/ttyUSB0 because you've swapped the source and the destination in the command line. Now the file named ttyUSB0 in /dev is a symbolic link to a nonexistent file. Outch!

To confirm, type ls -la /dev/ttyUSB0 and post the results.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-21-2015, 06:04 PM (This post was last modified: 01-21-2015 06:12 PM by Bit.)
Post: #50
RE: [WP-34S] Cable and flashing options for Mac users
(01-21-2015 05:54 PM)Marcus von Cube Wrote:  
(01-21-2015 03:06 PM)John Galt Wrote:  Something like this?

Code:
john@ john-VirtualBox:~/.wine/dosdevices$ ls
c:  d::  z:
john@ john-VirtualBox:~/.wine/dosdevices$ sudo ln -s com1 /dev/ttyUSB0
[sudo] password for john: 
john@ john-VirtualBox:~/.wine/dosdevices$ ls
c:  d::  z:
john@ john-VirtualBox:~/.wine/dosdevices$ cd /dev
john@ john-VirtualBox:/dev$ ls ttyUSB0
ttyUSB0
john@ john-VirtualBox:/dev$

I'm afraid you've mixed it up and now have a defunct /dev/ttyUSB0 because you've swapped the source and the destination in the command line. Now the file named ttyUSB0 in /dev is a symbolic link to a nonexistent file. Outch!

To confirm, type ls -la /dev/ttyUSB0 and post the results.

Udev should automatically remove the symlink and recreate the device node when he plugs in the serial converter cable again. But it won't hurt to double check.
Find all posts by this user
Quote this message in a reply
01-21-2015, 06:27 PM (This post was last modified: 01-21-2015 10:09 PM by John Galt.)
Post: #51
RE: [WP-34S] Cable and flashing options for Mac users
(original post edited - updated information after rebooting the VM is as follows)

Code:
john@ john-VirtualBox:/dev$ id
uid=1000(john) gid=1000(john) groups=1000(john),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin​),124(sambashare)
john@ john-VirtualBox:/dev$ ls -la /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Jan 21 14:10 /dev/ttyUSB0
john@ john-VirtualBox:/dev$

Still no port appears to select from in MySamBa though. I'm not supposed to just type COM1 in the field, am I? (I tried that anyway).

Apparently my user account did not belong to "dialout" (edit: fixed):

Code:
john@ john-VirtualBox:~/.wine/dosdevices$ sudo adduser john dialout
[sudo] password for john: 
Adding user `john' to group `dialout' ...
Adding user john to group dialout
Done.
john@ john-VirtualBox:~/.wine/dosdevices$
Find all posts by this user
Quote this message in a reply
01-21-2015, 08:14 PM
Post: #52
RE: [WP-34S] Cable and flashing options for Mac users
(11-29-2014 07:13 AM)jebem Wrote:  USB to RS232 TTL PL2303HX converter is the easier way to get a working flashing cable. It works virtually with any modern computer and OS (Linux, Mac, and all colors of Windows).

Thank you for confirming this for me... I have a couple of PL2303 converters that I use with my linux boxes for minicom terminal access to some of my headless units... because the main box does not have a real RS232 port! Anyway, if I can make the flash cable from one of my PL2303 cables I'll be in business.

Thanks

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
01-21-2015, 11:15 PM (This post was last modified: 04-04-2015 06:38 PM by John Galt.)
Post: #53
RE: [WP-34S] Cable and flashing options for Mac users
Using a loopback test and a terminal emulator (Minicom) I verified the Prolific cable is working while running in Linux.

To illustrate, Minicom echoes the characters if Tx and Rx are connected together:

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Jan 1 2014, 17:13:19.
Port /dev/ttyUSB0, 17:49:28

Press CTRL-A Z for help on special keys

ASDFasdf
<--- those are echoed if Tx and Rx are connected, and not if they are not.

There is still no selection available in the dropdown menu next to MySamBa's "connect to" field. However, other interesting things are happening:

- If I enter nonsense characters or /var/ttyUSB0 in MySamBa's "connect to" field, and then click Send File, a dialog box with title "Error" and text "Error, could not connect to calculator" will appear.

- If I enter com1 in the "connect to" field and click Send File, a different "Error" dialog box appears. This one says "Unable to connect".

- If I leave Minicom open and running without connecting anything to the calculator, a few random garbage characters will also appear when I do this.

So, something is happening... but further progress continues to be elusive.

One more thing: Minicom does not recognize com1 if I attempt to configure it using that port. Only /var/ttyUSB0 seems to work. Specifying com1 results in minicom: cannot open com1: No such file or directory

Question: What is the significance in the difference between the two messages that appear in the "Error" dialog boxes?
Find all posts by this user
Quote this message in a reply
01-22-2015, 01:57 AM (This post was last modified: 01-22-2015 02:01 AM by Bit.)
Post: #54
RE: [WP-34S] Cable and flashing options for Mac users

That /var/ttyUSB0 thing is weird. What does the following command say?
ls -l /var/ttyUSB0
(Unless of course it was just a typo. The Minicom output mentioned /dev/ttyUSB0.)

"com1" is entirely a DOS/Windows concept, it doesn't exist in Unix systems.

What version of Ubuntu are you using? Can you paste the output of the following command?
lsb_release -a
Find all posts by this user
Quote this message in a reply
01-22-2015, 02:34 AM
Post: #55
RE: [WP-34S] Cable and flashing options for Mac users
Yes, I apologize, it's a typo - minicom requires /dev/ttyUSB0 as in the blue text, not what I wrote later. As you suspect ls -l /var/ttyUSB0 returns "no such file or directory".

Owing to my mental deficiency I probably really was typing /var/ttyUSB0 in MySamBa, but after much trial and error I concluded entering anything other than com1 is pointless. I am only doing that out of frustration because nothing appears in its dropdown selection - just a blank box. Perhaps that's as it should be?

Code:
john@ john-VirtualBox:~$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:    trusty
john@ john-VirtualBox:~$
Find all posts by this user
Quote this message in a reply
01-22-2015, 03:29 AM
Post: #56
RE: [WP-34S] Cable and flashing options for Mac users
(01-22-2015 02:34 AM)John Galt Wrote:  Yes, I apologize, it's a typo - minicom requires /dev/ttyUSB0 as in the blue text, not what I wrote later. As you suspect ls -l /var/ttyUSB0 returns "no such file or directory".

Owing to my mental deficiency I probably really was typing /var/ttyUSB0 in MySamBa, but after much trial and error I concluded entering anything other than com1 is pointless. I am only doing that out of frustration because nothing appears in its dropdown selection - just a blank box. Perhaps that's as it should be?

Code:
john@ john-VirtualBox:~$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:    trusty
john@ john-VirtualBox:~$

I've just checked: MySamba remembers the last serial port used but if I clear that, under Wine it won't offer COM1 automatically in the drop box. If the symlink is set up correctly (~/.wine/dosdevices/com1 => /dev/ttyUSB0), then manually entering COM1 in MySamba should work.

(I don't normally use Ubuntu but I have a 14.04 test system in a virtual machine, so if all else fails, I can replicate what you did to help find the problem.)
Find all posts by this user
Quote this message in a reply
01-22-2015, 06:29 AM (This post was last modified: 01-22-2015 06:51 AM by John Galt.)
Post: #57
RE: [WP-34S] Cable and flashing options for Mac users
I think I must have bricked the calculator, since everything else seems to be working OK and I can think of no other possibility.

Clicking the "Send file" button transmits three separate signal bursts within a period of about three seconds (they're almost exactly one second apart), after which MySamBa replies "Unable to connect". I repeated the steps on page 167 of the Owner's Manual dozens of times with the same result.

Except for amplitude, both Tx and Rx signals are identical which seems odd. I'm expecting an interrogation and a subsequent reply, but that's not happening. MySamBa sends three transmissions, and then it gives up. So do I.


Attached File(s) Thumbnail(s)
       
Find all posts by this user
Quote this message in a reply
01-22-2015, 05:04 PM
Post: #58
RE: [WP-34S] Cable and flashing options for Mac users
(01-22-2015 06:29 AM)John Galt Wrote:  Except for amplitude, both Tx and Rx signals are identical which seems odd. I'm expecting an interrogation and a subsequent reply, but that's not happening. MySamBa sends three transmissions, and then it gives up. So do I.
The TX and RX signals SHOULD NOT look the same. There is something wrong with the wiring of your programming tool. One suggestion is that you use an ohmmeter to verify the connections and to verify that TX and RX are not coupled to each other in some way. Perhaps you can find someone in your area of the country to flash the WP-34S for you. Many have have been helped by others on this forum under similar circumstances. Many have reported that the ONLY ROCK SOLID environment for flashing is using
Windows 7 or XP with MySamba. It seems that the timing of the 115200 baud connection is a bit finicky
and most of the other OS configurations just don't quite get the timing right. Don't give up many have gotten through this same problem. I bet your calc isn't bricked, it is pretty rare that this happens. It may require fresh batteries for a successful flash, however, because once place in the programming mode it
consumes a lot of current until it actually gets flashed and powered down. If you press the reset button
on the back (without pressing the ON) button it will power down the calc and save the batteries. You cannot tell from the display if the calc is consuming battery power or not. Best of luck to you
Find all posts by this user
Quote this message in a reply
01-22-2015, 06:59 PM
Post: #59
RE: [WP-34S] Cable and flashing options for Mac users
Thank you for the words of encouragement Barry, it means a lot to me.

I completely agree with you that there is something electrically wrong, but I am at a loss to determine what it might be.

I also agree the calculator is not totally dead, since powering it on causes about 8 mA to flow from the power supply (see the picture - to eliminate that concern I am no longer using batteries). Pressing the reset button through the hole in the back causes current to cease, and pressing ON again draws 8 mA. Therefore, the calc is "working" in that it responds to those inputs, but as far as I know once its firmware has been erased there are no other overt means of determining its operational state.

The electrical connections are so simple there is no need for a picture.

The Prolific USB cable presents four conductors:

Red (USB supplied 5V at 500 mA, which I am not using yet)
Black (signal and power ground)
Green (TTL Tx, to calc)
White (TTL Rx, from calc)

Black: connects to a center battery clip.
Green: goes to the upper leftmost programming pad, through a 1k resistor.
White: goes to the one to its right - the upper center programming pad, through a 1k resistor.

Power supply (an HP no less!) connects to the battery clips, which I understand are internally connected to one another in parallel. I verified that too.

MySamBa (the PC program) or wp34sflash (Mr. Meheut's OS X program) both send approximately the same signals. There are rather significant timing differences I could describe, but I don't think they're relevant quite yet.

About the $1.79 eBay cable I bought: as far as I can determine the cable and its drivers are doing everything they can be expected to do. A loopback test (using minicom as well as other utilities) performed by connecting Rx and Tx together is 100% successful: typed characters are echoed. Break that connection, and characters are not echoed. The signal levels are always well-defined, and the loopback test succeeds even if I impose significant noise and distortion in them.

However, the interesting thing about that cable is this: the scope picture I posted shows approximately the same signals even if I remove the cable from the calculator. In other words, the signal appearing on the Rx line is there even if I leave it open circuit. Inductive coupling perhaps? One would think the calculator load should eliminate that concern. It's the same cable dewster used so I'm skeptical of inductive coupling.

Quote:One suggestion is that you use an ohmmeter to verify the connections and to verify that TX and RX are not coupled to each other in some way.

Yes, the resistance between them is infinite so the reason for the apparent signal coupling remains unknown. Both my cables do the same thing.

So yes, something is electrically wrong. I don't yet know what it is. The exact same cable worked for others though so I'm reluctant to blame it right away. If either serial line is broken in the HP30b internally though, I would see what I'm seeing.

Quote:Perhaps you can find someone in your area of the country to flash the WP-34S for you.

Someone was already kind enough to lend assistance so I think I'll take him up on the offer. Bear in mind my goal is not to flash the calculator and be done with it; I'm trying to find a solution for Mac users to do that on their own.

At the moment I need to (1) verify my Prolific USB cable works using otherwise proven hardware / software (PC, calc, MySamBa) and (2) verify my calculator isn't totally dead. If both of those uncertainties are eliminated, I'm back to troubleshooting my computing platform.

Your suggestions are quite welcome, thank you! This site is a terrific resource.
Find all posts by this user
Quote this message in a reply
01-22-2015, 08:00 PM
Post: #60
RE: [WP-34S] Cable and flashing options for Mac users
I had to cross-wire Tx and Rx. See this diagram:

http://www.hpmuseum.org/forum/thread-183...ml#pid5106
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 5 Guest(s)