[50G] connecting to Linux PC
04-14-2015, 08:08 PM
Post: #1
 Thomas Ritschel Member Posts: 65 Joined: Feb 2014
[50G] connecting to Linux PC
I have a problem which is puzzling me for quite a while now. Perhaps one of our fellow Linux users has a solution:

Recently I've upgraded my Notebook from Ubuntu 12.04 (kernel 3.8) to 14.04 (kernel 3.16). Now I'm facing the problem that I can't transfer data to my HP50g anymore.

When connecting the HP50g via USB cable the device /dev/ttyUSB0 is created as expected.
Then I set the calculator into Kermit server mode by pressing/holding left shift + cursor right.
On the Notebook I start Kermit (from the ckermit package) using this configuration (.kermrc):
Code:
set modem type direct set prefixing all set port /dev/ttyUSB0 set speed 9600 set carrier-watch off set flow none set parity none set block 3

The problem is that none of my commands ("rdir", "get", "put", ...) is executed. Kermit is waiting forever, and there is also no busy indicator showing up on the calculator display.

I repeated the procedure several times. I tried different cables. And I tried several LiveCDs of other Linuxes (CentOS 7.1, Fedora 21, Ubuntu 13.10, Ubuntu 14.10). All unsuccessful. Even the latest Ubuntu 12.04.5 (which has kernel 3.13) doesn't work. The problem is also present on two other (desktop) PCs running Ubuntu 14.04 and OpenSUSE 13.2, respectively.

On the other hand everything works very well when I connect a HP48g via serial cable and a serial-to-USB converter (FTDI based). So, Kermit isn't to blame here.

So far it seems that this may be related to a change in the "usbserial" kernel modules. Until kernel 3.11 there was a "hp4x" module which is now part of the "usb_serial_simple" module. Maybe something is broken since then. But then it should have been working on Ubuntu 13.10 (with kernel 3.11) or CentOS 7 (with kernel 3.10), but it hasn't...

Any ideas and suggestions are warmly welcome!

Thomas
04-14-2015, 10:00 PM
Post: #2
 BruceH Member Posts: 211 Joined: Dec 2013
RE: [50G] connecting to Linux PC
(04-14-2015 08:08 PM)Thomas Ritschel Wrote:  Recently I've upgraded my Notebook from Ubuntu 12.04 (kernel 3.8) to 14.04 (kernel 3.16). Now I'm facing the problem that I can't transfer data to my HP50g anymore.

When connecting the HP50g via USB cable the device /dev/ttyUSB0 is created as expected.
Then I set the calculator into Kermit server mode by pressing/holding left shift + cursor right.
Left shift + cursor right gives me "SWAP Error: Too Few Arguments" on the 50G. Can you give more details as to exactly what you are doing?
04-15-2015, 01:28 AM
Post: #3
 rprosperi Senior Member Posts: 3,367 Joined: Dec 2013
RE: [50G] connecting to Linux PC
(04-14-2015 10:00 PM)BruceH Wrote:  Left shift + cursor right gives me "SWAP Error: Too Few Arguments" on the 50G. Can you give more details as to exactly what you are doing?

Right-shift + cursor-right starts the (Kermit) Server mode

--Bob Prosperi
04-15-2015, 06:22 AM (This post was last modified: 04-15-2015 06:24 AM by Thomas Ritschel.)
Post: #4
 Thomas Ritschel Member Posts: 65 Joined: Feb 2014
RE: [50G] connecting to Linux PC
(04-15-2015 01:28 AM)rprosperi Wrote:
(04-14-2015 10:00 PM)BruceH Wrote:  Left shift + cursor right gives me "SWAP Error: Too Few Arguments" on the 50G. Can you give more details as to exactly what you are doing?

Right-shift + cursor-right starts the (Kermit) Server mode

Sorry, I meant (press and hold) right-shift + cursor-right.
On the 50G the Kermit server mode can also be started by [APPS] [2. I/O functions] [6. Start Server].
Either way the 50G displays "Awaiting Server Cmd." but obviously doesn't receive any commands send from the PC.

My configuration on the 50G is as follows:
Code:
Port: USB     Type: Kermit Fmt: ASC   Xlat: ->255  Chk: 3

This worked before and actually is still working when connecting to an older PC running the good old Ubuntu 12.04.

If someone wants to test this on his own hardware, here is the procedure for Ubuntu/Debian systems (to be executed in a terminal window):

(1) Make sure you have installed Kermit:
Code:
sudo apt-get install ckermit

Code:
sudo usermod -a -G dialout \$USER

(4) Connect your 50G with the USB cable to your PC an turn it (the 50G) on.

(5) The "dmesg" command should show something like the following:
Code:
[  308.411735] usb_serial_simple 3-1:1.0: hp4x converter detected [  308.412374] usb 3-1: hp4x converter now attached to ttyUSB0

(6) Check if the device is really present:
Code:
ls -l /dev/ttyUSB0

Code:
crw-rw---- 1 root dialout 188, 0 Apr 15 08:05 /dev/ttyUSB0

(7) Set the 50G into Kermit Server mode by press/hold right-shift + cursor-right.
It should display "Awaiting server cmd." but not "Xmodem Server".

(8) Start "kermit" on the PC and enter the following commands:
Code:
set modem type direct set prefixing all set port /dev/ttyUSB0 set speed 9600 set carrier-watch off set flow none set parity none set block 3 remote directory

If everything is working well, the busy indicator on the 50G should start blinking and after a few seconds you should see the contents of your current 50G directory in the kermit window.

But most likely Kermit hangs (as in my case) and nothing happens. You may need to turn off the 50G to force Kermit to disconnect.

If someone gets it working on his hardware or spots an error in this procedure, please let me know!

Thomas
04-15-2015, 07:43 PM (This post was last modified: 04-15-2015 08:01 PM by Thomas Ritschel.)
Post: #5
 Thomas Ritschel Member Posts: 65 Joined: Feb 2014
RE: [50G] connecting to Linux PC
After having a closer look into /var/log/syslog I noticed a few warning/error messages which I was able to trace back to some improper udev rules.

These are the relevant parts from the syslog:
Code:
Apr 10 13:03:54 XXXXXXXX ModemManager[718]: <warn>  (ttyUSB0): port attributes not fully set Apr 10 13:03:54 XXXXXXXX hp-config_usb_printer: hp-config_usb_printer[3235]: error: This is not a valid device
Obviously the modem manager thinks the 50G is a serial modem. And then it is considered as a USB HP printer.

To get rid of this I did the following changes:

Code:
# HP-49G+/50G device ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0121", ENV{ID_MM_DEVICE_MANUAL_SCAN_ONLY}="1"

(2) In the file "/lib/udev/rules.d/56-hpmud.rules" I changed:
Code:
# ENV{ID_HPLIP}="1" is for Ubuntu udev-acl ATTR{idVendor}=="03f0", ATTR{idProduct}=="????", OWNER="root", GROUP="lp", MODE="0664", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
into:
Code:
# ENV{ID_HPLIP}="1" is for Ubuntu udev-acl ATTR{idVendor}=="03f0", ATTR{idProduct}!="0121", OWNER="root", GROUP="lp", MODE="0664", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"

These two modifications finally solved the problem and I'm now able to connect to the 50G using Kermit and also with HPTalx.

Edit: I just confirmed that only the ModemManager was causing the problem. The second error (hp-config_usb_printer) isn't harmful. So one could omit the changes to "/lib/udev/rules.d/56-hpmud.rules" in step (2).
05-14-2016, 09:00 PM
Post: #6
 Philippe Junior Member Posts: 23 Joined: Aug 2015
RE: [50G] connecting to Linux PC
Thank you for this one !
Tips is still valid (fedora 22, hptalx 1.3.10)
 « Next Oldest | Next Newest »

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