tomeshnet / meshstream Goto Github PK
View Code? Open in Web Editor NEWLive video stream with a distributed file system over a physical mesh network
License: GNU General Public License v3.0
Live video stream with a distributed file system over a physical mesh network
License: GNU General Public License v3.0
Publisher node:
pi@tomesh-fd13:~ $ echo hello | ipfs add -Q | ipfs name publish
Published to QmV3o6Sck81s9dwGkmWbLhnF8728Vd2t3isqWS91zuiZj6: /ipfs/QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN
pi@tomesh-fd13:~ $ ipfs name resolve QmV3o6Sck81s9dwGkmWbLhnF8728Vd2t3isqWS91zuiZj6
/ipfs/QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN
Resolver node:
pi@tomesh-d422:~ $ ipfs swarm peers
/ip6/fc26:7928:54fe:33ea:52a4:590:843e:fd13/tcp/4001/ipfs/QmV3o6Sck81s9dwGkmWbLhnF8728Vd2t3isqWS91zuiZj6
pi@tomesh-d422:~ $ ipfs name resolve QmV3o6Sck81s9dwGkmWbLhnF8728Vd2t3isqWS91zuiZj6
Error: could not resolve name
Note that both nodes will happily publish and resolve their own IPNS. The Publisher node fd13
will also resolve IPNS published by the other node d422
, just not the other way around.
Tried restarting ipfs daemon, rebooted systems, deleting ~/.ipfs
on both nodes and reinitialized. This started occurring soon after I did two things (not sure if related):
ipfs repo gc
on both nodesWhen this started happening, pubsub flag was enabled on the daemon, and at some point I turned it off on both nodes trying to take that factor out.
Currently working on https://github.com/tomeshnet/prototype-cjdns-pi since mesh-orange workshop profile is on an intensive weight loss program :(
See: tomeshnet/mesh-orange#52 (comment)
We need to move workshop specific debian packages out of the debian.stretch.armhf.cpio
. Perhaps we can include them (with dependencies) in conf.d
and dpkg -i
them at boot time.
Related: tomeshnet/mesh-orange#48
This summarizes a discussion involving @nicopace, @flyingzumwalt, and @benhylau, followed by a secondary discussion with @darkdrgn2k and @ASoTNetworks, about a demo that features:
LibreRouter
IPFS
SSB
mesh-orange
cjdns
The purpose is to show what can be accomplished with peer-to-peer applications running over a wireless mesh network that is completely isolated from the Internet. It demonstrates:
Each node consists of:
Streamer:
http://localhost:8080/ipns/<publisher-ipns-address>
)Subscribers:
All traffic goes over the physical mesh formed by LibreRouter long-range radios and are end-to-end encrypted by cjdns running on each Raspberry Pi.
Proposed work plan:
@nicopace provide LibreRouter assistance and test full setup in Alter Mundi and other existing networks
@flyingzumwalt have IPFS side set up with Raspberry Pi and investigate IPNS publishing performance
@benhylau IPFS, SSB, mesh-orange, cjdns integration
@darkdrgn2k integration between Raspberry Pi and LibreRouter
@ASoTNetworks HLS over IPFS
Twice now U-Boot failed to start on boot simply stalling like so
U-Boot 1.1.4 (Apr 19 2014 - 00:17:22)
ap135 - Scorpion 1.0DRAM:
sri
Scorpion 1.0
ath_ddr_initial_config(233): (32bit) ddr1 init
tap = 0x00000002
Tap (low, high) = (0x4, 0x1e)
Tap values = (0x11, 0x11, 0x11, 0x11)
4 MB
Top of RAM usable for U-Boot at: 80400000
Reserving 207k for U-Boot at: 803cc000
Reserving 192k for malloc() at: 8039c000
Reserving 44 Bytes for Board Info at: 8039bfd4
Reserving 36 Bytes for Global Data at: 8039bfb0
Reserving 128k for boot params() at: 8037bfb0
Stack Pointer at: 8037bf98
Yesturday when this happen it magically stopped happening and the board returned to normal U-Boot operations
But it happend again today.
OpenWRT/LEDE raw config for mesh stream
Run in serial console as network connection may drop
ip="192.168.40.31"
gw="192.168.40.1"
rand4bytes=$(head -c 256 /dev/urandom | md5sum | sed 's/\(..\)/\1:/g' | head -c 11)
uci set network.lan.macaddr="02:$rand4bytes":10
uci commit network
for index in 0 1 2; do
uci set wireless.radio$index.macaddr="02:$rand4bytes":5$index
done
ifconfig br-lan $ip
route add -net 0.0.0.0 gw $gw
echo nameserver 8.8.8.8 > /etc/resolv.conf
opkg update
opkg install luci
uci set network.lan.dns=8.8.8.8
uci set network.lan.gateway=$gw
uci set network.lan.ipaddr=$ip
# Delete Network
uci del network.wan
uci del network.wan6
uci commit network
echo "config switch_vlan" >> /etc/config/network # Wierd Bug
uci set network.@switch_vlan[0]=switch_vlan
uci set network.@switch_vlan[0].device='switch0'
uci set network.@switch_vlan[0].vlan='1'
uci set network.@switch_vlan[0].vid='1'
uci set network.@switch_vlan[0].ports='3 4 6t'
uci set network.@switch_vlan[1]=switch_vlan
uci set network.@switch_vlan[1].device='switch0'
uci set network.@switch_vlan[1].vlan='2'
uci set network.@switch_vlan[1].vid='2'
uci set network.@switch_vlan[1].ports='3t 4t 6t'
uci set network.@switch_vlan[2]=switch_vlan
uci set network.@switch_vlan[2].device='switch0'
uci set network.@switch_vlan[2].vlan='3'
uci set network.@switch_vlan[2].vid='3'
uci set network.@switch_vlan[2].ports='3t 4t 6t'
uci set network.lan.ifname='eth1.1'
uci commit network
uci set network.mesh1=interface
uci set network.mesh1.proto=none
uci set network.mesh1.type=bridge
uci set network.mesh1.ifname='eth1.2'
uci set network.mesh2=interface
uci set network.mesh2.proto=none
uci set network.mesh2.type=bridge
uci set network.mesh2.ifname='eth1.3'
uci commit network
uci set wireless.radio0.disabled=0
uci set wireless.radio1.disabled=0
uci set wireless.radio2.disabled=0
uci set wireless.radio0.channel=1
uci set wireless.radio0.country=US
uci set wireless.radio0.htmode=HT40
uci set wireless.radio0.legacy_rates=1
uci set wireless.radio1.channel=165
uci set wireless.radio1.country=US
uci set wireless.radio1.htmode=HT40
uci set wireless.radio1.legacy_rates=1
uci set wireless.radio2.channel=165
uci set wireless.radio2.country=US
uci set wireless.radio2.htmode=HT40
uci set wireless.radio2.legacy_rates=1
uci delete wireless.default_radio1
uci delete wireless.default_radio0
uci delete wireless.default_radio2
uci set wireless.ap=wifi-iface
uci set wireless.ap.device=radio0
uci set wireless.ap.mode=ap
uci set wireless.ap.network=lan
uci set wireless.ap.ssid=pi1
uci set wireless.ap.encryption=psk2
uci set wireless.ap.key=password
uci set wireless.mesh1=wifi-iface
uci set wireless.mesh1.mesh_fwding=1
uci set wireless.mesh1.device=radio1
uci set wireless.mesh1.mesh_id=tomesh
uci set wireless.mesh1.mode=mesh
uci set wireless.mesh1.network=mesh1
uci set wireless.mesh1.beacon_int=100
uci set wireless.mesh2=wifi-iface
uci set wireless.mesh2.device=radio2
uci set wireless.mesh2.mesh_fwding=0
uci set wireless.mesh2.mesh_id=tomesh
uci set wireless.mesh2.mode=mesh
uci set wireless.mesh2.network=mesh2
uci set wireless.mesh2.beacon_int=100
uci commit wireless
reboot
We prototyped the VLAN configuration (similar to tomeshnet/deployment#2 (comment)) with LEDE on LibreRouter, but plan to try LibreMesh and let it handle the routing. Put all three LibreRouters into our desired configuration and document.
Seems the LibreRouter V1 running Vanilla LEDE seems to break the the kernel partition
root@LiMe-112ed8:/tmp# sysupgrade -n openwrt-lede-vanilla-ar71xx-generic-librero
uter-v1-squashfs-sysupgrade.bin
Image metadata not found
killall: watchdog: no process killed
Commencing upgrade. All shell sessions will be closed now.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... ntpd udhcpc alfred batadv-vis hostapd [ 285.926731] br-lan: port 4(wlan0-apname) entered disabled state
watchping watchping [ 285.949944] device wlan0-apname left promiscuous mode
[ 285.955087] br-lan: port 4(wlan0-apname) entered disabled state
dnsmasq dnsmasq sleep sleep ubusd logd rpcd netifd crond netserver [ 286.155504] device wlan0-ap left promiscuous mode
[ 286.160408] br-lan: port 3(wlan0-ap) entered disabled state
uhttpd bmx6
Sending KILL to remaining processes ... ntpd
Switching to ramdisk...
Performing system upgrade...
Unlocking firmware ...
Writing from <stdin> to firmware ...
Upgrade completed
Rebooting system...
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
[ 312.677253] reboot: Restarting system
�
U-Boot 1.1.4 (Apr 19 2014 - 00:17:22)
ap135 - Scorpion 1.0DRAM:
sri
Scorpion 1.0
ath_ddr_initial_config(200): (32bit) ddr2 init
tap = 0x00000003
Tap (low, high) = (0x5, 0x1d)
Tap values = (0x11, 0x11, 0x11, 0x11)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 207k for U-Boot at: 87fcc000
Reserving 192k for malloc() at: 87f9c000
Reserving 44 Bytes for Board Info at: 87f9bfd4
Reserving 36 Bytes for Global Data at: 87f9bfb0
Reserving 128k for boot params() at: 87f7bfb0
Stack Pointer at: 87f7bf98
Now running in RAM - U-Boot at: 87fcc000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
*** Warning *** : PCIe WLAN Module not found !!!
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
athrs_sgmii_res_cal: cal value = 0x1
Fetching MAC Address from 0x87feea5c
Fetching MAC Address from 0x87feea5c
ath_gmac_enet_initialize: reset mask:c02200
Scorpion ----> S17 PHY *
Vlan config...
s17 phy0 register value 0x00004140
TEST: FINAL REG VAL after TX Calibration - 0x4a000000
TEST: FINAL XMII VAL after RX Calibration - 0x4a000000
TEST: FINAL ETH_CFG VAL after RX Calibration - 0x00000001
athrs17_reg_init: complete
: cfg1 0x80000000 cfg2 0x7335
eth0: 00:03:7f:11:2e:d8
eth0 up
athrs17_reg_init_wan done
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:11:2e:d9
eth1 up
eth0, eth1
Setting 0x18116290 to 0x50a0214f
Hit any key to stop autoboot: 0
## Booting image at 9fe80000 ...
Image Name: MIPS OpenWrt Linux-4.9.67
Created: 2018-07-03 17:22:27 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1415695 Bytes = 1.4 MB
Load Address: 80060000
Entry Point: 80060000
Verifying Checksum at 0x9fe80040 ...OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 134217728
Starting kernel ...
[ 0.000000] Linux version 4.9.67 (lime@compile) (gcc version 5.5.0 (OpenWrt GCC 5.5.0 r5544-d9245c4) ) #0 Wed Dec 27 21:01:14 2017
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[ 0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] User-defined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] OF: fdt:No valid device tree found, continuing without
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: board=LIBREROUTERV1 console=ttyS0,115200 mem=128M rootfstype=squashfs noinitrd
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 124744K/131072K available (3247K kernel code, 165K rwdata, 824K rodata, 300K init, 213K bss, 6328K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
[ 0.000007] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
[ 0.008293] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[ 0.071187] pid_max: default: 32768 minimum: 301
[ 0.076183] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.083221] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.092628] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.103124] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.110048] NET: Registered protocol family 16
[ 0.115930] MIPS: machine is LibreRouter v1
[ 0.597974] ar724x-pci ar724x-pci.0: PCIe link is down
[ 0.603442] registering PCI controller with io_map_base unset
[ 0.609680] ar724x-pci ar724x-pci.1: PCIe link is down
[ 0.615140] registering PCI controller with io_map_base unset
[ 0.632043] PCI host bridge to bus 0000:00
[ 0.636410] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[ 0.643754] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.649674] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.656898] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.665436] PCI host bridge to bus 0000:01
[ 0.669815] pci_bus 0000:01: root bus resource [mem 0x12000000-0x13ffffff]
[ 0.677124] pci_bus 0000:01: root bus resource [io 0x0001]
[ 0.683054] pci_bus 0000:01: root bus resource [??? 0x00000000 flags 0x0]
[ 0.690270] pci_bus 0000:01: No busn resource found for root bus, will use [bus 01-ff]
[ 0.699260] clocksource: Switched to clocksource MIPS
[ 0.705460] NET: Registered protocol family 2
[ 0.710755] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.718173] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.724978] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.731815] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.738034] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.744919] NET: Registered protocol family 1
[ 0.752857] Crashlog allocated RAM at address 0x3f00000
[ 0.759158] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[ 0.771487] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.777686] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.794658] io scheduler noop registered
[ 0.798829] io scheduler deadline registered (default)
[ 0.804657] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.811789] console [ttyS0] disabled
[ 0.835656] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[ 0.844837] console [ttyS0] enabled
[ 0.844837] console [ttyS0] enabled
[ 0.852254] bootconsole [early0] disabled
[ 0.852254] bootconsole [early0] disabled
[ 0.863611] m25p80 spi0.0: found w25q128, expected w25q256
[ 0.869185] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.873994] Creating 4 MTD partitions on "spi0.0":
[ 0.878865] 0x000000000000-0x000000040000 : "uboot"
[ 0.885374] 0x000000040000-0x000000050000 : "uboot-env"
[ 0.891964] 0x000000050000-0x000000ff0000 : "firmware"
[ 0.931380] 2 uimage-fw partitions found on MTD device firmware
[ 0.937396] 0x000000050000-0x0000001b0000 : "kernel"
[ 0.943506] 0x0000001b0000-0x000000ff0000 : "rootfs"
[ 0.949822] mtd: device 4 (rootfs) set to be root filesystem
[ 0.955604] 1 squashfs-split partitions found on MTD device rootfs
[ 0.961916] 0x000000380000-0x000000ff0000 : "rootfs_data"
[ 0.968650] 0x000000ff0000-0x000001000000 : "art"
[ 0.975459] libphy: Fixed MDIO Bus: probed
[ 0.991889] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[ 1.677558] libphy: ag71xx_mdio: probed
[ 2.310762] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[ 2.322113] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[ 2.599255] random: fast init done
[ 2.950868] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:SGMII
[ 2.958018] NET: Registered protocol family 10
[ 2.964844] NET: Registered protocol family 17
[ 2.969434] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 2.982669] 8021q: 802.1Q VLAN Support v1.8
[ 2.993105] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 3.001374] Freeing unused kernel memory: 300K
[ 3.005879] This architecture does not have kernel memory protection.
[ 3.804775] init: Console is alive
[ 3.808383] init: - watchdog -
[ 4.648505] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 4.778635] usbcore: registered new interface driver usbfs
[ 4.784326] usbcore: registered new interface driver hub
[ 4.789817] usbcore: registered new device driver usb
[ 4.799038] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.806946] ehci-platform: EHCI generic platform driver
[ 4.812367] ehci-platform ehci-platform.0: EHCI Host Controller
[ 4.818406] ehci-platform ehci-platform.0: new USB bus registered, assigned bus number 1
[ 4.828679] ehci-platform ehci-platform.0: TX-TX IDP fix enabled
[ 4.834792] ehci-platform ehci-platform.0: irq 48, io mem 0x1b000000
[ 4.869276] ehci-platform ehci-platform.0: USB 2.0 started, EHCI 1.00
[ 4.876485] hub 1-0:1.0: USB hub found
[ 4.880562] hub 1-0:1.0: 1 port detected
[ 4.884843] ehci-platform ehci-platform.1: EHCI Host Controller
[ 4.890909] ehci-platform ehci-platform.1: new USB bus registered, assigned bus number 2
[ 4.901203] ehci-platform ehci-platform.1: TX-TX IDP fix enabled
[ 4.907302] ehci-platform ehci-platform.1: irq 49, io mem 0x1b400000
[ 4.939271] ehci-platform ehci-platform.1: USB 2.0 started, EHCI 1.00
[ 4.946476] hub 2-0:1.0: USB hub found
[ 4.950561] hub 2-0:1.0: 1 port detected
[ 4.955148] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 4.972857] init: - preinit -
[ 5.647300] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 5.659320] usb 1-1: new high-speed USB device number 2 using ehci-platform
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 5.861221] hub 1-1:1.0: USB hub found
[ 5.865289] hub 1-1:1.0: 4 ports detected
[ 6.680692] eth0: link up (1000Mbps/Full duplex)
[ 6.685513] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 8.766961] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[ 8.792714] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 8.952342] eth0: link down
[ 8.964278] procd: - early -
[ 8.967278] procd: - watchdog -
[ 9.512763] procd: - watchdog -
[ 9.516148] procd: - ubus -
[ 9.570558] procd: - init -
Please press Enter to activate this console.
[ 9.883284] kmodloader: loading kernel modules from /etc/modules.d/*
[ 9.893387] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 9.907490] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[ 9.915653] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[ 9.924792] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 9.936607] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[ 9.998611] xt_time: kernel timezone is -0000
[ 10.047926] PPP generic driver version 2.4.2
[ 10.054273] NET: Registered protocol family 24
[ 10.113243] ieee80211 phy0: Atheros AR9550 Rev:0 mem=0xb8100000, irq=47
[ 10.209424] kmodloader: done loading kernel modules from /etc/modules.d/*
BusyBox v1.27.2 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r5577+2-6325eee
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# [ 15.944792] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 15.979312] jffs2_build_filesystem(): unlocking the mtd device... [ 15.985416] done.
[ 15.987367] jffs2_build_filesystem(): erasing all blocks after the end marker... [ 19.924024] eth1: link up (1000Mbps/Full duplex)
[ 19.955777] br-lan: port 1(eth1.2) entered blocking state
[ 19.961409] br-lan: port 1(eth1.2) entered disabled state
[ 19.967189] device eth1.2 entered promiscuous mode
[ 19.972091] device eth1 entered promiscuous mode
[ 20.055728] br-lan: port 1(eth1.2) entered blocking state
[ 20.061244] br-lan: port 1(eth1.2) entered forwarding state
[ 20.145844] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 20.180183] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[ 21.160730] eth0: link up (1000Mbps/Full duplex)
[ 21.165550] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 21.215973] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[ 67.341363] jffs2: notice: (860) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
root@OpenWrt:/# reboot
root@OpenWrt:/# [ 129.329646] br-lan: port 1(eth1.2) entered disabled state
[ 129.350086] device eth1.2 left promiscuous mode
[ 129.354683] device eth1 left promiscuous mode
[ 129.359203] br-lan: port 1(eth1.2) entered disabled state
[ 129.369939] IPv6: ADDRCONF(NETDEV_UP): eth1.2: link is not ready
[ 129.382124] eth1: link down
[ 133.645475] Removing MTD device #5 (rootfs_data) with use count 1
[ 133.661399] reboot: Restarting system
�
U-Boot 1.1.4 (Apr 19 2014 - 00:17:22)
ap135 - Scorpion 1.0DRAM:
sri
Scorpion 1.0
ath_ddr_initial_config(200): (32bit) ddr2 init
tap = 0x00000003
Tap (low, high) = (0x5, 0x1e)
Tap values = (0x11, 0x11, 0x11, 0x11)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 207k for U-Boot at: 87fcc000
Reserving 192k for malloc() at: 87f9c000
Reserving 44 Bytes for Board Info at: 87f9bfd4
Reserving 36 Bytes for Global Data at: 87f9bfb0
Reserving 128k for boot params() at: 87f7bfb0
Stack Pointer at: 87f7bf98
Now running in RAM - U-Boot at: 87fcc000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
*** Warning *** : PCIe WLAN Module not found !!!
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
athrs_sgmii_res_cal: cal value = 0x1
Fetching MAC Address from 0x87feea5c
Fetching MAC Address from 0x87feea5c
ath_gmac_enet_initialize: reset mask:c02200
Scorpion ----> S17 PHY *
Vlan config...
s17 phy0 register value 0x00004140
TEST: FINAL REG VAL after TX Calibration - 0x4a000000
TEST: FINAL XMII VAL after RX Calibration - 0x4a000000
TEST: FINAL ETH_CFG VAL after RX Calibration - 0x00000001
athrs17_reg_init: complete
: cfg1 0x80000000 cfg2 0x7335
eth0: 00:03:7f:11:2e:d8
eth0 up
athrs17_reg_init_wan done
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:11:2e:d9
eth1 up
eth0, eth1
Setting 0x18116290 to 0x50a0214f
Hit any key to stop autoboot: 0
## Booting image at 9fe80000 ...
Bad Magic Number
ath>
After re flashing the kernel jffs2_scan_eraseblock() seems to break it agian
[ 8.791757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b00000: 0x2705 instead
[ 8.801384] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b00004: 0x02ec instead
[ 8.811073] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b00008: 0x5b3e instead
[ 8.820697] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b0000c: 0x0015 instead
[ 8.830322] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b00010: 0x8006 instead
[ 8.839941] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b00014: 0x8006 instead
[ 8.849560] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b00018: 0x32e4 instead
[ 8.859171] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b0001c: 0x0505 instead
[ 8.868788] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b00020: 0x4d49 instead
[ 8.878406] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b00024: 0x204f instead
[ 8.888021] jffs2: Further such events for this erase block will not be printed
[ 8.942542] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b10000: 0x2199 instead
[ 8.952161] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b10004: 0x15b4 instead
[ 8.961777] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b10008: 0x2196 instead
[ 8.971395] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b1000c: 0x440a instead
[ 8.981013] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b10010: 0x51d2 instead
[ 8.990632] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b10014: 0x88bd instead
[ 9.000256] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b10018: 0x22ac instead
[ 9.009870] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b1001c: 0x6a85 instead
[ 9.019487] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b10020: 0x8b34 instead
[ 9.029099] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b10024: 0xd87d instead
[ 9.038715] jffs2: Further such events for this erase block will not be printed
[ 9.093222] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b20000: 0xf4a8 instead
[ 9.102843] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b20004: 0x6fae instead
[ 9.112460] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b20008: 0xcb03 instead
[ 9.122077] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b2000c: 0x65c2 instead
[ 9.131696] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b20010: 0xffee instead
[ 9.141318] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b20014: 0xf45e instead
[ 9.150932] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b20018: 0x42d4 instead
[ 9.160551] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b2001c: 0xadd6 instead
[ 9.170170] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b20020: 0xd9ed instead
[ 9.179788] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b20024: 0x87f1 instead
[ 9.189402] jffs2: Further such events for this erase block will not be printed
[ 9.243899] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30000: 0xe821 instead
[ 9.253517] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30004: 0x6af4 instead
[ 9.263132] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30008: 0xfc87 instead
[ 9.272751] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b3000c: 0x6120 instead
[ 9.282369] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30010: 0x607e instead
[ 9.291988] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30014: 0x046a instead
[ 9.301606] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30018: 0xe988 instead
[ 9.311224] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b3001c: 0xc3a5 instead
[ 9.320843] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30020: 0xe635 instead
[ 9.330461] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b30024: 0xe122 instead
[ 9.340075] jffs2: Further such events for this erase block will not be printed
[ 9.394571] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b40000: 0xa30b instead
[ 9.404190] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b40004: 0x2160 instead
[ 9.413806] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00b40008: 0x14d8 instead
Get it working on mesh-orange, otherwise we use Raspbian as base.
Factory LEDE/OpenWRT is broken for mesh point
Fixes as such
sed -i 's#iw dev "$ifname" mesh join "$mesh_id" freq $freq $mesh_htmode \\#iw dev "$ifname" mesh join "$ssid" freq $freq $mesh_htmode \\#' /lib/netifd/wireless/mac80211.sh
sed -i 's#htmode:value\("HT40", "40MHz"\)#htmode:value\("HT40+", "40MHz+"\)#' /usr/lib/lua/luci/model/cbi/admin_network/wifi.lua
sed -i "s#'HT40', '40 MHz', htmodes.HT40#'HT40+', '40 MHz', htmodes.HT40#" /usr/lib/lua/luci/view/cbi/wireless_modefreq.htm
Patch files for the same
--- /lib/netifd/wireless/mac80211.sh.orig 2018-06-22 23:47:52.000000000 +0000
+++ /lib/netifd/wireless/mac80211.sh 2018-06-23 00:00:18.000000000 +0000
@@ -674,7 +674,7 @@
esac
freq="$(get_freq "$phy" "$channel")"
- iw dev "$ifname" mesh join "$mesh_id" freq $freq $mesh_htmode \
+ iw dev "$ifname" mesh join "$ssid" freq $freq $mesh_htmode \
${mcval:+mcast-rate $mcval} \
beacon-interval $beacon_int
fi
--- /usr/lib/lua/luci/model/cbi/admin_network/wifi.lua.orig 2017-07-26 22:50:23.000000000 +0000
+++ /usr/lib/lua/luci/model/cbi/admin_network/wifi.lua 2017-07-26 22:51:02.000000000 +0000
@@ -295,7 +295,7 @@
htmode:depends("hwmode", "11na")
htmode:depends("hwmode", "11n")
htmode:value("HT20", "20MHz")
- htmode:value("HT40", "40MHz")
+ htmode:value("HT40+", "40MHz +")
end
ant1 = s:taboption("advanced", ListValue, "txantenna", translate("Transmitter Antenna"))
--- /usr/lib/lua/luci/view/cbi/wireless_modefreq.htm.orig 2018-06-23 00:08:25.000000000 +0000
+++ /usr/lib/lua/luci/view/cbi/wireless_modefreq.htm 2018-06-23 00:08:32.000000000 +0000
@@ -33,7 +33,7 @@
],
'n': [
'HT20', '20 MHz', htmodes.HT20,
- 'HT40', '40 MHz', htmodes.HT40
+ 'HT40+', '40 MHz', htmodes.HT40
],
'ac': [
'VHT20', '20 MHz', htmodes.VHT20,
Modified broadcast script to "advertise" all users created on the ssb-web client
to do:
&& echo $id
to advertise the pi, or maybe not?#!/bin/bash
id=$(sbot whoami | grep id | awk -F "\"" '{print $4}' | sed 's/.ed25519//' | sed 's/@//')
while true; do
while read -r id; do
for int in $(ls -1Atu /sys/class/net ); do
ip=$(ip addr show $int | grep -v inet6 | grep -v '127.0.0.1' |grep inet | head -n 1 | awk '{print $2}' | awk -F "/" '{print $1}')
if ! [ -z "$ip" ]; then
echo -n "net:$ip:8008~shs:$id" | socat -T 1 - UDP4-DATAGRAM:255.255.255.255:8008,broadcast,so-bindtodevice=$int &
echo "net:$ip:8008~shs:$id"
fi
done
done <<< $(sudo cat /var/www/backend/keys/* | grep id | grep -v "#" | awk '{print $2}' | tr -d '"' | sed 's/.ed25519//' | sed 's/@//')
sleep 15
done
Here is the persistent config in /etc/network/interfaces
IP addresses are just an example, no ip addresses are needed for cjdns to work.
For debugging i set 10.1.1.1 and 10.2.2.1 on the mesh1 and mesh2 network on the librerouter for testing
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
auto eth0.2
iface eth0.2 inet static
address 10.1.1.2
netmask 255.255.255.0
vlan-raw-device eth0
auto eth0.3
iface eth0.3 inet static
address 10.2.2.2
netmask 255.255.255.0
vlan-raw-device eth0
once you make the change you can bring up interfaces without rebooting by using
ifup eth0.2
ifup eth0.3
To compile the os currently follow these steps
wget http://blog.altermundi.net/media/uploads/lime-sdk-LR.tar.bz
mkdir -p /home/nicolas/OS_projects/lime-sdk-LR
cd /home/nicolas/OS_projects
wget http://blog.altermundi.net/media/uploads/lime-sdk-LR.tar.bz
tar xvf lime-sdk-LR.tar.bz
cd lime-sdk-LR
./cooker --update-communities --update-feeds
./cooker -b ar71xx/generic
./cooker -c ar71xx/generic --flavor=lime_default --profile=librerouter-v1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.