[Solved] No data from nodes after reboot

11 replies [Last post]
mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012

I have no data coming through the jeenodes, or the other receiver nodes.

I can see the data from the nodes via xap-serial and I know plugboard is running as I can still control the dim level on my lights via a plugboard script but I see no data being parsed by the jeenode, current cost, or weather station applets.

Any pointers to what I should be looking at? I've got a little rusty on this.

Data showing via xap-serial

xap-header

{

v=12

hop=1

uid=FF00D500

class=Serial.Comms

source=dbzoo.beaglebone.Serial

}

Serial.Received

{

port=/dev/ttyUSB2

data=OK 8 0 0 206 0

}

 

Oh and hello everybody, not been on for a while

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Hi Mark,has your usb2 / usb1

Hi Mark,

has your usb2 / usb1 been switched round?  I had this a lot when I moved to the pi.

I had to fix the adresses somehow, can't remember quite how just now. If this is your problem I'll find out how I did it!

 

garry

brett
Offline
Providence, United States
Joined: 9 Jan 2010
And your jeeNodeApplet.lua is

And your jeeNodeApplet.lua is listening for this xap-serial data originating from this location?

function init()
   monitor({ target="dbzoo.beaglebone.Serial", port="/dev/ttyUSB2" },
...

[ If the plugboard script and xap-serial are on the same host you can omit the target="" param and the lua code will figure this out for itself ]

ref: /usr/share/lua/5.1/xap/jeenode.lua

   if target == nil then
      -- Target an xap-serial on the host we are running on.
      target = xap.buildXapAddress{instance="serial"}
   end

I presume so as xap-serial would not have opened its comms channel otherwise.
Plugboard tells xap-serial to do this via the monitor(.... defn you see above.

Is plugboard running it didn't crash out did it?
See /var/log/xap-plugboard.log for a reason why if it did.

Best to debug before you reboot as these files would all be lost on reboot.

Brett

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
Thanks Brett & Garry

Thanks Brett & Gary

Plugboard is running fine as I still have LCD output (with no data) and can control lighting.

I think I may have got an update via SVN a while back and it's not been rebooted in months. As far as I can see the data according to xf viewer the USB ports are all in the right order still, they tend not to move if nothing is physically plugged/unplugged.

It seems like the filters are never triggering which would indicate a miss match with ports like you suggest but I see no problems here either but here is a packet from xf viewer...

xap-header

{

v=12

hop=1

uid=FF00D500

class=Serial.Comms

source=dbzoo.beaglebone.Serial

}

Serial.Received

{

port=/dev/ttyUSB0

data=CC:Tx:2012:548:END

}

...and here is the associated filter...

    f = xap.Filter()

    f:add("xap-header","source","dbzoo.beaglebone.serial")

    f:add("serial.received","port",port)

    f:callback(update)

I wonder if it is a case issue e.g. looking for dbzoo.beaglebone.serial and seeing dbzoo.beaglebone.Serial

I have a backup that I can restore, so I may try that. My BB shows firmware 313 but latest is 316

 

UPDATE : It seems it is an issue with text case in the filters :

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Good you got it sorted!as for

Good you got it sorted!

as for port addressing, I hear what your saying about unplugging but certainly on the pi I found them to switch just on reboot sometimes. They generally tended to be consistent about 90% of the time but would just switch every now and then and confuse the hell out of me.

 

anyhow, your all sorted now and good to have you back.. Must be the dark nights bringing everyone back on board :)

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
All sorted

I had to edit the filters in my CC and weather station scripts and modify jeenode.lua filter too, maybe I should do a full update. If only I could find my notes on how to do this :)

The problem is not helped by the BB running so well for so long leading me to forget more than I thought I knew.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
The filters should be case

The filters should be case insensitive.  I will look but that code has not changed for a very long time.

Brett

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
Firmware 313

Like I said Brett, I'm still on 313 but may have tried a partial update a few months ago. The BBB has been so stable for so long that I can't quite remember what to do but picking it up quickly

brett
Offline
Providence, United States
Joined: 9 Jan 2010
I caused a regression in the

I caused a regression in the last change that I did to the portable branch when I added support for the graphite applet.   This means that xap sections where not having their keys stored and access case insensitive.

The graphite applet truely does rock if you've not played with Graphite yet check it out

http://www.dbzoo.com/livebox/graphite

Brett

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
Update done

I've succesfully updated portable .Thanks for the help

brett
Offline
Providence, United States
Joined: 9 Jan 2010
As my livebox power supply

As my livebox power supply died I had to move everything to my beaglebone and in doing so I found their was indeed a bug with the filters in that they where not being case insensitive as they should have been.  This same problem is in the livebox code too.   I've push the changes for the portable release and will correct the livebox build in due course.

This happened when I made a change to allow the xap packets to be stored in their original case sensitive form and to make their accesses case-insensitive.

Brett

aivo
Offline
Tallinn, Estonia
Joined: 2 Mar 2011
udev rules to help

Hi Garry, Mark,

Not a linux guru here .. but when had similar issues with usb ports getting reordered found that udev rules can help out in such case.  One can (re)name devices almost as you like.  Newer/better approach seems to be adding symlink with extra name - linking to usual kernel devices like ttyUSB1.  These (descriptive?) link names you then can use in configuration instead, e.g. /dev/ttyUSBcc for Current Cost.

Below /etc/udev/rules.d/hah-usb.rules from my hah Pi for inspiration.

Br, Aivo



SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyUSBcc"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A601F4R3", SYMLINK+="ttyUSBjn"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A9014XUE", SYMLINK+="ttyUSBjl"

Hardware Info