RaspberryPi + LinkMeter blue sky discussion


 
Holy crap that's awesome! Simple, elegant solution to the SD card sticking out. Like $2 worth of parts too if someone wanted to make their own.
 
Hopefully the changes I made this weekend will greatly increase the compatibility with SD cards of all shapes and sizes. We'll have to see if people report back.

Tonight I tracked down the issue causing the network subsystem to lock up when OpenWrt tries to up/down interfaces (which it does even if the interface is disabled), I'd like to post it here for posterity. The problem was that the wifi setup routines call `iw dev wlan0 del` which generates an ioctl through the cfg80211/nl80211 interface to delete the virtual interface (NL80211_CMD_DEL_INTERFACE). The issue was that the driver code called unregister_netdev(), which is valid because the net_device was in NETREG_REGISTERED state. However, unregister_netdev() attempts to acquire the RTNetlink critical section via rtnl_lock(). All ioctls appear to already acquire this lock, so the unregister just hangs and kills the entire network configuration subsystem. The solution is to only use unregister_netdevice(), which assumes the rtnl lock is already held, when called from an ioctl context. Oof.

The new problem now is trying to figure out what is actually[/] supposed to happen when the nl80211 system makes a call to delete the primary wireless (type 2) interface. I also need to spend some time fixing the interface startup because it doesn't declare all of its capabilities when in a "down" state, forcing OpenWrt to only initialize it with a very basic feature set. That's easy enough, but requires me to rebuild my driver patch set which is somewhat labor intensive. Let's hope I have a lot of conference calls tomorrow!
 
Wow, I missed a lot over the weekend. Finishing up soldering my testbed (parts came in today!) and I'll flash that new image on my previously busted sd cards and report back on how they work.

... hours later ...

The baby has been kind to me tonight. I got my dev board soldered the rest of the way up.

Confirmed My Sandisk 2gb Class 4 card works fine with the new image, as does the PNY LX Serieds 8GB Class 10 :p

Well done bryan!! I would venture to say at this point the list of sd cards on embedded linux wiki is probably pretty close to what will work with HeatermeterPi.
 
Last edited:
It's pretty quiet in here so I'll post an update!

-- The SD card compatibility does seem to be much improved. I've had no errors since Sunday on any of my cards.
-- Thanks to Evan pointing it out, I've fixed the shadow password problem that make the web interface always think you don't have a password, even if you do. I've pushed it upstream and it should be in mainline LuCI at some point.
-- The libiwinfo problems with signal numbers not matching up depending on which page you're on, the maintainer has asked for a patch to rewrite the handling for nl80211. So that should be fixed soon.
-- I've had 6 serial checksum errors since Sunday at 38400 baud. I pushed the checksum code to the LinkMeter and guess what? Well it gets serial errors too! I'll be lowering the default serial baud on all platforms.
-- I added the ability to push debug messages from the HeaterMeter to the web browser's Javascript Console. Just a handy debugging feature for me but actually integrates well into the Server-Sent events infrastructure in linkmeterd.
 
I got my v4.0.3 PCBs from OSHPark today and I am pleased to say that they are electrically good to go.


There are a handful of minor silkscreen issues that I've corrected and I'll push up to github tomorrow and then publish cam output on my website. The only real possible issue is that the composite out RCA jack fits really tightly against the 5V supply board.


There's really not any other space to put the power board, but I modified the pin positions to give it 0.02" more space which is about much as I am comfortable with moving it without it bumping into the fan connector. I've modified one of my rPi and removed the jack altogether, which makes everything just fit together perfectly. The jack is sort of spring fit into the holes, so if I need it I can just insert it temporarily. So hardware looks set.

Back on the software side, there are still a couple of big convenience issues to work out with the wireless, namely: virtual interface deletion and scanning. These problems I have no estimate on how long it will take to fix them. The wifi works great, you've just got to do some file editing to get up and running.
 
Is the file editing any more difficult that what we do today on LM? I always have to setup the wifi by editing the config files directly.
dave


Back on the software side, there are still a couple of big convenience issues to work out with the wireless, namely: virtual interface deletion and scanning. These problems I have no estimate on how long it will take to fix them. The wifi works great, you've just got to do some file editing to get up and running.
 
Nope exact same thing, add a wwan section to /etc/config/network and then set your parameters in /etc/config/wireless. Once you have it up and running in station (client) encrypted mode, you can use the web interface to change or connect another wifi network, it is just the scan returns no results if the wpa_supplicant isn't running. I haven't tried bridging the ethernet and the wireless though beyond a single failed attempt.
 
Well I don't need another HM, but this is very very tempting. Looks like I'm going to have to order a rPi and wireless dongle :)

I'll send give my current HM to someone else.

dave

Nope exact same thing, add a wwan section to /etc/config/network and then set your parameters in /etc/config/wireless. Once you have it up and running in station (client) encrypted mode, you can use the web interface to change or connect another wifi network, it is just the scan returns no results if the wpa_supplicant isn't running. I haven't tried bridging the ethernet and the wireless though beyond a single failed attempt.
 
I have 3 HM with a boat load of dead Routers lol. To many to count.

Im going to the rPi, when all the bugs are worked out. I have the Pi and I have not even plugged it in yet
 
Actually I spent most of today familiarizing myself with Inkscape and Ponoko hoping to have a try at making a laser cut case. Even with all the measurements for the rPi available it is still quite difficult to get it all lined up with the HeaterMeter too and the fact that it is mounted upside down makes it even more fun. That said, I believe it is pretty close.


Unfortunately it just doesn't fit on their "P1" material so looks like I'm going to have to use a P2. Making 2x P1s costs the same as 1x P2 and the P2 is 4x the area which is great because hey you can make 2 cases for ~$15+tax/shipping but golly I can't make enough prototype variations to fill the space.
 
Looking good. I am hoping to make a box for the fan that is somewhat weatherproof, maybe something like that would be a good thing to fill the rest of the case material with. That looks like quite the mess you ended up with :p
 
Any possibility of dedicating an Arduino output for driving a damper solenoid for HM v4? I can see the possibilities with a 3d printed fan mount/automated damper.... - need 3 lines, grnd, fan and solenoid...
 
Last edited:

 

Back
Top