Translate

Showing posts with label wifi. Show all posts
Showing posts with label wifi. Show all posts

Saturday, February 3, 2024

Pimoroni Badger 2040 - quick intro

To have some fun I did buy a couple of gadgets from Pimoroni, electronic badges with a 2.9 inch eInk display.
There are two flavor of the board, one basic (Badger 2400)  and one with connectivity (WiFi - Badger 2400W).
A nice way to start to play with the Pico series from Raspberry.

Sunday, June 12, 2022

Chamberlain Garage Monitor repair


As usual I love to go exploring in flea market/antique malls.
Last time I did find a new Chamberlain Garage Control
Of course the unit ended up in the flea market because not working.


Saturday, April 20, 2019

HVAC connections

The "new" thermostat found in an antique mall


In an antique mall I did find a new (well, not really new) WiFi thermostat from Honeywell (Lyric T5), so I decided to change the current one I have at home ( a quite basic and simple one).


I think there is a "right way" to do things, so even for a trivial work like changing a thermostat, I find useful to document and explain what doing and why.


Saturday, March 23, 2019

Set up a Huzzah32 IoT client - testing



Using an IoT approach for the fHelper can helps to evaluate the measurements done more easily, using the MQTT protocol.

We need a server capable to receive the measurements from the fHelper sensor (client) and eventually work on the received data.
And of course we need a client/sensor capable to send the humidity level to the server.

See the article about the MQTT/Node-Red server about the preparation of an IoT server on a Raspberry Pi.
This article is about how to quick set up an IoT client for fHelper in order to run some feasibility tests on the sensor and its response.
Basically the idea is to evaluate if the system is reliable enough for the purpose.

Saturday, March 2, 2019

Huzzah32 - start to play with

Huzzah32

Adafruit has many nice platforms to start to create embedded devices.
This article would help to start to play with this platform.


One of them is called Huzzah32, member of the Feather family.
The Huzzah32 is based on a dual-core ESP32 chip, 4 MB of SPI Flash, and tuned antenna since it has both WiFi and Bluetooth Classic/LE support plus some GPIO ports, I2C and SPI capabilities.

Saturday, September 24, 2016

Playing with Alexa

It is amazing how time's fly !
Are already almost two months since my last post !

Many things happened of course, busy life, work work work and only recently I restarted to play with something new, for fun.

Amazon made public a demo project to use a Raspberry Pi to be like an Echo, the Amazon  vocal command toy.
So I decided to try, I did put my hands on a Raspberry Pi 3 (in order to have embedded WiFi and Bluetooth), a nice USB microphone and a speaker (as suggested in the Amazon project) and one evening, with a friend, we followed the instructions and installed Alexa on a Raspberry.

Here few notes about

Time


It took about 4 hours to install everything. The longest time was spent updating Raspbian, probably the update alone was about 1 hour and half.
The installation of tools and environment (the project is in Java, uses Node.js and Maven) took the other long part and the configuration the rest.
And yes, we did enjoy ourself watching Youtube (comedians) while waiting :)


Is it working ?


YES ! Amazingly it did work immediately and all considered is not bad at all !
It is possible to hear some static/digital noise in the speaker, especially if a monitor and USB keyboard is connected to the Raspberry, but the audio quality is not bad.

Let see some pro and cons

Pro


  • Relatively cheap
    A Raspberry Pi, a speaker and a microphone is what is needed. Many of us have this stuff in some box by sure :)
  • Easy to install
    The instructions are quite clear, some not updated to the last version parts but for somebody who plays with Raspberry or somebody with a basic computer science knowledge is not a problem.
  • It works
    Well yes, is a pro :)

Cons

  • You need an Amazon account. No problem for me but is important to realize that Alexa become a part of the Amazon account.
  • Is not an Echo !
    This is important !! The project is a demo and has some not intuitive/cumbersome way to activate Alexa, so don't expect Echo performances !
    In details :
    • A X11 graphic environment is needed ! Specifically they suggest to use VNC in order to connect from other computers.
      Is not a real embedded system like Echo.
    • Everytime the Raspberry is turned On is necessary to open terminals and start a local server plus a client.
    • When the client starts it is requested an https connection to retrieve a certificate.
      A browser is needed thus plus some manual operations.
      Once retrieved the certificate Echo works until the Raspberry is shutted off or the application is stopped
    • Some functionalities are disabled by default, like streaming music.
      Need to investigate if is possible to enable them.

Capabilities

So far I tried different things. The default of course is asking Alexa things like the time, the weather, news, etc.
And I have to say I'm impressed with the capability to recognize my accent !
I tried many vocal command systems in the past and all of them, ALL OF THEM, always failed to recognize my English.
I estimate for Alexa a recognizing average of 90/95% of what I say !
Simply amazing !!

Then I was able to interface Alexa with my google calendar and now I can handle it via voice. Cool.
Another interface was with IFTTT, so I can now create different triggers. So far I installed a trigger to call my cell phone.

So .. what is for ?


Fun ! :)
And is a relatively cheap way to test the capabilities of Echo.
I'll investigate few things in the next week or months (no time as usual ..) to see if is possible to modify the code to build something more close to the real Echo with maybe some custom capabilities. 

For example connecting a bluetooth microphone, controlling I/O, interfacing something personal like my Logitech Squeezebox, enabling the streaming music, connecting a bluetooth speaker and so on.

Surely the evaluation aspect of this project is worth alone the time spent to put together the gadget and playing with it

Sunday, August 12, 2012

Set up WiFi monitor with Wireshark

Sometimes is necessary to be able to see the traffic generated, or directed to, a WiFi appliance.
There are many possible ways to capture packets from a WiFi appliance, especially if the appliance allows to install packet capture applications.
However not always such thing is possible and considered the nature of the WiFI appliance, it can change the performances.
This article describes how I did set up an external monitor for the traffic to and from a WiFi appliance.

Basics


The idea is to put a computer running wireshark between the router WiFi and the rest of the network.
The main constraint is to have a WiFi router SEPARATED by the rest of the network.
This a graphic representing the  setting :



The key part is a laptop with two NIC cards. In my case the laptop is running Kubuntu 12.04

Shopping list

It is needed :
 
  • 1 laptop with Linux installed, with two ethernet ports
  • 1 PCMCA NIC if the laptop has already an embedded NIC
  • bridge utilities
  • Wireshark 

The environment 

The machine used to build the monitor is a Gateway Tablet running Kubuntu 12.04, plus a LinkSys PCMCA NIC card.
The first step, recognizing the extra NIC card, should not pose any problem.
In my case the LinkSys NIC was recognized and configured automatically by the OS as eth1.
The next step is to install Wireshark from the Kubuntu repository, and enabled it to capture packets from eth0 or eth1.


Bridge setting

After preparing the hardware and tested both the ethx ports, it is necessary to set up the machine to act as a bridge, in order to have packets received from the eth0 port sent to the eth1 port, and viceversa.
Without such functionality, the two networks are isolated, i.e. the phone can not receive anything from the network.

In order to simplify the configuration, I forced on both the NIC a manual address.


  • 192.168.2.71
    for the eth0 
  • 192.168.2.72
    for the eth1. 

After opening a terminal, I installed the brctl program (sudo apt-get install bridge-utils).
The bridge-utils are not installed by default in the Kubuntu 12.04 but are available in the repository.
At this point I created, configured and activated a bridge between the two NICs.


  • sudo brctl addbr wshark
    Creates a new bridge called wshark 
  • sudo brctl addif wshark eth0
    Adds the eth0 to the wshark bridge 
  • sudo brctl addif wshark eth1
    Adds the eth1 to the wshark bridge 
  • sudo brctl stp wshark on
    Enables the STP 


After creating the bridge, it has to be activated.
To do so, simply use the ifconfig command :

sudo ifconfig wshark up

At this point the bridge should be working.
Note that after issuing these commands the eth0 and eth1 are not accessible anymore.
It is convenient to create a script with all the above commands to simplify the setting of the system.


Running Wireshark


After the bridge is activated is possible to run Wireshark.

Among the available interfaces to use to capture traffic, it will be present a wshark interface that is the bridge.

To capture data transiting the two inetrfaces, just choose that one.