For work and sandbox reasons I’m back into node.js reading. I had bought a paper (used) copy ofNode.js in Practice from Amazon. I found it to be more of a cookbook and less the walk-through I currently need. I’ve since started reading Web Development with Node and Express on my Kindle and found it to be much more helpful. I expect that the other book will be more useful once I’m up to speed and looking for more focused solutions.
Node is still looking like a great solution for quick and easy web UI access to systems that support it (QNX seems like one exception…probably because of V8 support).
I’ve been doing my Linux work on either VMs or my RPi-3 lately. The node stuff is pushing me back towards getting an Intel based, free-standing Linux box online again. Last night was rather disappointing as I powered up my spare, stable old core-2 box with the intention of pulling the windows boot drive out (drive trays) and slotting in a spare drive to load Ubuntu on. The system failed to come up and then died so as to crowbar the supply. I tried a spare supply (to make sure I wasn’t having power supply issues) and got the same result.
At the moment that machine is fully torn down to the bare motherboard with CPU in and it still isn’t behaving. I’ll likely give it one more try tonight or tomorrow night (relatively low mileage motherboard so shouldn’t have problems) and see if there’s a screw causing a short or something.
If that fails, I’ll likely take the back basement work bench system (madhatter) as my linux system and plan on bringing up a relatively cheap core-i5 system when that area gets cleaned up enough to be useful. I should have a M3D Pro 3D printer coming soon from the kickstarter I funded and if this happens I’ll likely put that together in the back area with the new system hardware. Looks like motherboard, memory and CPU can be had for $300 to $400 so not too bad. Still hoping that the core-2 system can be recovered though.
For reasons I still don’t entirely understand, XRDP started working properly last night. So far it meets my needs (full screen sizes and ease of use) so I’ll likely be getting on with things and shelve the VNC issues.
I expect that there is a way to make VNC behave as 640×480 isn’t a very useful resolution. My next likely step would be to try tight VNC as the pre-installed VNC version (real?) seems to come fro a very commercially oriented site and I could readily believe that their shipping (free) version is intentionally crippled. This is further suggested as open source clients don’t seem to be compatible with the real VNC server (no compatible security contexts).
Looks like that is the case. The realvnc FAQ shows that adjustable screen sizes for headless systems are only available on their enterprise subscription version. I’ll have to find out how to disable their version and replace it with a real open source version sometime soon.
I’ve been trying to get my pi-3 setup so that I can run it headless and still fully control it. I’ve found that the pi support node with opens up many possibilities for using it for prototyping work.
After moving it off the guest WiFi (easy oops but no in-house access) and making sure it has a valid IPv4 address I had to find the default username and password (pi and raspberry). Changed the password but I’m not yet ready to add an account (sudoers list and other such isn’t something I want to struggle with at the moment).
Enabled SSH and that seems to be working normally now. I used the text GUI to get this working. I still need to generate a key pair and load the public key onto the pi for convenience.
I’m still working on getting desktop access up and running. I enabled the default VNC server that comes with the pi (realvnc I think). I can connect using the realvnc viewer. So far if I have a display connected this works reasonably. If I run headless then the screen size defaults to 640×480 which is effectively unusable.
I’ve seen suggestions of using the xrandr command on the target. That runs but the only resolution that is supported seems to be 640×480.
I’ve been trying to install tighvnc instead but have been getting fetch errors. Not sure whether I need to add repositories or tightvnc may not be supported on the ARM. We’ll see…
I went looking for up to date, self-hosted HTTP support for .NET code and it took me (after a few digressions into older solutions) to Owin which I had, curiously enough, run into by name elsewhere recently. It looks like a decent solution with katana as the project name for the open source Microsoft implementation.
The TLS support is a bit odd at first look as it doesn’t seem to directly involve the code as seen here and here . It looks as if the TLS overlay is provided outbound from the hosting application. I’ll have to look into the details later but I expect that this will be more than adequate for my purposes.
I suspect I’ll wind up creating my own local trusted root cert and installing it on my home machines. That should allow me to generate valid-ish TLS certs for local testing that look like the real thing. I’d rather have TLS on the RESTful connections as I’d much rather build this as if it were a real thing that would need to survive in the wild.
More stuff to play with as I move this forward. I’m expecting to build the machinery in one or more assemblies and then bolt them into appropriate host frames for execution. This should allow me to test as local code but then run that same code as a service once it is tested and ready.
My copy of Angular 2 Development with Typescript came in from Amazon. It is looking as if my user interface to the file manager may very well use a web interface. Angular 2 seems like a popular choice for that and I have work reasons for familiarizing myself with Angular.
I was thinking of either going with a web interface or with a UI tool that used WPF. Given that this is a sandbox project and the popularity of web based UI these days, I’m expecting that web will win.
I’m thinking of running the main scanner piece as a service under windows, talking to the MySQL database back-end. This suggests that I need to figure out how to expose RESTful API functions from a .NET service and then how I want to implement the UI front end.
Node seems like an interesting possibility. Let the node server talk to the RESTful interfaces and then present an Angular 2 based UI on the other end. I’d expect ASP.NET to be another possibility under windows. I’m inclined towards node (at least as a first pass) because it is more portable and would seem to have wider applicability in the embedded space where I play these days. Lots left to figure out here.
I do need to put the rubber to the road this weekend and get the create table statements for my database sketched out and executed. Can’t really start coding until there’s somewhere for the results to go. Most of the heavy lifting is done on that front…just need to type out the SQL and feed it to the DB server (and then hash out any mistakes made along the way).
Finding myself nuking and recloning alot. I’ve tended to use GIt just for local repo stuff (and rather focused work at Amazon). Now the GIT repo I’m interacting with is much richer…going to have to up my GIT game to manage things without too much messing about. Merge failures in large pulls get lost too easily…I expect there is a command that can point them out to me…got to find it…
Add in cloning from a specified branch (cloning from the default branch and then pulling the required branch isn’t a great idea).
For some time I’ve been wondering about micro-stepping. It would seem that if you stop at a microstep position that you’re going to either be PWM-ing the windings or driving them in the linear region of the drive transistors. In either case I’d think the power dissipation in the drive devices would be substantially elevated. Add in the reduced holding torque from partially driving the relevant windings and it has seemed like a bad idea.
I just recently read an article that suggested that the main value from microstepping is smoother motion (and at least implied that you’d generally not want to stop unless you were at a full or half step location. That I can buy…you’ll not be spending extended amounts of time in the linear region of the drive transistors. You effectively approximate a smooth hand-off between windings and use gear ratio to manage increased resolution (of higher torque) as needed.
According to the register Oracle has begun shaking down companies that use Java for some rather steep fees. It appears that they slipped bits of less than free code into the various packages they’re distributing and are now targeting companies that have managed to step on the click-through license terms for serious cash.
I can’t say I’m at all surprised…Larry’s folks have made if clear that they intended to monetize Java since they bought Sun. Given Oracle’s rather predatory and underhanded past exploits, this approach seems in line with what could have been expected. Continue reading This may put a crimp in the Java shops out there…→
Pulling in some open source common lisp source trees. Not sure whether windows or linux is a better target but for now I’m mostly running windows so I’ll start there.
Quite a few options to choose from. I’ll probably poke at a few of them before I’m done. Currently seems to break out between:
Common Lisp running on various back-ends. Attractive because this seems to be the most ‘mainstream lisp’ style. Seems to be sort of a super-set of everything that has gone into the list world pretty much ever.
Clojure as a JVM based, functional programming oriented version of the language. Seems to be well supported and popular but I suspect that it has diverged significantly from its lisp origins. This was more attractive when I was working fro Amazon Robotics and everything I was doing professionally ran on the JVM. Still a nice language package…
Scheme appears to have been the first consistently lexically scoped lisp implementation. It seems to be in the process of forking into a slim, simple version channeling its roots as a teaching language and a bulkier but more capable language aiming more at the place the common lisps play.
I expect that these will keep me occupied through the end of the weekend (partly putting off diving deep into formally writing the DDL for my sandbox project’s schema) and perhaps even have one or two environments up and running.
One thing that I’m wondering about is the suggestion I’ve seen in several sites that common lisp code gets distributed as a ‘live’ workspace. I’ve become very used to the idea that there is a source code set that builds any particular version of the code being put together. I expect to have a bit of a struggle if lisp means adapting to a world where you can’t exactly rebuild your workspace from source without significant effort. More playing with these languages should tell me whether this impression is accurate.
Spending some time improving my SQL with a focus on MySQL and the file archive management tool I’ve been framing up.
I looked at SQL Server Express but given I’m more familiar with MySQL and there are limitations on SQL Server Express that might eventually bite I’,m sticking with the open source tool. SQLite looked interesting as well but a full featured server engine seems like a better idea for this piece of work.
I’m currently trying to work through the initial schema for the database. Looking at tables and relationships. This is significantly more complex than SQL layouts I’ve designed from the ground up and I’m doing the whole job here. Should be interesting.
Once I have the schema sketched out and have figured out how best to define the tables and relations I’ll be moving on to get some coding in. I expect to build most of the machinery into one or more C# DLLs with the UI in a separate assembly (not sure currently but probably WPF initially). I’ll likely have a side-car native DLL to handle things like volume serial numbers that aren’t directly accessible from C#.
Engineering execution and creativity mixed for the best results…