π¬ Sensebender Gateway
-
Got this from one eBay seller when I asked why my order was delayed.
"I am so sorry for the dalay. because of National Day in China, we were from 30th sep to 5th October on vacation."
-
@tbowmo Hi! Very cool design, I especially like using of ARM microcontrollers. I have a lot of projects with SAMD20, and I want to give you a little advice for your future revision of your "Mysensors Gatevay". When I had problems with my devices work (there were crashes and hangs) I found the circuit of evaluation board called "SAM D20 Xplained Pro". After examining this circuit I saw that they apply more capacitors in the power supply than I. And I thought that use just one capacitor 100 nF not enough. So, I corrected the filtering circuit in my devices and everything worked perfectly. Below I'm showing the filtering scheme:
-
Thanks for the tip.. I took heavy inspiration from the arduino zero, which only has 100nF capacitors for decoupling.
I haven't seen any problems with stability on the prototype GW's that I have build, we also have 5 production sample GW's out in the wild, at a couple of the core group members, and I have not heard any problems from them either.
Anyways, I have noted it, and will take it into consideration if I/we decide to do a new revision of the schematic / layout.
-
@tbowmo said:
@kalina
I haven't seen any problems with stability on the prototype GW's that I have build...Of course, your device may work perfectly without additional capacitors. This is just my experience.
In my devices there are large number of impulse noises, because they contain FPGA... and one more interesting thing, I have compared two datasheets on SAMD20 and noticed that in new revision they have increased the VDDCORE capacitor from 100 nF to 1 uF
-
Is there any news about selling this PCB ?
-
As mentioned in the latest announcement, pre-sales have just opened up over at itead.cc, so head over there to order it
-
Is there an option for a WiFi connection?
-
You can have mysensors running natively on the esp8266, so we decided not to support WiFi on this gateway device.
-
I find it on Itead but no announcement on mysensors.org.
-
@Fabien do you mean the gateway? It is available on https://www.mysensors.org/hardware/sensebender-gateway
Where did you expect to find it? Maybe we need to update some documentation with a link?
-
Which exact RFM69 is the footprint for? Cause it says "RFM69HCW" in some places, and "RFM69HW" in others. The footprint looks a lot like HW (https://c1.staticflickr.com/1/563/20328459340_62fa380554_b.jpg).
-
@hek : strange, this afternoon I can't see it on "news history" !
-
I did some updates this afternoon (among them the news section).
We will continue updating the Sensebender Gateway article during the coming days.
-
Oh and another question, since I've never ordered anything from ITEAD before, how do they declare the customs value? Is it safe to order more than one gateway or should I order them one by one to be on the safe side? I'm talking about "SF E-Parcel" or "Registered Air Mail" of course, not TNT or DHL.
-
@bjornhallberg, I don't remember what the value was set to on the latest package from them.
Suggest you contact them here:
https://www.itead.cc/contact-us
-
@bjornhallberg they declare a very low customs value (for my last order only 12x0.89β¬ ...)
I juste order the gateway today.
-
I also just order my gateway
-
This is on my most wanted purchase list now.
FYI, I noticed the spelling of "Sensebender" is "Sensbender" for this gateway on openhardware.io, so you're breaking your brand name. Would it be possible to amend it? If you try to search for it with the original spelling you only find the two sensor Sensebenders.
-
Opps! Thanks for reporting @martinhjelmare.
-
This has been on my watch list for some time. Excellent work guys - I placed an order and looking forward upgrading my gateway.
-
Is this device capable of being a gateway for both nRF24L01+ radio and the Hope RF RFM69HCW radio simultaneously ?
I have some nRF24 nodes and see a lot of new goodies equiped with the RFM69 radio. One gateway to serve both would be excellent !
-
No, only one radio type or rs485 is possible at the moment.
-
The hardware supports both NRF and RFM69 at the same time, they share the same SPI bus, but has separate chip select lines etc.
Unfortunately the MySensors library doesn't support multiple transports, so this time it's the software that limits things.
-
Yes ! Itead send me the gateway today
-
@Fabien said in Sensebender Gateway:
Yes ! Itead send me the gateway today
I have got mine today. Very quick
-
@tbowmo
The fact, that MySensors doesn't support more then one radio, was the reason for me not to order the sensebender gateway.I am working on a gatewayβcontroller based on an arduino due, which supports at least up to 3 serial gateways via hardware serial. It handles ID and time (synced with ntp) requests and does pub/sub to mqtt with readable topics.(inspired by the old mqtt client gateway)
-
@FotoFieber this is a software limitation. Hardware wise I do not see why Sensebender GW cannot handle two (nrf24l01+ and rfm69/rfm95) GWs at the same time
-
@alexsh1
The question is: will the software restriction be solved? If not, I do not care if it is a software or a hardware restriction.
-
Well, you need to hack the core anyways, if you want to accomplish your goal.
You could also help out with the core development, so we can get support for multiple transport on one gateway
-
@tbowmo
No, I don't have to hack the core. I use the serial API. From an architectural point of view, I don't see the need to change anything in MySensors. A serial controller can be built for under 20β¬ Including the radio. Why should I add complexity to support more than one radio support with one cpu in MySensors, if I can have the functipnality with the abstraction layer of the serial API? Please keep MySensors s simple as possible.
-
@FotoFieber simple for who? Simplicity also involve maintenance and code complexity. What about testability and regression testing? Nobody gets paid for maintaining mysensors.
-
But you ditched the sensebender Gateway, as it doesn't support multiple radios at the same time? Now you are saying that you would keep it as one radio per gateway?
This doesn't make sense
-
@tbowmo
Maybe the design of the sensebender gateway doesn't make sense to my architectural viewpoint....
-
@FotoFieber This is a question for the MySensors dev team. Sensebender can handle both radios. Currently, there is a software restriction.
-
@FotoFieber No, you do have to hack the core if you want both radios to be handled properly, i.e. to handle message queues with corresponding radios. For example, sending a message is done via rfm69 only and not via nrf24l01+
-
The architecture we use would place this kind of situation to the controller to solve. One gw per network. So one gw for nrf and one for rfm.
HW is cheap, and library should be kept simple.
-
@Anticimex
One gateway per radio, that is what I think is best.What I try to do, is to implement a controller with arduino due for up to three serial gateways. If there would be a solution for ethernet&rfm69 I may not have invested time in this.
-
Well sensebender GW supports rfm69 with ethernet
-
@tbowmo
Yes, that is really nice.My other goal was to have a new MQTTClientGateway, as it existed with MySensors 1.1 (which is not only a gateway, but a controller too). It would have been really painful to add it to MySensors 2.1.x, as I would have to patch core files. It is much easier, to throw hardware at it.
-
@tbowmo More practical question. I have received the GW and it already has MySensors 2.1.0 software. Excellent service by Itead. Can you please help me how to map LEDs in the GW sketch? I can see that they are connected to pins 38, 41, 42, 39, 40 as LED1, LED2, LED3, LED4 and LED5. Thanks
-
you should be able to use LED_BLUE, LED_GREEN etc. defines (or even just LED_1, LED_2..) in your sketch, to access the different LED's on board the gateway. That is, if you are using the SenseBender GW hardware support files in arduino (installation instructions are here https://github.com/mysensors/ArduinoBoards)
Also, look at the board definition files, located here https://github.com/mysensors/ArduinoHwSAMD/blob/master/variants/mysensors_gw/variant.cpp
and here https://github.com/mysensors/ArduinoHwSAMD/blob/master/variants/mysensors_gw/variant.h
-
@tbowmo Excellent links, many thanks. BTW the board is working with the standard arduino samd, the problem I suppose comes with things LEDs.
-
You might be able to compile with the standard arduino zero BSP files. But the IO mapping is not the same at all.. I have swapped some pins to make routing a bit easier. Also the SPI channels are configured a bit differently than the standard arduino, if I remember right. So I will advise to use the mysensors gateway BSP files..
-
@tbowmo it is already done. Thanks to your link I have now Sensebender Gateway board added.
Waiting for an ethernet board now, it has stuck in the post
-
@tbowmo : Did you try to use this board with platformio ?
-
No, platformio is still on my bucketlist.. There is just not hours enough for everything
-
@tbowmo Ok I will install arduino IDE to upgrade it to 2.1.1
Please post here iwhen you have more information. I think I will try but I have no experience with this architecture.
-
Has anyone designed a case for the sensebender gateway ?
-
I designed one in freecad for the GW and a nrf24l01 with lna/pa and external antenna.
But I still have some fine tuning to do before releasing it, as the lid locking mechanism didn't turn out like expected.
-
Tea time..
Here is my custom box for your RFM69 Sensebender GW ! Beautiful board though
No nail no screw
Last final minor check and i release the files, sure! (i've done one for nrf too in case..)
-
@scalz beautiful box!!!
Looking forward to print it too as soon as you publish it, but mine will be with nrf24l01+. Having been running both networks, I'm so much in favour of rfm69. It just works. No more caps to stabilise power or any other rf issues.I have decided to use Moteino Mega with a built-in antenna as rfm69 gateway though - it is very small and goes inside into an RPi box. And has got more memory than atmega328p
-
@scalz Yeah ! I will print this one.
-
Little gift..
Custom box for the NRF non PA version:
A bit enlarged for NRF.And here the 3d preview for both versions with my little cheat for bicolor as i've still not added this feature to my printer
You can see i've added a little slot near usb on the NRF version, it's for the leds indication in case box wouldn't be white (no need for white box, you can see it by transparency). I'll do the same for rfm69, and put variant stl with it or not.Next Nrf PA version, and that'll be fine
-
Thank you @scalz!
-
@scalz Please share the STL files!
-
@alexsh1 why, i don't understand
Here it is : http://www.thingiverse.com/thing:2084269
-
I'm proud to say enclosure files have been integrated in the MySensors Sensebender GW project and git.
So you can find the files here at Mysensors.Enjoy
-
Hey it should look like this?
But you see the gap between the W5100 and Sensebende Gateway.
Sorry for a very poor camera
//Mattias
-
Yes, according to the build instructions here, you can also raise the socket a bit over the pcb.
The problem is that the ethernet connector is higher than a normal IDC socket, which means you can't insert the board fully in the socket. I have searched for a higher variant of the socket, but haven't found a suitable candidate..
-
@tbowmo What I did was soldering the socket a bit higher. Not a problem with some soldering skills...
-
@scalz Thank you Sir. I am going to probably wait for the PLA version as It has been working a bit better for me.
-
Few things about the software side of this. When you plug it into your computer it appears as a "Sensebender GW", with a custom USB VID/PID. You have to override the drivers and use the "Atmel Corp. EDBG CMSIS-DAP" serial port drivers or you will have no serial port at all to communicate with the board.
Second issue, with the latest Arduino software (1.8.1), and the MySensors SAMD board package installed and MySensor library installed you get an error relating to a missing core "arduino:arduino". Solution to that one is to install the main Arduino SAMD board package which adds the necessary libraries. Secondly, after doing that you will now get another error regarding a missing "Sam.h" file, to fix that you have to manually edit the platform.txt file in "\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.3" with the contents of the one from "\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11" - just being careful to copy over the name and version lines from the top of the Mysensors platform.txt file. After that you are good to go and can finally program the board or get some data out of it
-
We are preparing a new release of the board definitions for our samd. Which fixes the issues with arduino samd 1.6.11.
It should also contain a driver .inf file for Windows 7/8, for those that needs it (it's not needed on Linux, mac or Windows 10). I had completely forgotten that windows usually needs this inf file to operate correct (I have been using Linux the last 17 years for all my private projects)
I hope the package will be out tomorrow (sunday) , as I just need to do a couple of tests to verify things.
-
Do you have any example sketch for this gateway? I want to use in my GW radio + wifi module.
-
It only support wired ethernet, and USB. For wifi we have ESP8266 gateways instead.
There are example sketches available in mysensors (see SensebenderGatewaySerial, or just plain GatewayW5100 would work if it's just ethernet module that you want to use)
-
@tbowmo Great, took a an hour or two to work out what was going on. Not used MySensors before so presumed it was something I was doing wrong. I have an RFM69HW soldered on the sensebender GW now with the serial sketch loaded and it appears to be working!
-
for info, a new Mysensors SAMD board definition file have been released (1.0.4)
Includes the following changes:
Arduino SAMD 1.6.11 supported (the latest arduino board definitions for SAMD)
Various bits and pieces regarding pin definitions are fixed (a couple of missing defines)
Windows driver .inf file added.
-
@tbowmo Compiles fine now with 1.0.4, not convinced the drivers are being automatically picked up though. I can force install them by selecting the inf but presumably you want it automatic when someone plugs in the gateway?
I notice in the arduino SAMD package they have a post-install.bat to seemingly install the inf file - possibly needed?
It could also be that i've just messed things up with my manual driver install stuff yesterday. I'm on Windows 7 by the way.
-
@tbowmo Also, I notice on Linux (Raspberry Pi 3 running Debian) the device appears as an ACM device rather than the usual TTY device that some might expect. It works fine though so no issues but may confuse alot of people - worth making a note somewhere.
-
-
@MLs reload board definition from IDE
I have a little annoying bug : I can't reset de gateway. When resetting, I loose communication with my computer (linux) same after loading a new sketch (last version with IDE 1.8.1 and def 1.0.4))
[13727.746445] usb 1-1: new full-speed USB device number 9 using xhci_hcd [13727.892970] usb 1-1: New USB device found, idVendor=1209, idProduct=6949 [13727.892974] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [13727.892977] usb 1-1: Product: Sensebender GW [13727.892980] usb 1-1: Manufacturer: MySensors.org [13727.895690] cdc_acm 1-1:1.0: ttyACM1: USB ACM device [13749.066589] usb 1-1: USB disconnect, device number 9
So I can't check debug messages from init.
-
-
Are you using it as an ethernet gw, or standard serial gw? If serial GW, then the gateway waits until something connects to the serial device
The ethernet gw doesn't wait for something to connect. But you can hack the core, change hwInit() function in MyHwSAMD.cpp:
original
void hwInit() { MY_SERIALDEVICE.begin(MY_BAUD_RATE); #if defined(MY_GATEWAY_SERIAL) while (!MY_SERIALDEVICE) {} #endif Wire.begin(); }
modify to this
void hwInit() { MY_SERIALDEVICE.begin(MY_BAUD_RATE); while (!MY_SERIALDEVICE) {} Wire.begin(); }
It will make the gateway halt the initialization until something connects to the USB device.
Be advised, that if you don't have it connected to a computer, then it will not start up correctly.. That is why you need to hack the core to enable it..
-
When I try to upload sketch
Arduino:1.8.0 (Windows 10), Kort:"Arduino/Genuino Zero (Native USB Port)" Sketch uses 46488 bytes (17%) of program storage space. Maximum is 262144 bytes. No device found on COM4 An error occurred while uploading the sketch Invalid version found: 1.04 Invalid version found: 1.04 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
When I use the serial monitor
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGS--,VER=2.1.0 0;255;3;0;9;TSF:LRT:OK 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED 0;255;3;0;14;Gateway startup complete. 0;255;0;0;18;2.1.0 0;255;3;0;9;MCO:BGN:STP 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1 0;255;3;0;9;TSF:MSG:READ,27-27-0,s=0,c=1,t=1,pt=7,l=5,sg=0:45.6 27;0;1;0;1;45.6 0;255;3;0;9;TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:8.4 23;1;1;0;0;8.4 0;255;3;0;9;TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:8.3 23;1;1;0;0;8.3 0;255;3;0;9;TSF:MSG:READ,23-23-0,s=0,c=1,t=1,pt=7,l=5,sg=0:51.8 23;0;1;0;1;51.8 0;255;3;0;9;TSF:MSG:READ,22-22-0,s=1,c=1,t=0,pt=7,l=5,sg=0:3.4 22;1;1;0;0;3.4 0;255;3;0;9;TSF:MSG:READ,23-23-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.0 23;0;1;0;1;52.0 0;255;3;0;9;TSF:MSG:READ,22-22-0,s=1,c=1,t=0,pt=7,l=5,sg=0:3.5 22;1;1;0;0;3.5 0;255;3;0;9;TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:8.2 23;1;1;0;0;8.2 0;255;3;0;9;TSF:MSG:READ,23-23-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;TSF:MSG:BC 0;255;3;0;9;TSF:MSG:FPAR REQ,ID=23 0;255;3;0;9;TSF:PNG:SEND,TO=0 0;255;3;0;9;TSF:CKU:OK 0;255;3;0;9;TSF:MSG:GWL OK 0;255;3;0;9;!TSF:MSG:SEND,0-0-23-23,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0 0;255;3;0;9;TSF:MSG:READ,23-23-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.4 23;0;1;0;1;52.4 0;255;3;0;9;TSF:MSG:READ,22-22-0,s=1,c=1,t=0,pt=7,l=5,sg=0:3.4 22;1;1;0;0;3.4 0;255;3;0;9;TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:8.1 23;1;1;0;0;8.1
I USE IDE 1.80
Which card should I choose to get upload sketch on GW
//Mattias
-
have you installed the mysensors board files? And chosen the Sensebender Gateway as target platform?
(Seems that you are using Arduino/Genuino Zero as target?)
-
@tbowmo I'm using the serial sketch.
I have few issues (I think) :- when I want to upload a new sketch, first time after powering by computer, every led goes off and SBGW seems to be disconnected. When I unplug/plug, no led are on or blink, but detection is ok and I can upload a firmware.
- When I press RESET after connecting SBGW on my computer, all led goes off and SBGW disconnect.
And it doesn't seems to wait when I plug computer, led start blinking ...
-
Is it windows or linux? Linux (ubuntu) have a bad habit of letting modem manager snatch any ACM devices that is connected to the computer.
-
Yes, I have installed MYSensors boards but find only micro
So therefore, I tried another card.
//Mattias
-
I found the problem myself. Had just installed Micro
-
@tbowmo said in Sensebender Gateway:
modem manager snatch any ACM devices
Yes it's ubuntu ... Do you know how to avoid this ? udev ?
-
Ok :
sudo apt-get --purge remove modemmanager
-
Hi i get same error whit Sensebender Ga
Arduino:1.8.0 (Windows 10), Kort:"Sensebender Gateway" Build options changed, rebuilding all Sketch uses 46720 bytes (17%) of program storage space. Maximum is 262144 bytes. No device found on COM4 An error occurred while uploading the sketch Invalid version found: 1.04 Invalid version found: 1.04 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.```
No device found on COM4
But serial monitor works fine with COM4//Mattias
-
@MLs In Device Manager what com port is assigned to the sensebender GW? Have you manually installed the inf file?
com4 is likely the last com port you used in the arduino interface not the one assigned to the GW.
-
No, I have not installed or selected com port.
Device Manager COM4
As I understood it so Windows 10 would fix everything, right?//Mattias
-
@tbowmo : It's better for seeing debug from start.
But there is 2 bugs :- When you want to upload sketch. /dev/ttyACM0 disapear (and D4 goes off) afterunplu/plug it works for uploading sketch (D4 off) but at the end of uplaod ArduinoIDE makes a soft reset and /dev/ttyACM0 disapear. Works fine after plus/unplug (D4 ON)
- When pressing reset /dev/ttyACM0 disapear (and D4 goes off). Works fine after plug/unplug
-
@MLs mmm not sure then, it works for me on Windows 7 with 1.8.1 (slightly newer version?)
-
I don't have windows installed, so I'm sorry that I can't help with windows specifics.
-
Now, I think it feels like hardware failure more than software errors. Will try tomorrow on my second computer with Windows 7 and see if there is any difference.
//Mattias
-
I added a couple of udev rules, to stop modemmanager take control over the device
ACTION!="add|change|move", GOTO="local_usb_device_blacklist_end" SUBSYSTEM!="usb", GOTO="local_usb_device_blacklist_end" ENV{DEVTYPE}!="usb_device", GOTO="local_usb_device_blacklist_end" ATTRS{idVendor}=="1209", ENV{ID_MM_DEVICE_IGNORE}="1" LABEL="local_usb_device_blacklist_end"
Add the above to this file /etc/udev/rules.d/mysensors.rules
As the USB is native in the arm processor, then it will re-enumerate on the USB port whenever a reset condition occurs. When you press the reset button it will act as a unplug / plug operation (you can see this in dmesg)
When uploading to the gateway, it will reset itself to enter bootloader.. The bootloader will have another VID/PID combo (VID:1209, PID:6448) than during normal operation (VID:1209, PID:6449).
I have never seen the problems that you are having, where you need to fysically unplug / plug the device, after you have pressed the reset button (or uploaded a new firmware). And I have uploaded firmware (and pressed the reset button) quite some times
Also please note, that if you double tap the reset button, the gateway will enter bootloader mode, and wait for a new sketch to be sent.
-
@tbowmo : Same with udev rules (but this file is not necessary because modemmanger is not installed).
I try to power SBGW with usb, D4 goes ON. After pressing reset, D4 goes OFF and never goes on (I must unplug/plu usb power). Do you have the same with your board ? Perhaps a problem with bootloader ?
-
D4 is the yellow LED, and the only place it is used is in the onboard selftest routine.
In my setup, D5 turns on when plugging in the device. If I hit reset one time, it momentarily switches off D5, and then back on. if I hit reset twice, it stays off (bootloader is activated)
The above is done on my RFM69 debug gateway, so the sketch is for RFM69, but otherwise a standard SensebenderGatewaySerial sketch
Have you checked dmesg, when plugging in, and when hitting the reset button?
Have you tried with another USB cable? Have you tried with another computer?
-
I try with 2 different USB cable and 2 computer (1 laptop and 1 desktop). Same problem. With a charger too. And sorry for the mistake, it's D5 (orange)
On log[ 4788.031324] usb 1-8: USB disconnect, device number 6
-
Thank you @scalz !
You must have a very well calibrated printer to print it correctly. First try fails (oozing due to overtemp)
Other side tomorrow !
-
-
-
D5 is used by arduino to signal USB serial rx/TX activity.
Can you post the log lines from dmesg, from when you insert the usb cable, to after you have pressed the reset button?
-
I tried to update the drivers in Device Manager / sense bender GW but it failed to install the computer said.
Therefore, I asked one who wrote that he was using Windows 7
//Mattias
-
@MLs
I'm also still using win7 x64 for my dev and that worked for me.Auto install through the Device Manager does not work, nor right-clicking and installing the .inf through Explorer.
You have to force the install and select the location of the .inf in Device Manager. Then it will ask you if you agree about the driver supplier. Of course you're! And you should be able to see it in Device Manager.
-
There are example program for W5100? The original GatewayW5100 program uses SOFTSPI, different NRF CE/CSN pins? Will work with this hardware properly?
-
Heh've tried both in the device manager and manually. Device Manager, I get an error message.
And manually, nothing happens.
//Mattias