[newRPL] interested in RPN mode?
|
11-22-2019, 01:04 PM
(This post was last modified: 01-07-2020 07:54 PM by compsystems.)
Post: #21
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
Hello
Are there dialog boxes to change flags that facilitate configuration changes? For those who do not have an HP50G, compile the version for PC or Android. Thanks |
|||
11-22-2019, 03:13 PM
Post: #22
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-22-2019 01:04 PM)compsystems Wrote: For those who do not have an HP50G, compile the version for PC or Android. I have previously compiled version 1299 for Linux. The manual says I can enter the source directory and issue a Code: git pull I have version 1315 on my 39GS hardware, but can someone point me to how to update the source so I can recompile v 1315 on my laptop? Thanks, JP Georgia, USA 10BII+, 12C, 14B (AE), 17B, 17BII, 20B, WP-34S, 28S, 35S, 39GS, 48G, 82240A,B + sliderules galore, mostly Hemmi/Post & Dietzgen |
|||
11-22-2019, 10:11 PM
Post: #23
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-22-2019 03:13 PM)jpcuzzourt Wrote: I have previously compiled version 1299 for Linux. The manual says I can enter the source directory and issue a I think we'll just have to wait for Claudio to upload the code. When this happens, I'll be interested in your comments about the reformatted compile howto page: I cleaned it up a bit and reformatted it, but could have made some mistake with paths or filenames. I'd like also to know if you find it clear and comprehensible! Thanks! |
|||
11-22-2019, 10:41 PM
Post: #24
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-22-2019 03:13 PM)jpcuzzourt Wrote: I have previously compiled version 1299 for Linux. The manual says I can enter the source directory and issue a Usually these "unofficial" builds are not pushed to the Sourceforge repository until I'm sure of the stability and they undergo some more testing. However, since you need it, I just did a push to sf for you. Go ahead and pull again. Hopefully there's not too many bugs. |
|||
11-22-2019, 11:19 PM
(This post was last modified: 11-23-2019 05:21 PM by jpcuzzourt.)
Post: #25
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-22-2019 10:11 PM)JoJo1973 Wrote: I think we'll just have to wait for Claudio to upload the code. When this happens, I'll be interested in your comments about the reformatted compile howto page: I cleaned it up a bit and reformatted it, but could have made some mistake with paths or filenames. (11-22-2019 10:41 PM)Claudio L. Wrote: Usually these "unofficial" builds are not pushed to the Sourceforge repository until I'm sure of the stability and they undergo some more testing. Thanks Claudio. It built a fresh new 1315 desktop version for me. And JoJo, I think these are the same instructions I followed for the first time about a week or two ago, and I found them clear and helpful. JP EDIT: One thing that seems still-broken for me is the USB interface between the 39GS and newRPL-ui (64-bit Linux). Under version 1315, my 39GS does not appear in the USB device list. I have followed the instructions for setting up udev rules and the "usbdevices" group. And I see the 39GS in lsusb output. Any tips or ideas that I can try at this point to troubleshoot? Georgia, USA 10BII+, 12C, 14B (AE), 17B, 17BII, 20B, WP-34S, 28S, 35S, 39GS, 48G, 82240A,B + sliderules galore, mostly Hemmi/Post & Dietzgen |
|||
11-23-2019, 06:09 PM
(This post was last modified: 11-23-2019 06:13 PM by Claudio L..)
Post: #26
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-22-2019 11:19 PM)jpcuzzourt Wrote:(11-22-2019 10:11 PM)JoJo1973 Wrote: I think we'll just have to wait for Claudio to upload the code. When this happens, I'll be interested in your comments about the reformatted compile howto page: I cleaned it up a bit and reformatted it, but could have made some mistake with paths or filenames. Did you follow the wiki on USB permissions for Linux? newRPL Desktop will not see the USB device unless the user it runs under has permission to read/write the USB device. If you did, make sure you spelled the group name consistently, on one of my machines I had created the group usbdevices, then added my user to usbdevice (no s). Took me a while to figure it out. EDIT: Maybe it helps to note I'm using KUbuntu 19.04 on my main dev systems, 2 different setups and both work well, so if there's one build that's well tested is Linux 64-bit. |
|||
11-23-2019, 07:51 PM
(This post was last modified: 11-23-2019 10:13 PM by jpcuzzourt.)
Post: #27
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-23-2019 06:09 PM)Claudio L. Wrote: Did you follow the wiki on USB permissions for Linux? newRPL Desktop will not see the USB device unless the user it runs under has permission to read/write the USB device. If you did, make sure you spelled the group name consistently, on one of my machines I had created the group usbdevices, then added my user to usbdevice (no s). Took me a while to figure it out. Code: jpcuzzourt@mx:~ I believe this was working under v1299, that is, I could see and select select the device although I still got errors whenever I tried to do I/O. I should try reverting back and verifying this.* Thanks. JP FINAL EDIT: You can skip all the edits below. It's just me figuring out how to go back to 1299 and confirm that it also did not see the USB devices. I'll continue trying to figure out why. -------------------------------------------------------------------------------------------------------------------------------------------------------------------- EDIT: *Can you tell me which commit corresponds to V1299? Sorry to be a bother, but I'm a git AND QT noob. I don't know where the VERSION number comes from. Is it autogenerated somehow in QT creator, or is it in one of the source files? I'm assuming I can use git to checkout the source corresponding to a particular commit and rebuild v1299 to see if there's a difference in USB behavior on my system. (The reason I'm uncertain where I saw this behavior previously, is that before compiling for linux, I had also used it under Windows 10 both natively and in Virtualbox, as well as under wine. And now my recollections are all jumbled, lol. Now that I can compile a 64-bit linux version, that is how I'd much prefer to use it.) EDIT: OK, I see that it comes from "git rev-list --count HEAD", so piping it to |head -17 shows me that 17408 is the commit I want. I'll give it a go and see what happens. EDIT: Results. It made no difference. I must've been mistaken about ever seeing my linux version recognize the USB device. I did verify that the v1315 firmware I compiled for the 39GS will talk to the Windows version of newRPL-UI (Win7 running on Virtualbox linux host). I should note that under that scenario, newRPL-ui reports a USB communications error right after it completes a USB archive restore to my 39GS. But the restore seems to work correctly. This could be a quirk of using VirtualBox. My virtual Win7 OS repeatably crashes when I use the same newRPL-UI to do a firmware update. The firmware update completes, and then crashes Windows 7. I am able to use conn3X on that same Win7 instance to download firmware without issue. The entire reason for that win7 virtual machine was to run conn3x because I couldn't get it to work on Win10 to initially install the firmware to my 39GS. The SDcard method, of course, is not available to me yet - I still need to find the right sdcard holder to install.) So, while I have a usable enough system right now, ideally I need to figure out why my linux version of newRPL-ui does not see the USB hardware. I'll see what else I can figure out, unless you spot something wrong in my group/permissions setup in the code window above. Georgia, USA 10BII+, 12C, 14B (AE), 17B, 17BII, 20B, WP-34S, 28S, 35S, 39GS, 48G, 82240A,B + sliderules galore, mostly Hemmi/Post & Dietzgen |
|||
11-23-2019, 11:47 PM
(This post was last modified: 11-24-2019 12:04 AM by jpcuzzourt.)
Post: #28
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
Claudio:
TLDR: please see my question in bold below. (Sorry, I get wordy.) So, I've been digging a little in my system, and it seems that another rule is taking precedence over the settings in /etc/udev/rules.d/50-HIDDevices.rules. (It gets grabbed by a rule in 90-extraacl.rules that handles KERNEL=="ttyUSB[0-9]*" and changes the owner to me. I don't remember setting this up, but I think it may be related to my Arduino IDE setup.) The result is that my GS39 connects as /dev/ttyUSB0, and I am the owner, but the group is "dialout" (Without that rule, the owner is root.) My account is a member of group "dialout", so I think this should all be OK. And newRPL-ui runs under my account. As far as I can tell, it should have RW access to /dev/ttyUSB0. If all the above is true, there isn't really any need for the 50-HIDDevices.rules, correct? note that I also tried changing the group on /dev/ttyUSB0 manually to "usbdevices" and it made no difference. If I understand correctly, all that should matter is that newRPL-ui runs under an account ("jpcuzzourt") which has rw access to /dev/ttyUSB0. Since jpcuzzourt is the owner of the device and rw access, my issue should not be permissions, correct? (note that I've also run newRPL-ui as root to try to rule permissions out, and I get the same result.) One more idea - is the problem that it gets attached as /dev/ttyUSB, i.e. maybe it isn't seen as hidraw? Code: $ cat /etc/udev/rules.d/90-extraacl.rules Code: [15218.511361] usb 4-1.2: new full-speed USB device number 20 using ehci-pci Georgia, USA 10BII+, 12C, 14B (AE), 17B, 17BII, 20B, WP-34S, 28S, 35S, 39GS, 48G, 82240A,B + sliderules galore, mostly Hemmi/Post & Dietzgen |
|||
11-23-2019, 11:54 PM
Post: #29
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-23-2019 07:51 PM)jpcuzzourt Wrote: So, while I have a usable enough system right now, ideally I need to figure out why my linux version of newRPL-ui does not see the USB hardware. I'll see what else I can figure out, unless you spot something wrong in my group/permissions setup in the code window above. Do you see hidraw devices in /dev? Do they have the right permissions? Check just in case udev is not working for any reason, or perhaps it's not assigning the hidraw driver to the device. Are you using Ubuntu? in other distros the udev rules might go into different folders. Also other distros may not come with hidraw drivers by default. Another thing: once you used a device with Virtual box, it assigns a virtual box driver to the device. It should still assign others but in other device of mine it made it stop working on the host forever, even after reboot, while vbox wasnt running at all. Use dmesg to see which drivers were assigned to the calc. Yet another thing you can try is installing the libusb package. Normally it's not needed, the hidraw driver is used but if that fails newRPL desktop will try to use libusb. |
|||
11-24-2019, 12:02 AM
(This post was last modified: 11-24-2019 12:04 AM by Claudio L..)
Post: #30
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-23-2019 11:47 PM)jpcuzzourt Wrote: Here is dmesg for the device: Aha... it's assigning the usb_serial_simple driver instead of hidraw. There must be a rule somewhere that tells udev to use this device as a serial. This is an HID device! I don't know what hp4x converter is, perhaps you had installed some connectivity library for Linux? Somehow you need to find where in your system there's a rule for HP calcs to load that serial driver. Simply comment that rule out and let the system try yo identify the device, it should see it as hid and load the standard hid driver plus hidraw. |
|||
11-24-2019, 12:12 AM
Post: #31
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
A little more google and hp4x Linux driver is the culprit. I don't know why it's being loaded on your system automatically, perhaps some old rule or other package installed a rule. You can try rmmod ho4x to unload it, then unplug and plug the calc. Use dmesg again to see if now it loaded the right driver.
|
|||
11-24-2019, 12:50 AM
(This post was last modified: 11-24-2019 02:32 AM by jpcuzzourt.)
Post: #32
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-24-2019 12:12 AM)Claudio L. Wrote: A little more google and hp4x Linux driver is the culprit. I don't know why it's being loaded on your system automatically, perhaps some old rule or other package installed a rule. You can try rmmod ho4x to unload it, then unplug and plug the calc. Use dmesg again to see if now it loaded the right driver. Thanks. Yes, I'm on this same path now. rmmod hp4x doesn't find it, but I'll keep digging. I had finally caught up enough to realize the problem is that it is getting assigned a serial driver somewhere. It's probably from some ftdi or other usb->serial converter driver that I've installed in the past. It's more of a learning adventure than I wanted tonight, but I'll figure it out. Thank you so much for looking. At least I can quit chasing permissions. JP EDIT: rmmod usb_serial_simple does it. Now it works. I just have to find out how to blacklist it for this device I guess. Edit: Even after a reboot, the usb_serial_simple driver no longer attaches and newRPL-ui works fine*. I did not expect the fix to survive a reboot, but somehow it did. lsmod still shows the kernel module as being installed. but the calculator now attaches as /dev/hidraw0 as expected. In any case, thank you for the help Claudio. I'm pretty sure this module, usb_serial_simple, was compiled into the kernel for this linux, rather than being anything I installed intentionally. It supports a long list of USB devices, including the so-called HP 4x calculators. I'm running the latest mx Linux, which is derived from Debian. *I do still get a "USB Communication Error" popup after restoring an archive over USB, though the restore seems to work. Is there an error log file generated anywhere? I did a cursory search for one and didn't find any. Georgia, USA 10BII+, 12C, 14B (AE), 17B, 17BII, 20B, WP-34S, 28S, 35S, 39GS, 48G, 82240A,B + sliderules galore, mostly Hemmi/Post & Dietzgen |
|||
11-24-2019, 02:49 AM
(This post was last modified: 11-24-2019 02:58 AM by ijabbott.)
Post: #33
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-24-2019 12:12 AM)Claudio L. Wrote: A little more google and hp4x Linux driver is the culprit. I don't know why it's being loaded on your system automatically, perhaps some old rule or other package installed a rule. You can try rmmod ho4x to unload it, then unplug and plug the calc. Use dmesg again to see if now it loaded the right driver. The hp4x USB serial driver has been part of the Linux kernel sources since the 2.6.12 kernel (released 2005-06-17), initially as its own module, but got merged into the usb_serial_simple module in the 3.12 kernel (released 2013-11-03). The device tables in the respective modules match the USB VID and PID of the HP calculator, so the module will be loaded automatically when a matching device is detected if the module is installed as part of the distro's kernel packages. It's the usb_serial_simple module in this case. If you rmmod the usb_serial_simple module, it will get loaded again automatically when you plug the device in. You could blacklist the usb_serial_simple module (see modprobe.d(5) for details), but that would also prevent the module being loaded for some other simple USB serial devices. It is the easiest fix though. UDEV rules could be added to run a commands "unbind" the device from the hp4x driver and "bind" it to the desired driver (hid-generic, I think?). It's way past my bedtime, and this is completely untested, but try adding a UDEV rule along the lines of this: Code:
You may need to play around with it a bit. It assumes the hid-generic module is already loaded. Note the serial driver is still registered as "hp4x" for this device, even though it is now handled by the "usb_serial_simple" module. — Ian Abbott |
|||
11-28-2019, 12:43 AM
(This post was last modified: 11-28-2019 12:43 AM by JoJo1973.)
Post: #34
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
I've expanded and cleaned up the wiki article on Assembly-like instructions and also added a couple of example programs to show some of the possibilities of the instruction set.
Disclaimer: info on the page is based on the code publicly released by Claudio: there could be mistakes about my understanding of it, and more over the code is still in a flux. YMMV! |
|||
11-28-2019, 04:20 AM
Post: #35
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
Nicely done, JoJo! There was one example you gave that made me sit up and take notice, even as a diehard RPL user - GET'ting an element from a composite far up the stack. Handy!
|
|||
11-28-2019, 05:17 AM
Post: #36
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
(11-28-2019 12:43 AM)JoJo1973 Wrote: I've expanded and cleaned up the wiki article on Assembly-like instructions and also added a couple of example programs to show some of the possibilities of the instruction set. Thanks! This is way better than what I wrote. I like the formatting, it makes everything more readable. I did notice a couple of minor things in the examples that don't work that way, but I'll correct them as soon as I have a few minutes. I like your examples with deeply intertwined RPL and assembly, it shows how everything works together. Nice to see somebody with actual writing skills helping with the documentation! |
|||
11-28-2019, 10:46 AM
Post: #37
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
Thanks! I would have liked to add a third example about :LOOP but didn't come with an idea: I want to avoid usual factorial and Fibonacci examples...
|
|||
11-28-2019, 07:22 PM
Post: #38
|
|||
|
|||
RE: [newRPL] interested in RPN mode? | |||
01-07-2020, 08:02 PM
Post: #39
|
|||
|
|||
RE: [newRPL] interested in RPN mode?
Something related
With the Reverse Polish Notation RPN engine, is it easy to create a third PN (postfix notation) mode? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 11 Guest(s)