LowPowerLab Forum

Hardware support => Projects => Topic started by: cootcraig on March 07, 2014, 12:59:42 AM

Title: Coot's Raspberry Pi Gateway Trek (running on JDK 1.8.0-b129)
Post by: cootcraig on March 07, 2014, 12:59:42 AM
Nothing useful yet, but the demo is promising so far.  Here is
where I'm keeping my proof of concept project.  There is a
readme with some notes.

https://github.com/CootCraig/reel_https_auth_websock (https://github.com/CootCraig/reel_https_auth_websock)

This shows the Java and JRuby versions used.

$ jruby -v
jruby 1.7.11 (1.9.3p392) 2014-02-24 86339bb on Java HotSpot(TM) Client VM 1.8.0-b129 +indy [linux-arm]

As of now, https://1.2.3.4:4430/ just says hello.  I'm easily excited though.
Title: Re: Coot's Raspberry Pi Gateway Trek - Pi setup
Post by: cootcraig on March 07, 2014, 01:05:56 AM
Notes on setting up the Raspberry Pi are on my blog here.

http://www.coot.net/blog/2014/03/raspbian-netinst/ (http://www.coot.net/blog/2014/03/raspbian-netinst/)
Title: Re: Coot's Raspberry Pi Gateway Trek (running on JDK 1.8.0-b129)
Post by: cootcraig on March 08, 2014, 10:39:49 AM
Quote from: cootcraig on March 07, 2014, 12:59:42 AM
https://github.com/CootCraig/reel_https_auth_websock (https://github.com/CootCraig/reel_https_auth_websock)

This shows the Java and JRuby versions used.

$ jruby -v
jruby 1.7.11 (1.9.3p392) 2014-02-24 86339bb on Java HotSpot(TM) Client VM 1.8.0-b129 +indy [linux-arm]

I just kicked off on Rpi a version with:

* https
* cookie based authentication
* login page presented if cookie auth fails
* server time updated on websocket.

I will let this run a while and check cpu and memory usage.

Next up will be interacting with a directly connected Arduino.

Title: Re: Coot's Raspberry Pi Gateway Trek (running on JDK 1.8.0-b129)
Post by: cootcraig on March 08, 2014, 10:46:59 AM
Quote from: cootcraig on March 08, 2014, 10:39:49 AM
Next up will be interacting with a directly connected Arduino.

I want to add these functions to the non Arduino version.

* Have the HTTP server start at boot time.
* Output the server times on both websockets and a zeromq pub socket.
Title: Ready to order some Moteinos!
Post by: cootcraig on March 12, 2014, 01:15:41 PM
I have my proof of concept working so I will order some Moteinos
and expand this out to a remote Moteino.

Highlights

* HTTPS server requires user/password login. login stored in cookie
* Arduino sends messages to Serial on a timer
* Web page shows Arduino Serial messages live with a websocket
* Web page can send message to Arduino Serial that changes the Arduino output
* Using udev rule to create ttyUSB link /dev/Diavolino
* Using Socat to wrap /dev/Diavolino in TCP

HTTPS gateway using Java here:

https://github.com/CootCraig/pi_arduino_io_1 (https://github.com/CootCraig/pi_arduino_io_1)

Arduino sketch is here:

https://github.com/CootCraig/pi_arduino_io_1/blob/master/sketchbook/timer_echo/timer_echo.ino (https://github.com/CootCraig/pi_arduino_io_1/blob/master/sketchbook/timer_echo/timer_echo.ino)
Title: Re: Coot's Raspberry Pi Gateway Trek (running on JDK 1.8.0-b129)
Post by: labusr on March 17, 2014, 12:27:05 PM
Hi Craig,
How's the project going?  I'm trying to do a similar thing, following along with Felix's Raspberry Pi gateway example.  I kinda got stuck with the socket.io.  I'm not much of a linux user, basically just copy and pasting what I see with some goggling when I run into trouble.

Is it bad form to ask for SD card images?  I'm looking for a RPi + Arduino solution for wireless sensor network, but it's been slow going trying to get the socket.io and all that other webserver stuff going.