From: George C. <ge...@fe...> - 2014-03-09 20:33:44
|
Hi Lieven, Great! Thanks. I guess I'm very unlucky, as I tried a 2nd time as well with mharduino ... another 9 character name. I really appreciate you taking the time to look at this. I was beginning to question my sanity. I (obviously) never gave a thought to the length of the name. I'll get on putting this together over the next few days. I've still been ruminating a bit on it but I figure eventually I'll implement: - A status command which will return all of the current pin states - A trigger event that states the board has been initialized, and needs configuration - Digital pins: Trigger events - returning on/off whenever it changes - Analog pins: Trigger event when threshold passed, up or down, with some hysteresis - Or if no threshold set, then send a trigger when value changes by some amount For now I'll just configure it in the xpl-perl driver. But accepting xpl config commands might be better: - set each pin as: input, input w/ pull-up, output or analog output (PCM) - set an initial or "normal" state for each digital pin. - set a trigger level for an analog input pin. And I still need to think a bit more, but I'm wondering if there should be an ACK / resend function of some sort. Considering that UDP is unreliable, it might make sense to repeat a status message. Thanks again, George On 03/09/2014 03:33 PM, Lieven Hollevoet wrote: > Hey George, > > Found it! Actually, the problem is the name you selected for the Dock module. > > By definition (in the xPL standard) a device ID cannot be longer than 8 characters. In xpl-perl, the device_id is automatically deducted from the module name. ‘jeenodes2’ is 9 characters long. Hence the ‘device_id invalid’ error message you get. > > Try it with a shorter module name and it should work. I have an example branch checked in that you can start from (aptly called the module ‘gcduino’ :-). > > You can find it here: > https://github.com/hollie/xpl-perl/tree/new_module > > I have made the error message a bit more verbose to tell people more clearly what is wrong (see commit fc019c83cd8f140afa7ded1870f3f3c8babc9629). > > Kind regards, > Lieven. > > Op 7-mrt.-2014, om 05:01 heeft George Clark <ge...@fe...> het volgende geschreven: > >> Hi Lieven, >> >> Well if nothing else I'm getting consistent results. This time, >> debian wheezy. >> >> Anyway, I really appreciate you looking at this. I must be missing >> something really fundamental, but darned if I can figure out what it >> is. No hurry at all. >> >> Here is a complete log of what I've done. >> >> git clone git://github.com/hollie/xpl-perl.git xpl-perl >> cd xpl-perl/ >> perl Makefile.PL >> (found missing dependencies) >> sudo apt-get install libdevice-serialport-perl >> sudo apt-get install libdigest-crc-perl >> sudo apt-get install libanyevent-perl >> perl Makefile.PL >> make >> export PERL5LIB=/home/gac/testing/xpl-perl/lib >> perl bin/xpl-jeenodes >> The --device parameter is required >> or the value can be given as a command line argument >> >> >> So far looks good. xpl-jeenodes reported --device parameter missing, >> and gave expected help. Using the export PERL5LIB avoids the need to >> install. I really don't want to install on my production box. On my >> test system I did do the make install into the local perlbrew. >> >> Now I clone jeenodes to jeenodes2. >> - Add 2 files to MANIFEST >> - Edit lib/xPL/Dock/Jeenodes2.pm to change the Package name >> - Edit bin/xpl-jeenodes2: to change: use xPL::Dock qw/Jeenodes2/ >> >> vi MANIFEST >> cp bin/xpl-jeenodes bin/xpl-jeenodes2 >> cp lib/xPL/Dock/Jeenodes.pm lib/xPL/Dock/Jeenodes2.pm >> vi lib/xPL/Dock/Jeenodes2.pm >> vi bin/xpl-jeenodes2 >> >> >> make clean >> perl Makefile.PL >> make >> >> gac@vm1: ~/testing/xpl-perl (master)$ perl bin/xpl-jeenodes --device foo >> xPL::IOHandler->device_open: TCP connect to 'foo:10001' failed: Invalid >> argument >> at /home/gac/testing/xpl-perl/lib/xPL/Dock/Jeenodes.pm line 78 >> >> gac@vm1: ~/testing/xpl-perl (master)$ perl bin/xpl-jeenodes2 --device foo >> xPL::Dock->new: device_id invalid >> at bin/xpl-jeenodes2 line 34 >> >> gac@vm1: ~/testing/xpl-perl (master)$ perl bin/xpl-jeenodes2 >> xPL::Dock->new: device_id invalid >> at bin/xpl-jeenodes2 line 34 >> >> >> Something still isn't making it down to the Client code, and I don't >> even get the help/usage info when --device is missing. >> >> George >> >> On 03/06/2014 06:23 AM, Lieven Hollevoet wrote: >>> Hey George, >>> >>> just to confirm you I’m using perlbrew and no root too, so that should not be the problem. >>> >>> I’ll see if I can reproduce what you experience. There must be something else missing but I can’t immediately determine what it is without trying it out. It will take a few days before I find time to do so. >>> >>> Kind regards, >>> Lieven. >>> >>> Op 5-mrt.-2014, om 17:08 heeft George Clark <ge...@fe...> het volgende geschreven: >>> >>>> Hi Lieven, >>>> >>>> No joy. I'm using perlbrew, if that makes a difference. I've gone >>>> ... |