I am trying to connect a CANopen motor driver to Ubuntu to control the driver. I used the CANopenNode package and then I connected the two drivers and connected a two 120 ohms resistors at both ends of the bus and I am using a Nvidia AGX Xavier as a controller and I made sure of using the correct pins, but when I using the package this error pops up when I initialize the first node(driver):
./canopend[9886]: (CO_CANerror_rxMsgError) Socket error msg ID: 0x20000004, Data[0..7]: 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00 (can0)
./canopend[9886]: CAN Interface "can0" reached Tx Warning Level
./canopend[9886]: (CO_CANerror_rxMsgError) Socket error msg ID: 0x20000004, Data[0..7]: 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00 (can0)
./canopend[9886]: CAN Interface "can0" changed state to "Tx Passive"
./canopend[9886]: (CO_CANerror_rxMsgError) Socket error msg ID: 0x20000040, Data[0..7]: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 (can0)
./canopend[9886]: CAN Interface "can0" changed to "Bus Off". Switching to Listen Only mode...
./canopend[9886]: (CO_CANerrorSetListenOnly) can0 Set Listen Only
I opened an issue on the package but I am asking if anyone can help me.
Related
I'm trying to use Buildroot to create a linux image for my Banana Pi M2M. My issue is that when I power it up, the system hangs at "Starting kernel..." indefinitely.
Here is the log:
U-Boot 2021.10 (Nov 11 2021 - 11:29:29 +0000) Allwinner Technology
CPU: Allwinner A33 (SUN8I 1667)
Model: BananaPi M2 Magic
DRAM: 512 MiB
MMC: mmc#1c0f000: 0, mmc#1c10000: 2, mmc#1c11000: 1
Loading Environment from FAT... Unable to use mmc 0:1... Unknown monitor
Unknown monitor
In: serial
Out: serial
Err: serial
Allwinner mUSB OTG (Peripheral)
Net: eth0: usb_ether
starting USB...
Bus usb#1c1a000: USB EHCI 1.00
Bus usb#1c1a400: USB OHCI 1.0
scanning bus usb#1c1a000 for devices... 1 USB Device(s) found
scanning bus usb#1c1a400 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
306 bytes read in 1 ms (298.8 KiB/s)
## Executing script at 43100000
23186 bytes read in 2 ms (11.1 MiB/s)
4882032 bytes read in 205 ms (22.7 MiB/s)
Kernel image # 0x46000000 [ 0x000000 - 0x4a7e70 ]
## Flattened Device Tree blob at 49000000
Booting using the fdt blob at 0x49000000
Using Device Tree in place at 49000000, end 49008a91
DE is present but not probed
Starting kernel ...
As there is no buildroot defconfig for the BananaPi M2M, I'm working from a modified olimex_a33_olinuxino_defconfig (Both boards use the Allwinner A33 processor). I am, however, using both the Bananapi_m2m_defconfig and sun8i-r16-bananapi-m2m.dts from u-boot.
My modified olimex defconfig:
# Architecture
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_NEON_VFPV4=y
# Linux headers same as kernel, a 5.14 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
# System configuration
BR2_TARGET_GENERIC_HOSTNAME="bananapi-m2m"
BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M2M"
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyS2"
# Bootloaders
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.10"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="Bananapi_m2m"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
BR2_TARGET_UBOOT_FORMAT_BIN=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_BANANAPI_M2M_PATH)/board/bananapi-m2m/boot.cmd"
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.13"
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-r16-bananapi-m2m.dts"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_BANANAPI_M2M_PATH)/board/bananapi-m2m/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_BANANAPI_M2M_PATH)/board/bananapi-m2m/genimage.cfg"
# Additional tools
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_MTOOLS=y
The specific tweaks I made:
Changed the getty port to ttyS2 (the default debug uart for the m2m is uart2)
Swapped to the pre-existing uboot defconfig for Bananapi_m2m
Swapped to the pre-existing device tree file from u-boot
Redirected boot.cmd to an external package
Redirected post-build.sh and genimage.cfg to an external package
At the moment, boot.cmd, post-build.sh and genimage.cfg are unmodified copies of the olimex versions. I'll include boot.cmd for reference.
boot.cmd:
setenv bootargs console=ttyS2,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra}
ext4load mmc 0 0x49000000 /boot/${fdtfile}
ext4load mmc 0 0x46000000 /boot/zImage
env set fdt_high ffffffff
bootz 0x46000000 - 0x49000000
I'm somewhat of a novice, so apologies if I've shared too much irrelevant information. If anyone has any insight I'd greatly appreciate it, I feel a little blind with the only output being "Starting Kernel..."
EDIT: I reverted the boot argument back to ttyS0 and it got over the initial hang. I'm not sure what part it's hanging at now, is it failing to run the Getty?
U-Boot 2021.10 (Nov 12 2021 - 12:27:32 +0000) Allwinner Technology
CPU: Allwinner A33 (SUN8I 1667)
Model: BananaPi M2 Magic
DRAM: 512 MiB
MMC: mmc#1c0f000: 0, mmc#1c10000: 2, mmc#1c11000: 1
Loading Environment from FAT... Unable to use mmc 0:1... Unknown monitor
Unknown monitor
In: serial
Out: serial
Err: serial
Allwinner mUSB OTG (Peripheral)
Net: eth0: usb_ether
starting USB...
Bus usb#1c1a000: USB EHCI 1.00
Bus usb#1c1a400: USB OHCI 1.0
scanning bus usb#1c1a000 for devices... 1 USB Device(s) found
scanning bus usb#1c1a400 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
294 bytes read in 1 ms (287.1 KiB/s)
## Executing script at 43100000
23186 bytes read in 3 ms (7.4 MiB/s)
4882032 bytes read in 204 ms (22.8 MiB/s)
Kernel image # 0x46000000 [ 0x000000 - 0x4a7e70 ]
## Flattened Device Tree blob at 49000000
Booting using the fdt blob at 0x49000000
Using Device Tree in place at 49000000, end 49008a91
DE is present but not probed
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.14.13 (ryan#ryan-VirtualBox) (arm-buildroot-linux-uclibcgnueabihf-gcc.br_real (Buildroot 2021.11-rc1-106-g827bd376e3) 10.3.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP Fri Nov 12 11:27:52 GMT 2021
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 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: BananaPi M2 Magic
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 16 MiB at 0x5f000000
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
[ 0.000000] percpu: Embedded 15 pages/cpu s31628 r8192 d21620 u61440
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 490592K/524288K available (7168K kernel code, 910K rwdata, 1984K rodata, 1024K init, 231K bss, 17312K reserved, 16384K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] random: get_random_bytes called from start_kernel+0x484/0x638 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000019] Switching to timer-based delay loop, resolution 41ns
[ 0.000232] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000684] Console: colour dummy device 80x30
[ 0.000745] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000767] pid_max: default: 32768 minimum: 301
[ 0.000897] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000916] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001619] CPU: Testing write buffer coherency: ok
[ 0.001938] /cpus/cpu#0 missing clock-frequency property
[ 0.001977] /cpus/cpu#1 missing clock-frequency property
[ 0.001998] /cpus/cpu#2 missing clock-frequency property
[ 0.002021] /cpus/cpu#3 missing clock-frequency property
[ 0.002036] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002531] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002655] rcu: Hierarchical SRCU implementation.
[ 0.003134] smp: Bringing up secondary CPUs ...
[ 0.003873] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.004705] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.005469] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.005563] smp: Brought up 1 node, 4 CPUs
[ 0.005594] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[ 0.005606] CPU: All CPU(s) started in HYP mode.
[ 0.005613] CPU: Virtualization extensions available.
[ 0.006185] devtmpfs: initialized
[ 0.011678] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.011896] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.011926] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.012703] pinctrl core: initialized pinctrl subsystem
[ 0.013768] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.015138] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.016103] thermal_sys: Registered thermal governor 'step_wise'
[ 0.016635] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.016662] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.023731] platform 1e60000.display-backend: Fixing up cyclic dependency with 1e00000.display-frontend
[ 0.024061] platform 1e70000.drc: Fixing up cyclic dependency with 1e60000.display-backend
[ 0.035542] SCSI subsystem initialized
[ 0.035979] usbcore: registered new interface driver usbfs
[ 0.036030] usbcore: registered new interface driver hub
[ 0.036074] usbcore: registered new device driver usb
[ 0.036247] mc: Linux media interface: v0.10
[ 0.036283] videodev: Linux video capture interface: v2.00
[ 0.036381] pps_core: LinuxPPS API ver. 1 registered
[ 0.036392] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
[ 0.036414] PTP clock support registered
[ 0.036775] Advanced Linux Sound Architecture Driver Initialized.
[ 0.037608] clocksource: Switched to clocksource arch_sys_counter
[ 0.044554] NET: Registered PF_INET protocol family
[ 0.044741] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.045332] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.045370] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.045416] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.045483] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.045606] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.045657] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.045833] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.046512] RPC: Registered named UNIX socket transport module.
[ 0.046534] RPC: Registered udp transport module.
[ 0.046542] RPC: Registered tcp transport module.
[ 0.046549] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.047978] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[ 0.053618] NFS: Registering the id_resolver key type
[ 0.053671] Key type id_resolver registered
[ 0.053680] Key type id_legacy registered
[ 0.053769] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.053783] io scheduler mq-deadline registered
[ 0.053794] io scheduler kyber registered
[ 0.057821] sun8i-a33-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.104123] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.105906] sun8i-a33-pinctrl 1c20800.pinctrl: supply vcc-pb not found, using dummy regulator
[ 0.106801] printk: console [ttyS0] disabled
[ 0.127056] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 41, base_baud = 1500000) is a U6_16550A
[ 0.791590] printk: console [ttyS0] enabled
[ 0.796249] sun8i-a33-pinctrl 1c20800.pinctrl: supply vcc-pg not found, using dummy regulator
[ 0.825603] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 42, base_baud = 1500000) is a U6_16550A
[ 0.842426] lima 1c40000.gpu: gp - mali400 version major 1 minor 1
[ 0.848709] lima 1c40000.gpu: pp0 - mali400 version major 1 minor 1
[ 0.855018] lima 1c40000.gpu: pp1 - mali400 version major 1 minor 1
[ 0.861333] lima 1c40000.gpu: l2 cache 64K, 4-way, 64byte cache line, 64bit external bus
[ 0.869824] lima 1c40000.gpu: bus rate = 200000000
[ 0.874621] lima 1c40000.gpu: mod rate = 384000000
[ 0.879511] lima 1c40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[ 0.887881] lima 1c40000.gpu: Failed to register cooling device
[ 0.894173] [drm] Initialized lima 1.1.0 20191231 for 1c40000.gpu on minor 0
[ 0.904373] libphy: Fixed MDIO Bus: probed
[ 0.909324] CAN device driver interface
[ 0.913799] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.920352] ehci-platform: EHCI generic platform driver
[ 0.925697] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.931896] ohci-platform: OHCI generic platform driver
[ 0.938647] sun6i-rtc 1f00000.rtc: registered as rtc0
[ 0.943732] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01T00:00:06 UTC (6)
[ 0.951685] sun6i-rtc 1f00000.rtc: RTC enabled
[ 0.956410] i2c /dev entries driver
[ 0.961594] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 0.970388] sun8i-a33-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[ 0.979609] sun4i-ss 1c15000.crypto-engine: Die ID 5
[ 0.986353] usbcore: registered new interface driver usbhid
[ 0.991972] usbhid: USB HID core driver
[ 0.998190] cedrus 1c0e000.video-codec: Device registered as /dev/video0
[ 1.007831] NET: Registered PF_PACKET protocol family
[ 1.012914] can: controller area network core
[ 1.017335] NET: Registered PF_CAN protocol family
[ 1.022157] can: raw protocol
[ 1.025131] can: broadcast manager protocol
[ 1.029335] can: netlink gateway - max_hops=1
[ 1.033886] Key type dns_resolver registered
[ 1.038244] Registering SWP/SWPB emulation handler
[ 1.052575] sun8i-a23-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 1.061524] sun8i-a23-r-pinctrl 1f02c00.pinctrl: supply vcc-pl not found, using dummy regulator
[ 1.071777] sun8i-a33-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[ 1.081200] sunxi-rsb 1f03400.rsb: RSB running at 3000000 Hz
[ 1.087266] axp20x-rsb sunxi-rsb-3a3: AXP20x variant AXP223 found
[ 1.095175] input: axp20x-pek as /devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/input/input0
[ 1.106201] axp20x-adc axp22x-adc: DMA mask not set
[ 1.111766] vcc-3v0: supplied by regulator-dummy
[ 1.116741] vdd-sys: supplied by regulator-dummy
[ 1.121703] vdd-cpu: supplied by regulator-dummy
[ 1.126699] dcdc4: supplied by regulator-dummy
[ 1.131331] vcc-dram: supplied by regulator-dummy
[ 1.136344] vcc-lcd: supplied by vcc-3v0
[ 1.140440] vdd-cpus: supplied by vcc-dram
[ 1.144842] vcc-io: supplied by regulator-dummy
[ 1.149665] vdd-dll: supplied by regulator-dummy
[ 1.154568] avcc: supplied by regulator-dummy
[ 1.159328] eldo1: supplied by vcc-3v0
[ 1.163327] eldo2: supplied by vcc-3v0
[ 1.167310] eldo3: supplied by vcc-3v0
[ 1.171207] vcc-wifi0: Bringing 700000uV into 3300000-3300000uV
[ 1.177225] vcc-wifi0: supplied by regulator-dummy
[ 1.182335] vcc-wifi1: Bringing 700000uV into 3300000-3300000uV
[ 1.188345] vcc-wifi1: supplied by regulator-dummy
[ 1.193532] dldo3: supplied by regulator-dummy
[ 1.198268] dldo4: supplied by regulator-dummy
[ 1.202824] vcc-rtc: supplied by regulator-dummy
[ 1.207817] ldo_io0: supplied by regulator-dummy
[ 1.212658] ldo_io1: supplied by regulator-dummy
[ 1.217553] usb0-vbus: supplied by regulator-dummy
[ 1.222918] axp20x-ac-power-supply axp20x-ac-power-supply: DMA mask not set
[ 1.231521] axp20x-usb-power-supply axp20x-usb-power-supply: DMA mask not set
[ 1.239730] axp20x-rsb sunxi-rsb-3a3: AXP20X driver loaded
[ 1.245511] sun8i-a33-pinctrl 1c20800.pinctrl: supply vcc-ph not found, using dummy regulator
[ 1.255424] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.261062] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.269432] ehci-platform 1c1a000.usb: irq 35, io mem 0x01c1a000
[ 1.297627] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.304497] hub 1-0:1.0: USB hub found
[ 1.308306] hub 1-0:1.0: 1 port detected
[ 1.313249] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.319904] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.327926] ohci-platform 1c1a400.usb: irq 36, io mem 0x01c1a400
[ 1.402286] hub 2-0:1.0: USB hub found
[ 1.406074] hub 2-0:1.0: 1 port detected
[ 1.411055] usb_phy_generic usb_phy_generic.1.auto: supply vcc not found, using dummy regulator
[ 1.420687] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[ 1.426451] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 3
[ 1.435350] hub 3-0:1.0: USB hub found
[ 1.439160] hub 3-0:1.0: 1 port detected
[ 1.449278] sun8i-a33-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[ 1.461544] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[ 1.461712] ALSA device list:
[ 1.469798] No soundcards found.
[ 1.476675] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 1.495095] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[ 1.501801] sunxi-mmc 1c11000.mmc: initialized, max. request size: 16384 KB
[ 1.513285] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.520626] Waiting for root device /dev/mmcblk0p1...
[ 1.538171] mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1.545246] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.553349] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.562819] mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1.571394] random: fast init done
[ 1.574859] mmc2: host does not support reading read-only switch, assuming write-enable
[ 1.583265] mmc0: queuing unknown CIS tuple 0x81 (9 bytes)
[ 1.589182] mmc2: new high speed SDHC card at address aaaa
[ 1.600494] mmcblk2: mmc2:aaaa SB16G 14.8 GiB
[ 1.616008] mmcblk2: p1
[ 1.710991] mmc0: new high speed SDIO card at address 0001
[ 31.848045] vcc-lcd: disabling
EDIT 2: I'm a dumb, the root filesystem isn't being mounted. Have changed to root=/dev/mmcblk2p1 in boot.cmd and now it works.
The contract which I compile in Remix and depoly on Ropsten.
pragma solidity ^0.5.11;
contract Deployer {
constructor() public {
bytes memory bytecode = hex'61000061000061000061000061006161000301610000619789f100';
assembly {
return (add(bytecode, 0x20), mload(bytecode))
}
}
}
Its bytecode in Remix is
{
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b5060606040518060400160405280601b81526020017f61000061000061000061000061006161000301610000619789f10000000000008152509050805160208201f3fe",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x61000061000061000061000061006161000301610000619789F1000000000000 DUP2 MSTORE POP SWAP1 POP DUP1 MLOAD PUSH1 0x20 DUP3 ADD RETURN INVALID ",
"sourceMap": "28:241:0:-;;;53:213;8:9:-1;5:2;;;30:1;27;20:12;5:2;53:213:0;85:21;:83;;;;;;;;;;;;;;;;;;;238:8;232:15;225:4;215:8;211:19;203:45"
}
Its runtime bytecode is
{
"linkReferences": {},
"object": "6080604052600080fdfea265627a7a7231582046db7afc80e31555b0d8a4dd3357ac5c36930b00fef8a32c2746b725244550ae64736f6c63430005110032",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CHAINID 0xDB PUSH27 0xFC80E31555B0D8A4DD3357AC5C36930B00FEF8A32C2746B7252445 POP 0xAE PUSH5 0x736F6C6343 STOP SDIV GT STOP ORIGIN ",
"sourceMap": "28:241:0:-;;;;;"
}
But when I deploy it to the Ropsten:https://ropsten.etherscan.io/address/0xCE1e482Bb5600f7DE9d316bcd30fb53cBAd4DcBe#code
Its bytecode is
0x61000061000061000061000061006161000301610000619789f100
I want to know what is the reason for this situation.
The Remix bytecode export contains the bytecode variable definition and assembly block without the constructor being executed - just the actual definitions compiled to bytecode.
Constructor usually returns the contract instance (including its parent contracts and imported libraries). But in this case, the assembly block forces the EVM to not return the contract instance, but to return the value of the bytecode variable from the constructor.
Then the deployment process continues as usual - the EVM stores the constructor return value (usually the contract instance, now the bytecode) into the contract storage.
I got 4 relay module with esp01 from aliexpress but it switch relays not through pins.
How I can control this relay module with esphome?
found answer in home assistant community
relay control through uart, with some data and need disable logger:
here is config in yaml format for esphome 4 relay esp01 module
# Enable logging
logger:
baud_rate: 0 #need this to free up UART pins
uart:
baud_rate: 115200 # speed to STC15L101EW
tx_pin: GPIO1
rx_pin: GPIO3
switch:
- platform: uart
name: "A1on"
data: [0xA0, 0x01, 0x01, 0xA2]
- platform: uart
name: "A1off"
data: [0xA0, 0x01, 0x00, 0xA1]
- platform: uart
name: "A2on"
data: [0xA0, 0x02, 0x01, 0xA3]
- platform: uart
name: "A2off"
data: [0xA0, 0x02, 0x00, 0xA2]
- platform: uart
name: "A3on"
data: [0xA0, 0x03, 0x01, 0xA4]
- platform: uart
name: "A3off"
data: [0xA0, 0x03, 0x00, 0xA3]
- platform: uart
name: "A4on"
data: [0xA0, 0x04, 0x01, 0xA5]
- platform: uart
name: "A4off"
data: [0xA0, 0x04, 0x00, 0xA4]
after this we got 8 switches, that separate on and off each relay (2 on each relay)
# Enable logging
logger:
baud_rate: 0 #need this to free up UART pins
uart:
baud_rate: 9600 # speed to STC15L101EW
tx_pin: 1
rx_pin: 3
globals:
- id: on_flag_1
type: int
restore_value: no
initial_value: '0'
- id: on_flag_2
type: int
restore_value: no
initial_value: '0'
- id: on_flag_3
type: int
restore_value: no
initial_value: '0'
- id: on_flag_4
type: int
restore_value: no
initial_value: '0'
switch:
- platform: template
id: relay1
name: "Relay #1"
lambda:
return id(on_flag_1);
turn_on_action:
- uart.write: [0xA0, 0x01, 0x01, 0xA2]
- globals.set:
id: on_flag_1
value: '1'
turn_off_action:
- uart.write: [0xA0, 0x01, 0x00, 0xA1]
- globals.set:
id: on_flag_1
value: '0'
- platform: template
id: relay2
name: "Relay #2"
lambda:
return id(on_flag_2);
turn_on_action:
- uart.write: [0xA0, 0x02, 0x01, 0xA3]
- globals.set:
id: on_flag_2
value: '1'
turn_off_action:
- uart.write: [0xA0, 0x02, 0x00, 0xA2]
- globals.set:
id: on_flag_2
value: '0'
- platform: template
id: relay3
name: "Relay #3"
lambda:
return id(on_flag_3);
turn_on_action:
- uart.write: [0xA0, 0x03, 0x01, 0xA4]
- globals.set:
id: on_flag_3
value: '1'
turn_off_action:
- uart.write: [0xA0, 0x03, 0x00, 0xA3]
- globals.set:
id: on_flag_3
value: '0'
- platform: template
id: relay4
name: "Relay #4"
lambda:
return id(on_flag_4);
turn_on_action:
- uart.write: [0xA0, 0x04, 0x01, 0xA5]
- globals.set:
id: on_flag_4
value: '1'
turn_off_action:
- uart.write: [0xA0, 0x04, 0x00, 0xA4]
- globals.set:
id: on_flag_4
value: '0'
I have a single but extended it based on what worked on my single this will produce 4 switches that can be toggled on/off.
I'm trying to do some reverse engineering on the MacOS's Mail.app.
For this, I'm using class-dump, but I receive the following output:
Silviu:~ silviu$ class-dump /System/Applications/Mail.app
2020-04-08 10:54:36.536 class-dump[52413:2202003] Unknown load command: 0x00000032
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#pragma mark -
//
// File: /System/Applications/Mail.app/Contents/MacOS/Mail
// UUID: 7C43215A-CB02-3FF4-9559-20231135B148
//
// Arch: x86_64
// Source version: 3608.40.2.2.4
//
//
// This file does not contain any Objective-C runtime information.
//
I cannot believe that there does not exist some Objective-C stuff.
I am attempting to setup a hybrid ACS-Engine with Kubernetes. I am able to setup the Linux agentPool successfully. When I add the Windows agentPool, I receive an error. I only get this when osType is Windows.
I am using the following to setup the agentPools:
"agentPoolProfiles": [
{
"name": "linuxpool1",
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet",
"osType": "Linux"
},
{
"name": "windowspool2",
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet",
"osType": "Windows"
}
],
When the Windows agentPool is included, I receive the following error:
MacBook-Pro:acs-engine appalachios$ ./acs-engine -artifacts zeuscluster zeus_deploy_v1.json
acsengine took 2.42314ms
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x112a551]
goroutine 1 [running]:
github.com/Azure/acs-engine/pkg/api/vlabs.
(*Properties).Validate(0xc420070420, 0x4ce, 0x6ce)
/Users/appalachios/gopath/src/github.com/Azure/acs-
engine/pkg/api/vlabs/validate.go:241 +0x471
github.com/Azure/acs-engine/pkg/api.LoadContainerService(0xc420077500, 0x4ce, 0x6ce,
0xc4200159f0, 0x5, 0x0, 0x0, 0x6ce)
/Users/appalachios/gopath/src/github.com/Azure/acs-engine/pkg/api/apiloader.go:73 +0x398
github.com/Azure/acs-engine/pkg/api.DeserializeContainerService(0xc420077500, 0x4ce, 0x6ce, 0x4ce, 0x6ce, 0x0, 0x0, 0x1271fc0)
/Users/appalachios/gopath/src/github.com/Azure/acs-engine/pkg/api/apiloader.go:30 +0x13a
github.com/Azure/acs-engine/pkg/api.LoadContainerServiceFromFile(0x7fff5fbffbfc, 0x13, 0x0, 0x0, 0x0, 0x0, 0x10b7510)
/Users/appalachios/gopath/src/github.com/Azure/acs-engine/pkg/api/apiloader.go:20 +0x1bd
main.main()
/Users/appalachios/gopath/src/github.com/Azure/acs-engine/acs-engine.go:205 +0x3c2
I am guessing you might be missing windowsProfile in your input API model. E.g.:
"windowsProfile": {
"adminUsername": "azureuser",
"adminPassword": "replacepassword1234$"
}
I will take the feedback to return a better error message in this case. But can you confirm if you have windowsProfile in your API model that you generated the template with?