Armbian - Netlink operation failed: netlink support not available - gsm

i have a problem with usb modem & armbian on Rock64.
I have fresh image of Armbian 22.08 Jammy on my Rock64 hardware.
I plugged in DWM-222 (D-link usb gsm modem), installed usb-modeswitch & modem-manager
and i have created connection with modem-manager.
The connection was working successfully for one day, but then it lost connection.
I made a restart and it was up again for few minutes. Then got down.
Now i am unable to get it working at all.
I tried again total clean image with just the steps above, and it keeps reporting
netlink operation failed: netlink support not available
I couldn't find anything about this error on the internet.
Power supply is proper one (3A) and DWM-222 is working normally on my Ubuntu desktop PC.
This is full log:
Nov 16 20:17:45 rock64 NetworkManager[1630]: <warn> [1668626265.2333] modem-broadband[cdc-wdm0]: failed to connect modem: Couldn't reset interface before setting up data format: netlink operation failed: netlink support not available
Nov 16 20:17:45 rock64 NetworkManager[1630]: <info> [1668626265.2335] device (cdc-wdm0): state change: prepare -> failed (reason 'unknown', sys-iface-state: 'managed')
Nov 16 20:17:45 rock64 NetworkManager[1630]: <warn> [1668626265.2388] device (cdc-wdm0): Activation: failed for connection 'DLINK_modem'
Nov 16 20:17:45 rock64 NetworkManager[1630]: <info> [1668626265.2400] device (cdc-wdm0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Do you have any suggestions ?
Thank you

Related

MXChip IoT DevKit Upload Failed

I'm getting an error when I try to upload a sketch to the MXChip IoT Devkit:
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.10.0-00114-g8419536 (2017-04-18-22:14)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: open failed
in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 495
in procedure 'ocd_bouncer'
** OpenOCD init failed **
shutdown command invoked
I have tried different USB ports, different USB cables, and uploading with both the Arduino IDE and VS Code. I'm using the standalone version of the Arduino IDE, not the MS store version. I'm using Windows 10.
Here is the version info that the board reports in configuration mode:
# version
DevKitSDK version: 2.0.0
Mico version: 31620002.049
mbed-os version: 5.4.3
mbed TLS version: 2.15.0
WIFI version: wl0: Sep 10 2014 11:28:46 version 5.90.230.10

openocd - problem flashing nrf52 using stlink

I've got some issues flashing firmware using an STLINKv2 (from a Nucleo board) with an nRF52 target device using SWD. In short, I'm able to "connect" to the nRF52 (I can open a telnet session), but as soon as I try a Program command, I get a non-helpful error (below). Hex file is compiled using Arduino "export bin" file option. (Using a SEGGER isn't an option right now)
More details below:
OSX version 10.14.6, OpenOCD version 0.10.0.
Running in terminal openocd -f interface/stlink-v2-1.cfg -f target/nrf52.cfg returns:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 10000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v17 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 0.014192
Error: target voltage may be too low for reliable debugging
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
I can then telnet in using telnet localhost 4444:
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
In telnet, I can run basic commands on the nRF52, and when I execute: program /full/path/to/hex/file.hex I get the following message:
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
embedded:startup.tcl:476: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 532
at file "embedded:startup.tcl", line 476
Would love to know what I'm doing wrong!
ETA: The voltage error is not related; that was due to a bug in the Nucleo SWD programmer hardware one has to solder a jumper wire from the VDD-TARGET to the outward pin of R24. (When you break off the Nucleo from the STLINK board, you break off this link) Have done that, however the problem persists.

Problem Flashing nrf52 chip using Openocd

I have a custom nrf52 chip on a pcb with swd pins exposed. I have cloned and installed the latest openocd from https://github.com/ntfreak/openocd. The latest version includes all the latest pathes for the nrf52 chip, so no need for any additional changes as suggested in many older guides online. I am able to connect to the chip using ST-LinkV2. when connected I can read and write memory locations using mdw and mdb. I can also run some basic openocd commands like dump_image e.t.c, which confirms that the setup is good. But halt and program commannds always lead to errors like:
JTAG failure -4
JTAG failure -4
JTAG failure -4
JTAG failure -4
JTAG failure -4
JTAG failure -4
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 00000000 msp: 00000000
jtag status contains invalid mode value - communication failure
Polling target nrf52.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Previous state query failed, trying to reconnect
jtag status contains invalid mode value - communication failure
Polling target nrf52.cpu failed, trying to reexamine
if I try to use flash image_write I get the error,
JTAG failure
Error setting register
error starting target flash write algorithm
Failed to enable read-only operation
Failed to write to nrf52 flash
error writing to flash at address 0x00000000 at offset 0x00000000
in procedure 'dap'
jtag status contains invalid mode value - communication failure
Polling target nrf52.cpu failed, trying to reexamine
I have read different guides online, and one of the possible solutions involves the APPPROTECT register which has to be disabled to enable any writes to flash.
APP_PROTECT, But the dap commmand which is supposed to help us access this bit,
dap apreg 1 0x04 0x01
returns an error:
invalid subcommand apreg 1 0x04 0x01
Please, I will like to know if anyone has had success programming a new empty nrf52 chip with the stlink-v2 and the steps which are necessary, or if any one has encountered similar problems. Thanks.
Here is my config file:
#nRF52832 Target
source [find interface/stlink.cfg]
transport select hla_swd
source [find target/nrf52.cfg]
#reset_config srst_nogate connect_assert_srst
I solved the "protected nRF52" chip problem this way, on Windows, using a Particle.io Debugger https://store.particle.io/products/particle-debugger setup to program nRF52 chips from Arduino as described in https://www.forward.com.au/pfod/BLE/LowPower/index.html
Note: The recovery process described here does NOT need Arduino to be installed
Download OpenOCD-20181130.7z pre-compiled openocd for windows from
http://gnutoolchains.com/arm-eabi/openocd/
The latest version of openocd src on https://github.com/ntfreak/openocd should also work as it includes the apreg cmd in target\arm_adi_v5.c
unzip, open cmd prompt to unzip dir, enter cmd
bin\openocd.exe -d2 -f interface/cmsis-dap.cfg -f target/nrf52.cfg
response
Info : auto-selecting first available session transport "swd". To override use '
transport select <transport>'.
adapter speed: 1000 kHz
cortex_m reset_config sysresetreq
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 1.10
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Error: Could not find MEM-AP to control the core
Info : Listening on port 3333 for gdb connections
Open telnet program eg teraTerm and connect to localhost on port 4444, i.e. 127.0.0.1 telnet port 4444
cmd window shows
Info : accepting 'telnet' connection on tcp/4444
in telnet (i.e. teraTerm) type
nrf52.dap apreg 1 0x04
returns 0 <<< chip protected
then
nrf52.dap apreg 1 0x04 0x01
then
nrf52.dap apreg 1 0x04
returns 1 << chip un-protected
then power cycle board
Can now use arduino ide to flash softdevice and code low power BLE
Even though the dap command is listed by openOCD help, it isn't implemented for transport hla_swd that you have to use with ST-Link.
If the ST-Link is a generic type from China, it can be upgraded to CMSIS-DAP which uses the swd transport and supports the nrf52.dap apreg 1 0x04 0x01 command to disable the readback protection and erase the flash. You'll need another ST-Link to do that, or you can instead install CMSIS-DAP on a generic STM32F103C8T6 board.
After that you can either use ST-Link to program the nRF52 or continue using CMSIS-DAP, which can also be used to program STM32 MCU.
Nucleo board embedded ST-Links can also be upgraded to J-Link, which allow the use of the "recover" option in nRFgo Studio to erase the flash, it should also work with "nrfjtool --recover" or OpenOCD.
If anyone encounters this problem, I solved the problem by getting an original Jlink-Edu. I also had to pull the reset pin of the microcontroller high to get the jlink working.
There are lots of JTAG messages.
I think you might be missing the
transport select hla_swd
line in your (board) cfg file. The NRF5x chips only work properly with SWD, and ST-Link uses the hla_swd variant.

Asterisk WARNING[4695]: chan_dahdi.c:12320 do_monitor: Read failed with -1: Invalid argument

when I restart Asterisk and connect to the Asterisk console with a
asterisk -rv
Asterisk is spitting thousands of
WARNING[4695]: chan_dahdi.c:12320 do_monitor: Read failed with -1: Invalid argument
after some minutes of this crazy spitting of messages it quits with a
*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
a dmesg shows:
[ 3561.591539] asterisk[4695]: segfault at b3150fec ip b73a4b8d sp b3150ff0 error 6 in libc-2.19.so[b7334000+1a8000]
I have no idea how to deal with this and find no similar error anywhere.
I am using a Digium TDM410P telephony card with 2 FXO and two FXS interfaces.
Dahdi linux driver < 2.10.0.1 is incompatible with linux kernel 3.16+
See complete problem description and fix in Asterisk Jira:
https://issues.asterisk.org/jira/browse/DAHLIN-340

Raspberry Pi sim900 Default Internet Access

I have set up a ITEAD sim900 GSM module to interface with raspberry pi. I believe I have established a gprs connection to AT&T though wvdial as I get these results.
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: AT+CGDCONT=1,"IP","Broadband"
AT+CGDCONT=1,"IP","Broadband"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Aug 14 05:49:20 2014
--> Pid of pppd: 2794
I have been looking all over the internet for some answers to a few questions that I have, but I can't seem to find any. Any help with the following questions will be greatly appreciated! Thanks!
I have three questions, and some may be stupid as I am VERY new to this field.
Am I actually connected to AT&T's GPRS network?
How can I make this module (serial port /dev/ttyAMA0) my default internet connection? What I mean is I want all internet traffic routed through this modem(web surfing, email etc.). I am connected to the Raspberry via ssh so I have to have either ethernet or wifi active to access the computer--I am currently using ethernet. After I connect through wvdial in the way shown above, and disable all other internet sources I have no access. It seems to still be looking to the active ethernet port for data(I could be wrong).
For my project I need to have the sim900 modem as the internet access point, but I also need to be able to connect to a LAN via wifi that has no internet access. Is this possible?
Finally i got the ( raspberrypi + ppp + gprs/gsm-modem ) working.
Some notes before start:
Make sure the power supply you used for raspberrypi is exact 5V and it can provide at-least 2A current without voltage drop-out.The SIM900 power-source must be 3.3V 2A
Set the SIM900 baud rate to 115200 via: AT+IPR=115200
Check the modem serial peripheral via: $ screen /dev/ttyAMA0 115200 type AT<enter> it will echo: OK. Hit ctrl+a k y to exit.
/etc/ppp/options-mobile
ttyAMA0
115200
lock
crtscts
modem
passive
novj
defaultroute
replacedefaultroute
noipdefault
usepeerdns
noauth
hide-password
persist
holdoff 10
maxfail 0
debug
Create the /etc/ppp/peers directory:
$ mkdir /etc/ppp/peers
$ cd /etc/ppp/peers
/etc/ppp/peers/mobile-auth
file /etc/ppp/options-mobile
user "your_usr"
password "your_pass"
connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat"
/etc/ppp/peers/mobile-noauth
file /etc/ppp/options-mobile
connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat"
Create the /etc/ppp/chatscripts directory:
$ mkdir /etc/ppp/chatscripts
/etc/ppp/chatscripts/mobile-modem.chat
ABORT 'BUSY'
ABORT 'NO CARRIER'
ABORT 'VOICE'
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT 'DELAYED'
REPORT CONNECT
TIMEOUT 6
'' 'ATQ0'
'OK-AT-OK' 'ATZ'
TIMEOUT 3
'OK' #/etc/ppp/chatscripts/pin
'OK\d-AT-OK' 'ATI'
'OK' 'ATZ'
'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'
'OK' #/etc/ppp/chatscripts/mode
'OK-AT-OK' #/etc/ppp/chatscripts/apn
'OK' 'ATDT*99***1#'
TIMEOUT 30
CONNECT ''
/etc/ppp/chatscripts/my-operator-apn
AT+CGDCONT=1,"IP","<apn-name>"
/etc/ppp/chatscripts/pin.CODE
AT+CPIN=1234
/etc/ppp/chatscripts/pin.NONE
AT
/etc/ppp/chatscripts/mode.3G-only
AT\^SYSCFG=14,2,3fffffff,0,1
/etc/ppp/chatscripts/mode.3G-pref
AT\^SYSCFG=2,2,3fffffff,0,1
/etc/ppp/chatscripts/mode.GPRS-only
AT\^SYSCFG=13,1,3fffffff,0,0
/etc/ppp/chatscripts/mode.GPRS-pref
AT\^SYSCFG=2,1,3fffffff,0,0
The SYSCFG line in the mode.* files is device-dependent, and likely Huawei-specific, So You may use the mode.NONE file if your modem is
SIM900.
*
/etc/ppp/chatscripts/mode.NONE
AT
Make some symbolic links:
$ ln -s /etc/ppp/chatscripts/my-operator-apn /etc/ppp/chatscripts/apn
$ ln -s /etc/ppp/chatscripts/mode.NONE /etc/ppp/chatscripts/mode
$ ln -s /etc/ppp/chatscripts/pin.NONE /etc/ppp/chatscripts/pin
If you have to enter credentials use mobile-auth
$ mv provider provider.example
$ ln -s /etc/ppp/peers/mobile-noauth /etc/ppp/peers/provider
Check syslog in another console:
$ tail -f /var/log/syslog | grep -Ei 'pppd|chat'
Finally issue the pon command to see the result:
$ pon
The base instruction : https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd

Resources