Author Topic: waiting for socket connection  (Read 4173 times)

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
waiting for socket connection
« on: April 21, 2018, 08:02:40 AM »
This famous old issue is causing me grief now...

I have tried the release Felix suggested, and the Jessie image.. and now the latest (and updated) one from official rPi respository - RASPBIAN.

I m all out of luck and feeling very low here.. someone please help. :-)

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: waiting for socket connection
« Reply #1 on: April 21, 2018, 08:24:43 AM »
I had the same issue when installing the latst version, 8.10, using the script.  I ended up installing by;

•Copy the contents of this directory in  /home/pi/gateway
•run  npm install  in the  /home/pi/gateway  directory to install all node dependencies
•Adjust any email/password/SMS settings in  settings.json5

and then it worked.  But then I was having some other strange issues which Felix couldn't figure out at that time.  I went back to 8.9

Good luck
« Last Edit: April 21, 2018, 08:28:55 AM by sparky »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: waiting for socket connection
« Reply #2 on: April 21, 2018, 09:10:27 PM »
AFAIK the latest raspbian release works with the scripts. There was a small change in the install script a few weeks ago related to php, make sure to get that change (download the latest head of the repository).

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #3 on: April 21, 2018, 09:13:45 PM »
I'm trying everything... to get this working. Different versions of pi images. pi bakery. Jessie.. etc etc. I'm just getting no where.

This is such an awesome project but this part is letting it down :-( :-(

I have rPi3B

Could someone please take out their personal passwords etc and post up a full flash .IMG which works..? ie had the rPi OS and the Gateway software installed/configured. I'm running ttyS0 at 19200 but I know how to change that easily.

Pleeeeaaaase  :-[ :-[ :-[    (i'll happily pay some BitCoin to anyone for helping ou there, I had grand plans with Moteino)

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #4 on: April 21, 2018, 09:15:44 PM »
I've tried that Felix...no good.

So that we are talking the same could you please post links.?

Pi image :
Should I run update/upgrade?
Gateway code :
Follow steps for gateway code from :

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: waiting for socket connection
« Reply #5 on: April 22, 2018, 12:29:23 AM »
ttyS0 won't work with pi3, /dev/serial0 should be it

I see you have a lot of trouble... why don't you get older image that worked, like from 2y ago, and get it running... then run script. Before that you change serial port. Don't do more things at one, just one. Install Os, the lite one I think I have. change serial, check that you get something on serial. Install GW

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: waiting for socket connection
« Reply #6 on: April 22, 2018, 05:40:23 PM »
I have a guide for the software here: https://lowpowerlab.com/guide/gateway/setup-software/
Once your Pi is setup and internet connected you can follow the steps at that link.
Get the lite-image from here: https://www.raspberrypi.org/downloads/raspbian/
(unless you have a specific reason to get the desktop version)
The gateway setup runs upgrade for you.

The example sketch on your Moteino at the gateway is here: https://github.com/LowPowerLab/RFM69/blob/master/Examples/PiGateway/PiGateway.ino

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: waiting for socket connection
« Reply #7 on: April 22, 2018, 05:52:25 PM »
vk3jap,
I would like to help getting the setup script working.
Let me know if you still have trouble. Let's try to keep this in 1 thread.

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #8 on: April 22, 2018, 06:39:46 PM »
Thanks Felix. I've done most (I think all) of those steps but perhaps not exactly in the order/combination you're suggesting so will follow your advice word for word and see how I go.

On the side of the sending nodes...what would you suggest for the simplest sending node setup such that it tests the whole thing end to end. Ie the rPi, the Moteino connected to that AND the Moteino which is sending. Re the sending side, I am using one which is a LED and LDR suggested from Tom's guide but it requires mods to your confirmation to be a supported device. What would be your simplest, already supported, sending device. Ie just a bare bones Mote with say a simple on off LED.. that DOESN'T need any extra config to be supported.

On the greater subject..  Given how much time I've spent on it..have you considered selling a complete 3 pack set which is tested. rPi(3B), RX Mote, Tx Mote with SD flash and SW(2 X .ino) ..all tested and working. I'd pay for this.! All the end user would need to do is change wireless details etc then add their other projects in. If they had any issues, could easily revert back to know working configuration.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: waiting for socket connection
« Reply #9 on: April 22, 2018, 07:42:57 PM »
I just tested the setup on a Pi3 (older Pi3) with the latest raspbian-sketch-lite (4-18-2018 release).
I followed these exact steps: https://lowpowerlab.com/guide/gateway/setup-software/
Everything works. Attached is the setup log output from the console.

Upon accessing the pi on the network, it prompts the credentials and then it shows the empty node list as expected. No problems. Next step is to configure the serial port. By default it is the GPIO serial at 19200 baud. This matches the settings in the PiGateway sketch.
Then you can use a remote moteino loaded with the RandomNumbers sketch that would simply send data which you can immediately see and look at nice graphs etc. This works guaranteed as long as you do your part and match the sketch settings with the radio hardware.

Thanks for the package suggestion - i have given it some on-off thought but it would require a lot of time on my part to setup and test everything for such a package. The cost would be very high, things could still not work at the user's end, and very few folks if anyone would buy this. I could maybe do this on a hourly basis for a specific setup. But too busy now.
« Last Edit: April 22, 2018, 07:44:52 PM by Felix »

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #10 on: April 27, 2018, 05:08:06 AM »
Hey Felix..

ok, tried all those. Still no go. The issue now seems to be the serial port - ie which one do I use with this image.?  see output from DMSEG below.

- I am using the image here : https://downloads.raspberrypi.org/raspbian_lite_latest
- using your gateway.ino and random numbers.ino
- no longer getting errors on waiting for socket etc - that seems resolved. issue now seems to be no data on serial.

what serial port should I use..? I installed minicom but and not seeing anything from the serial port.

Code headers below. I'm on 433Mhz with the highPower TX modules.

Here is the serial output from the Gateway Mote.. serial in the arduino IDE. That seems to indicate that the random numbers mote is working - it is node 98. that would prove all the .INO code to be correct.

The serial output from the Mote to the rPi has worked before.. as I was getting nodes come up (changing node ID's, the original issue) .. everythign is the same, wiring wise.

Think my issue at this point is which serial do I use..? what is AMA0 - what does AMA mean.?

I went for the serial connection between Mote and rPi because I though it was simpler, less drivers and points of failure.. should I order the USB mote..???


::Serial from Gateway Mote ::
Quote
Transmitting at 433 Mhz...
SPI Flash Init OK!
[98] F:41.5   [RSSI:-33][ACK-sent]
[98] F:42.5   [RSSI:-33][ACK-sent]
[98] F:70.5   [RSSI:-33][ACK-sent]
[98] F:2.5   [RSSI:-33][ACK-sent]
[98] F:-66.5   [RSSI:-33][ACK-sent]
[98] F:-11.5   [RSSI:-31][ACK-sent]
[98] F:-92.5   [RSSI:-33][ACK-sent]
[98] F:64.5   [RSSI:-33][ACK-sent]

TX node...:
Quote
#define NODEID         98    //unique for each node on same network
#define NETWORKID     200  //the same on all nodes that talk to each other
#define GATEWAYID     1
//Match frequency to the hardware version of the radio on your Moteino (uncomment one):
#define FREQUENCY     RF69_433MHZ
//#define FREQUENCY     RF69_915MHZ
#define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
#define ENCRYPTKEY    "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!


Gatway Node..:
Quote
#define NODEID          1 //the ID of this node
#define NETWORKID     200 //the network ID of all nodes this node listens/talks to
#define FREQUENCY     RF69_433MHZ //Match this with the version of your Moteino! (others: RF69_433MHZ, RF69_868MHZ)
#define ENCRYPTKEY    "sampleEncryptKey" //identical 16 characters/bytes on all nodes, not more not less!
#define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
#define ACK_TIME       30  // # of ms to wait for an ack packet
//*****************************************************************************************************************************
#define ENABLE_ATC    //comment out this line to disable AUTO TRANSMISSION CONTROL
#define ATC_RSSI      -75  //target RSSI for RFM69_ATC (recommended > -80)
//*****************************************************************************************************************************
// Serial baud rate must match your Pi/host computer serial port baud rate!
#define SERIAL_EN     //comment out if you don't want any serial verbose output
#define SERIAL_BAUD  19200

Quote
pi@raspberrypi:~ $ cd /dev
pi@raspberrypi:/dev $ ls tty*
tty   tty10  tty13  tty16  tty19  tty21  tty24  tty27  tty3   tty32  tty35  tty38  tty40  tty43  tty46  tty49  tty51  tty54  tty57  tty6   tty62  tty8     ttyprintk
tty0  tty11  tty14  tty17  tty2   tty22  tty25  tty28  tty30  tty33  tty36  tty39  tty41  tty44  tty47  tty5   tty52  tty55  tty58  tty60  tty63  tty9
tty1  tty12  tty15  tty18  tty20  tty23  tty26  tty29  tty31  tty34  tty37  tty4   tty42  tty45  tty48  tty50  tty53  tty56  tty59  tty61  tty7   ttyAMA0
pi@raspberrypi:/dev $



Quote
pi@raspberrypi:~ $ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.34-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1110 SMP Mon Apr 16 15:18:51 BST 2018
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 8 MiB at 0x3ac00000
[    0.000000] On node 0 totalpages: 242688
[    0.000000] free_area_init_node: node 0, pgdat 80c84e40, node_mem_map ba3a1000
[    0.000000]   Normal zone: 2133 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 242688 pages, LIFO batch:31
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 17 pages/cpu @ba34a000 s38720 r8192 d22720 u69632
[    0.000000] pcpu-alloc: s38720 r8192 d22720 u69632 alloc=17*4096
[    0.000000] pcpu-alloc:
  • 0
  • 1
  • 2
  • 3

[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 240555
[    0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=768 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=37064e22-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 940236K/970752K available (7168K kernel code, 575K rwdata, 2072K rodata, 1024K init, 706K bss, 22324K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xbb800000 - 0xff800000   (1088 MB)
                   lowmem  : 0x80000000 - 0xbb400000   ( 948 MB)
                   modules : 0x7f000000 - 0x80000000   (  16 MB)
                     .text : 0x80008000 - 0x80800000   (8160 kB)
                     .init : 0x80b00000 - 0x80c00000   (1024 kB)
                     .data : 0x80c00000 - 0x80c8fd4c   ( 576 kB)
                      .bss : 0x80c96f4c - 0x80d478b4   ( 707 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 25231 entries in 74 pages
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000023] Switching to timer-based delay loop, resolution 52ns
[    0.000276] Console: colour dummy device 80x30
[    0.000817] console [tty1] enabled
[    0.000854] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000894] pid_max: default: 32768 minimum: 301
[    0.001220] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001253] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002208] Disabling memory control group subsystem
[    0.002307] CPU: Testing write buffer coherency: ok
[    0.002716] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003108] Setting up static identity map for 0x100000 - 0x10003c
[    0.003241] Hierarchical SRCU implementation.
[    0.003891] smp: Bringing up secondary CPUs ...
[    0.004591] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.005336] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.006066] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.006169] smp: Brought up 1 node, 4 CPUs
[    0.006239] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.006261] CPU: All CPU(s) started in HYP mode.
[    0.006278] CPU: Virtualization extensions available.
[    0.007147] devtmpfs: initialized
[    0.017490] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.017742] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.017787] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.018366] pinctrl core: initialized pinctrl subsystem
[    0.019127] NET: Registered protocol family 16
[    0.021678] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.026341] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.026373] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.026592] Serial: AMBA PL011 UART driver
[    0.028226] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.028702] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.059653] bcm2835-dma 3f007000.dma: DMA legacy API manager at bb813000, dmachans=0x1
[    0.061199] SCSI subsystem initialized
[    0.061438] usbcore: registered new interface driver usbfs
[    0.061507] usbcore: registered new interface driver hub
[    0.061607] usbcore: registered new device driver usb
[    0.070076] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-04-16 18:16
[    0.071360] clocksource: Switched to clocksource arch_sys_counter
[    0.148763] VFS: Disk quotas dquot_6.6.0
[    0.148876] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.149080] FS-Cache: Loaded
[    0.149290] CacheFiles: Loaded
[    0.158128] NET: Registered protocol family 2
[    0.158868] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.158999] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.159201] TCP: Hash tables configured (established 8192 bind 8192)
[    0.159347] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.159409] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.159653] NET: Registered protocol family 1
[    0.160105] RPC: Registered named UNIX socket transport module.
[    0.160129] RPC: Registered udp transport module.
[    0.160148] RPC: Registered tcp transport module.
[    0.160167] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.161642] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.164415] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.172350] FS-Cache: Netfs 'nfs' registered for caching
[    0.172960] NFS: Registering the id_resolver key type
[    0.173007] Key type id_resolver registered
[    0.173026] Key type id_legacy registered
[    0.173055] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.174925] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.175071] io scheduler noop registered
[    0.175093] io scheduler deadline registered (default)
[    0.175386] io scheduler cfq registered
[    0.175407] io scheduler mq-deadline registered
[    0.175427] io scheduler kyber registered
[    0.178119] BCM2708FB: allocated DMA memory fad10000
[    0.178165] BCM2708FB: allocated DMA channel 0 @ bb813000
[    0.205843] Console: switching to colour frame buffer device 160x48
[    0.223211] bcm2835-rng 3f104000.rng: hwrng registered
[    0.223490] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    0.224182] vc-sm: Videocore shared memory driver
[    0.224583] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    0.234345] brd: module loaded
[    0.243163] loop: module loaded
[    0.243295] Loading iSCSI transport class v2.0-870.
[    0.244064] libphy: Fixed MDIO Bus: probed
[    0.244282] usbcore: registered new interface driver lan78xx
[    0.244495] usbcore: registered new interface driver smsc95xx
[    0.244669] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    0.472921] Core Release: 2.80a
[    0.473027] Setting default values for core params
[    0.478046] Finished setting default values for core params
[    0.683327] Using Buffer DMA mode
[    0.688258] Periodic Transfer Interrupt Enhancement - disabled
[    0.693249] Multiprocessor Interrupt Enhancement - disabled
[    0.698217] OTG VER PARAM: 0, OTG VER FLAG: 0
[    0.703145] Dedicated Tx FIFOs mode
[    0.708350] WARN::dwc_otg_hcd_init:1046: FIQ DMA bounce buffers: virt = 0xbad04000 dma = 0xfad04000 len=9024
[    0.713505] FIQ FSM acceleration enabled for :
               Non-periodic Split Transactions
               Periodic Split Transactions
               High-Speed Isochronous Endpoints
               Interrupt/Control Split Transaction hack enabled
[    0.738885] dwc_otg: Microframe scheduler enabled
[    0.738942] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x805e6a40
[    0.744013] WARN::hcd_init_fiq:460: FIQ ASM at 0x805e6da8 length 36
[    0.749010] WARN::hcd_init_fiq:486: MPHI regs_base at 0xbb87e000
[    0.753989] dwc_otg 3f980000.usb: DWC OTG Controller
[    0.758950] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    0.763991] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[    0.769042] Init: Port Power? op_state=1
[    0.774008] Init: Power Port (0)
[    0.779051] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.783996] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.788931] usb usb1: Product: DWC OTG Controller
[    0.793881] usb usb1: Manufacturer: Linux 4.14.34-v7+ dwc_otg_hcd
[    0.798889] usb usb1: SerialNumber: 3f980000.usb
[    0.804515] hub 1-0:1.0: USB hub found
[    0.809566] hub 1-0:1.0: 1 port detected
[    0.815089] dwc_otg: FIQ enabled
[    0.815094] dwc_otg: NAK holdoff enabled
[    0.815099] dwc_otg: FIQ split-transaction FSM enabled
[    0.815109] Module dwc_common_port init
[    0.815350] usbcore: registered new interface driver usb-storage
[    0.820605] mousedev: PS/2 mouse device common for all mice
[    0.825761] IR NEC protocol handler initialized
[    0.830781] IR RC5(x/sz) protocol handler initialized
[    0.835742] IR RC6 protocol handler initialized
[    0.840604] IR JVC protocol handler initialized
[    0.845344] IR Sony protocol handler initialized
[    0.850000] IR SANYO protocol handler initialized
[    0.854683] IR Sharp protocol handler initialized
[    0.859300] IR MCE Keyboard/mouse protocol handler initialized
[    0.863983] IR XMP protocol handler initialized
[    0.869301] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[    0.874388] bcm2835-cpufreq: min=600000 max=1200000
[    0.879514] sdhci: Secure Digital Host Controller Interface driver
[    0.884356] sdhci: Copyright(c) Pierre Ossman
[    0.889494] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[    0.894709] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    0.899713] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.906049] ledtrig-cpu: registered to indicate activity on CPUs
[    0.911140] hidraw: raw HID events driver (C) Jiri Kosina
[    0.916225] usbcore: registered new interface driver usbhid
[    0.921160] usbhid: USB HID core driver
[    0.926676] vchiq: vchiq_init_state: slot_zero = bad80000, is_master = 0
[    0.932915] [vc_sm_connected_init]: start
[    0.942948] [vc_sm_connected_init]: end - returning 0
[    0.948323] Initializing XFRM netlink socket
[    0.953165] NET: Registered protocol family 17
[    0.958047] Key type dns_resolver registered
[    0.963191] Registering SWP/SWPB emulation handler
[    0.968556] registered taskstats version 1
[    0.979098] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    0.984099] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    0.990941] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[    0.995972] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[    1.031475] Indeed it is in host mode hprt0 = 00021501
[    1.097287] sdhost: log_buf @ bad07000 (fad07000)
[    1.139874] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.146426] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.152863] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.160445] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.181406] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    1.187129] of_cfs_init
[    1.191971] of_cfs_init: OK
[    1.197070] Waiting for root device PARTUUID=37064e22-02...
[    1.241395] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    1.246259] Indeed it is in host mode hprt0 = 00001101
[    1.318561] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.326216] mmc0: new high speed SDHC card at address 59b4
[    1.331877] mmcblk0: mmc0:59b4 USD   15.0 GiB
[    1.338363]  mmcblk0: p1 p2
[    1.377215] mmc1: new high speed SDIO card at address 0001
[    1.392650] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.397872] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    1.412010] devtmpfs: mounted
[    1.420093] Freeing unused kernel memory: 1024K
[    1.481637] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[    1.486808] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.492673] hub 1-1:1.0: USB hub found
[    1.497861] hub 1-1:1.0: 5 ports detected
[    1.821415] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    1.948473] systemd[1]: System time before build time, advancing clock.
[    1.961693] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    1.966821] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.974588] smsc95xx v1.0.6
[    2.074675] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:3b:6c:59
[    2.100624] NET: Registered protocol family 10
[    2.107281] Segment Routing with IPv6
[    2.122897] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.167393] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    2.179627] systemd[1]: Detected architecture arm.
[    2.181419] usb 1-1.4: new full-speed USB device number 4 using dwc_otg
[    2.211581] systemd[1]: Set hostname to <raspberrypi>.
[    2.316397] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c52f
[    2.322271] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.328112] usb 1-1.4: Product: USB Receiver
[    2.333984] usb 1-1.4: Manufacturer: Logitech
[    2.346192] input: Logitech USB Receiver as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C52F.0001/input/input0
[    2.353469] hid-generic 0003:046D:C52F.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-3f980000.usb-1.4/input0
[    2.364918] input: Logitech USB Receiver as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.1/0003:046D:C52F.0002/input/input1
[    2.441940] hid-generic 0003:046D:C52F.0002: input,hiddev96,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-3f980000.usb-1.4/input1
[    2.541445] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[    2.679975] usb 1-1.5: New USB device found, idVendor=05ac, idProduct=1006
[    2.687081] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.694127] usb 1-1.5: Product: Keyboard Hub
[    2.701056] usb 1-1.5: Manufacturer: Apple, Inc.
[    2.707933] usb 1-1.5: SerialNumber: 000000000000
[    2.715412] hub 1-1.5:1.0: USB hub found
[    2.722251] hub 1-1.5:1.0: 3 ports detected
[    2.802415] systemd[1]: Listening on udev Control Socket.
[    2.817636] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    2.832672] systemd[1]: Created slice User and Session Slice.
[    2.847540] systemd[1]: Created slice System Slice.
[    2.862543] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    2.877865] systemd[1]: Listening on Syslog Socket.
[    2.892393] systemd[1]: Reached target Slices.
[    3.041520] usb 1-1.5.2: new low-speed USB device number 6 using dwc_otg
[    3.200989] usb 1-1.5.2: New USB device found, idVendor=05ac, idProduct=0220
[    3.207047] usb 1-1.5.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.207056] usb 1-1.5.2: Product: Apple Keyboard
[    3.207063] usb 1-1.5.2: Manufacturer: Apple, Inc
[    3.518196] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    3.623838] systemd-journald[111]: Received request to flush runtime journal from PID 1
[    3.842919] input: Apple, Inc Apple Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2:1.0/0003:05AC:0220.0003/input/input2
[    3.914595] apple 0003:05AC:0220.0003: input,hidraw2: USB HID v1.11 Keyboard [Apple, Inc Apple Keyboard] on usb-3f980000.usb-1.5.2/input0
[    3.915810] input: Apple, Inc Apple Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2:1.1/0003:05AC:0220.0004/input/input3
[    3.981977] apple 0003:05AC:0220.0004: input,hidraw3: USB HID v1.11 Device [Apple, Inc Apple Keyboard] on usb-3f980000.usb-1.5.2/input1
[    4.245695] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    4.248654] bcm2835_alsa bcm2835_alsa: card created with 8 channels
[    4.390918] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[    4.401978] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001
[    4.402265] usbcore: registered new interface driver brcmfmac
[    4.631489] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
[    4.633196] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 7.11.15 Compiler: 1.24.2 ClmImport: 1.24.1 Creation: 2014-05-26 10:53:55 Inc Data: 9.10.39 Inc Compiler: 1.29.4 Inc ClmImport: 1.36.3 Creation: 2017-10-23 03:47:14
[    4.837417] random: crng init done
[    5.578338] uart-pl011 3f201000.serial: no DMA platform data
[    6.085965] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[    6.116205] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    6.116271] brcmfmac: power management disabled
[    6.583647] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[    6.584005] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    7.355471] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   10.079745] Bluetooth: Core ver 2.22
[   10.079825] NET: Registered protocol family 31
[   10.079831] Bluetooth: HCI device and connection manager initialized
[   10.079855] Bluetooth: HCI socket layer initialized
[   10.079868] Bluetooth: L2CAP socket layer initialized
[   10.079902] Bluetooth: SCO socket layer initialized
[   10.091620] Bluetooth: HCI UART driver ver 2.3
[   10.091634] Bluetooth: HCI UART protocol H4 registered
[   10.091640] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   10.091855] Bluetooth: HCI UART protocol Broadcom registered
[   10.257342] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   10.257380] Bluetooth: BNEP filters: protocol multicast
[   10.257401] Bluetooth: BNEP socket layer initialized
pi@raspberrypi:~ $
« Last Edit: April 27, 2018, 05:14:53 AM by vk3jap »

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #11 on: April 27, 2018, 05:19:49 AM »
maybe this lite image doesn't have the drivers etc for the GPIO serial..?

Quote
pi@raspberrypi:~ $ dmesg | grep serial
[    0.028788] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.979109] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    0.984098] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    5.827925] uart-pl011 3f201000.serial: no DMA platform data
pi@raspberrypi:~ $

Quote
pi@raspberrypi:/dev $ ls -l ser*
lrwxrwxrwx 1 root root 7 Apr 27 09:17 serial1 -> ttyAMA0
pi@raspberrypi:/dev $

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: waiting for socket connection
« Reply #12 on: April 27, 2018, 05:23:00 AM »
Why don't you go with older image, jessie, run the script and be done with it?
Unless you are doing something else wrong, this should be very easy, step by step thing to do

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #13 on: April 27, 2018, 05:40:35 AM »
I've tried that already, a while back now. I've tried everything.

I'm going with what Felix is suggesting.

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #14 on: April 27, 2018, 05:52:53 AM »
Why don't you go with older image, jessie, run the script and be done with it?
Unless you are doing something else wrong, this should be very easy, step by step thing to do

Are you using the more via serial or USB..?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: waiting for socket connection
« Reply #15 on: April 27, 2018, 08:41:04 AM »
vk3jap,
I thought your problem is getting the app installed.
But ok...

The default serial port setting is /dev/ttyAMA0 which is the GPIO serial pins. This is enabled during initial setup (to free it from the bluetooth if you have a Pi3, and system console taking it over).
It the GPIO ttyAMA0 serial port is used by something else, opening it with minicom or another client will produce no output.
You can always just plug your Moteino into the USB port of your Pi and then that will produce a new serial port, something like /dev/ttyUSBx, then you have to set that in the Gateway settings and restart the Gateway app. If you have the regular Moteino then just add an FTDI-Adapter to it to make it USB compatible, or you can use a Moteino-USB.

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: waiting for socket connection
« Reply #16 on: April 27, 2018, 09:27:24 AM »
Are you using the more via serial or USB..?
I tried both, started with USB since I didn't have to check PRI pinout, now I'm without usb/serial converter. But all that was changed was where gateway looks for data (ttyAMA0 and all others)

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #17 on: April 27, 2018, 10:41:15 AM »
vk3jap,
I thought your problem is getting the app installed.
But ok...

I've spent the best part of this chasing my tail. I fix one thing, something else doesn't work. I get the serial port working, then I'm stuck with waiting for socket..I fix that, the serial port doesn't work. I get both of those working and then I get new nodes appearing. I go to the mote-setup web page, and I'm prompted with two options...try this, or, try that..

I know this is not a professional project as such but it so is..what you have done here Felix is just awesome..it really is.

I feel the software side of things let's down the hardware side, but maybe your interest is more in the hardware. For my mind you need to be quite experienced in Linux and coding to get this working.

I feel with a little further attention to detail and simplicity it would be super awesome and almost something which would be a viable full business (understanding this is not your intention).

What's required really, I feel is that for each model of rPi there is a clear simple (no options, not referring to forum discussions) set of instructions to follow.

Something like..
Buy this Pi - link
Buy this mote.. suggest USB if that is easier to get linked to the Pi.
Use this image - direct link (from your site)
Use this .ino for the RX gateway Pi. - link
Use this .ino for the your first Mote..as a tester.
..no ambiguity.

I'd be happy to buy the latest few models of Pi for you to have this on.

Please understand this is me venting some frustrations and sharing some ideas.. it is not meant to seem hostile at all mate.

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: waiting for socket connection
« Reply #18 on: April 27, 2018, 11:21:33 AM »
Didn't you have this all running already?

PI3B is a big change in software and hardware, it might not work because of that

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: waiting for socket connection
« Reply #19 on: April 27, 2018, 11:44:28 AM »
vk3jap,

I haven't tried this on Pi3B+ yet (latest pi as of now).
But it all works fine on the Pi3 (which inludes the wifi+bluetooth).

@vk3jap:
I can offer to sell a package where I buy the Pi, add the hardware (2 moteinos or a MightyHat with ISP/battery backup and a moteino). Then I setup everything to a working point where if just powered, it will work, and the remote moteino would send in random data (the RandomNumbers sketch) or something like that, producing immediate node/graph in the Gateway app. Is that something you'd be interested in? If so let me know.

It might take me ~1 hour or more to do everything, and not sure of the cost (factor in all the hardware, plus the hour contract labor). Other options like a case and fancy stuff would take even more. So ... I may give it an hour or so to make this happen but you have to be "all-in", basically place an order. Might be a good exercise for me to nail down some practices and reduce that setup time for the future. I am usually really tied up in other projects and development that is not perhaps visible on this public site, but I always try to help folks out if I can.

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #20 on: April 27, 2018, 05:50:10 PM »
I went the the Pi 3b because it has onboard wifi. I had tried the previous models without onboard wifi and used a wifi dongle (USB) and it was problematic, not reliable - it would drop out and lose it's connection so I had to make a watchdog process and reboot it - that was crap! .. hence why I am running the 3B

@Felix .. sure, I'll go for that! this way when it arrives all I need to do is change the wifi details and we're good to go - perfect. I do think you should offer to sell this ad a sKU/package - it wouldn't take much effort at all on your behalf and I think it would reduce the entry complexity. When you build this for me can you please also make a copy of the flash image (with the 2 .INO files in it somewhere) and if I ever manage to stuff it up or have issues I can always revert back to this config - ie just download the flash image, re image my flash, boot, change WiFi details and presto, all working again.

I work in IT and am doing Pi / Arduino classes.. spreading the word, I would LOVE to be able to say.. Buy Felix's stuff as opposed to sparkfun etc which is what I say at the moment. I can really see a good market for your gear with IoT.


Didn't you have this all running already?

PI3B is a big change in software and hardware, it might not work because of that

No Luka - never did. Had various bits and pieces working but, with the 3B I have never been able to get 'it all working' despite spending ages on it.
« Last Edit: April 29, 2018, 10:53:50 AM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: waiting for socket connection
« Reply #21 on: April 29, 2018, 10:58:31 AM »
vk3jap,
Ok great, thanks for the feedback.
What I need to know is your preference for the hardware package.
On the Pi side I might go with the 3B (not +). Not sure yet. But it would include a PSU and SD card. Optional stuff is the ATXRaspi or MightyHat but they are quite separate products. But I guess I can set them up for those who want these bundled.

On the subghz RF side - you'd need at least a pair of Moteinos or equivalent. One tied to the Pi and act as the Gateway and another as a test unit. Then you add more as you wish.

They would be loaded with generic passwords, or maybe you can specify those during checkout or at the product page when ordering. The sketches would also have generic RF settings and the generic "sampleEncryptKey", and you can then program them yourself.

Does that sound reasonable or close? Anything else I'm missing?
Anyone else have any suggestions/input/requests?

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #22 on: April 29, 2018, 04:37:26 PM »
Hey Felix,

awesome - I think unless it is a real issue your kit would be best to have the very latest Pi (3b+) - I mean who wants to place and order and get all excited at last years model of car etc.? so unless it is a real issue for some reason I'd like the 3b+ please.

reckon it would be a good idea to configure wireless - in the WPA supplicant file.. just make it YOURSSID and YOURWIFIPASSWORD  etc. By default there is nothing in that file so I have to google each time to get the format correct. I also think it would be good to have a simple way to set a static IP - maybe raspi-config can do that but if not perhaps have a file in there /etc/network.staticIPsample etc. Practically speaking, you're not going to want DHCP in production and I have messed around in the past with setting a static IP, especially over Wifi.

if possible I would use the standard Raspbian image - if it is without X Windows - add a file such that when someone types STARTX is comes back saying - "X Windows this package is not installed. On this dist/image whilst you can install it, it's really not designed to be installed - you should be able to just point your browser to http://1.2.3.4  and you'll get the moteino gateway login page."

Important to include the two sketches in the flash image of the rPi /home/pi/moteino/sketches/gateway and /home/pi/moteino/sketches/node - stick a readme file (really concise and simple) in each folder.  for Node - make that your random numbers, that seems like a good idea.

it would be handy at the top of ALL your files to have a Version number and release date for that version alongside. like..
- rPi Gateway Code package V8.11 Release Date 15 Apr 18.  (for the raspberry Pi files)
- Moteino_Gatway.INO V7.0 Release Date 1 Jan 18.  (for the main gateway Mote node)
- Moteino_Random_numbers.INO V6.01 Release Date 7 Feb 18. (for a first test Node Pi Mote)

I'll volunteer to help out with the files etc as mentioned above!


I'll go the ATXRapi and MightyHAt - I hadn't planned on using them but I like supporting your project so why not.

RF - 433Mhz and high Power (HCW etc) please.

Yep, sampleencryptkey is cool. At the end of the day I don't think you are making this for super gumbies just helping people get over that first hurdle. Making sure of course that that Network and Node settings will work on both Nodes (TX/RX) out of the box - ie no need to change that.

I'm in Australia - so if you could source power supply units which have an AU plug https://en.wikipedia.org/wiki/AS/NZS_3112 that would be good - just saves wasted parts and cost. If not easy to find just give people the option to buy it or supply their own - if they pick supply own make reference to the Volts, Amps and plug type requird perhaps. I know with the rPi low current causes issues.  Using a US Power supply with an adaptor sucks!!  These types are quite good - https://www.lindy.co.uk/images/multi-country-switching-power-adapter-12v-dc-3a-5-5mm-outer-2-1mm-inner-dc-jack-level-vi-p9373-7293_zoom.jpg you just put the final piece on as per your country. Perhaps have a US or International version OR supply your own (specs)

Important - Keep Copy of the Flash images used on your website. such that if people toast their production flash(tinkering!) they can just download and go again. Maybe even give them the option at checkout to buy 2 x FLASH's - one for use and one as a golden image should anything happen - reckon I'd buy that, not everywhere has great internet like you do in the USA :-|

reckon it would be a good idea to sell this a 'package' (if easy enough to do in your webstore) and give that package a version number and release date also - as, you will change the package makeup over time so if I order a package now and one next year I can see the difference. Maybe call is 'LowPowerLab Moteino Gateway Starter Kit) or something really obvious like that.

I'm excited - when do you think you'll have this good to go.?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: waiting for socket connection
« Reply #23 on: April 30, 2018, 10:16:17 AM »
3B+ sounds good, I haven't played with one yet so it's a good time to do it now.
For wireless - this would have to be done by yourself.
Same for the network stuff. I would simply use DHCP. I can't set a static IP since the subnet/network settings can differ. My goal is to ensure that you can plug in an ethernet cable, fire it up, access it over SSH perhaps - or just directly from a keyboard/LCD, and have the gateway running at the assigned subnet IP. I could include instructions how to reset passwords and set a static IP, or setup the wifi and change the Pi password etc. All that is very straight forward.

Any images and sketches would need to be downloaded and not hardcopied on the image itself. The sketches are very standard and have not really changed in years. The Pi image would be timestamped.

WRT powering options, its spreading too much and I would prefer to simply ship the Pi and not the supply in that case. I think any phone charger/cable can power a Pi.

RF options would be in the checkout.
The "package" will hopefully be ironed out as we go through this exercise.

It can be either the ATXRaspi or MightyHat (which includes a superset functionality of the ATXRaspi). The ATXRaspi is simply a convenient power/boot/reboot switch. MightyHat is that + a lot more, but it's more complex and will require a different sketch and GPIO serial. I would stick to the simple Pi+2 Moteino setup. Or the others can be optional upgrades.

I need to spend some time and figure out the exact hardware required, source the Pi+SD then set it all up and see what it takes. I will get the Pi this week and go from there.

Keep this thread going.

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #24 on: April 30, 2018, 10:24:04 AM »
Hmm... How's about let me try what I have in USB mode(as opposed to serial). I'll ping you back here. Don't guy buying anything yet.!

vk3jap

  • NewMember
  • *
  • Posts: 41
  • Country: au
Re: waiting for socket connection
« Reply #25 on: May 02, 2018, 11:15:05 PM »
OMG... finally, some success.

- Jessie Lite image
- pi 3B+
- connect via USB with the FTDI connector/converter.

@felix...mate, I think I'll just order a USB mote and be done with it. I would have thought serial would be easier but it seems not.!


Kilo95

  • Sr. Member
  • ****
  • Posts: 340
  • Country: us
Re: waiting for socket connection
« Reply #26 on: May 03, 2018, 08:44:16 AM »
As far as setting a static IP address...I use a linksys router and use the linksys app on my phone to reserve the ip address instead of just setting a static one. I have yet to have a problem with it