Hi Bohdan,

thank you for your report. I'm aware of this issue but I don't consider
this as bug in libjaylink. We ask libjaylink to discover TCP devices
but there are no ethernet devices available.

Maybe I will introduce a special check for "network not available" but
I'm not sure if and when. We could introduction a switch to disable TCP
discovery in openocd but this would be a bit ugly IMO. For the moment,
I would suggest to use a dummy ethernet device as workaround:

 $ ip link add eth23 type dummy
 $ ip address change dev eth23 10.0.0.1
 $ ip link set eth23 up
 $ route add default gw 10.0.0.1 dev eth23

I hope this solves your problem for the moment. Anyway, I'm open for
input if you have a proper solution for this issue.

Best regards,
Marc

On Mon, 2021-01-18 at 12:26 +0000, Bohdan Tymkiv via OpenOCD-devel
wrote:
> [tickets:#294] libjaylink fails to discover devices when network is
> down and J-Link S/N is specified
> 
> Status: new
> Milestone: 0.10.0
> Created: Mon Jan 18, 2021 12:26 PM UTC by Bohdan Tymkiv
> Last Updated: Mon Jan 18, 2021 12:26 PM UTC
> Owner: nobody
> 
> This issue is rather related to libjaylink library but I was unable
> to find any public libjaylink bug tracker so I'm posting the issue
> here.
> 
> libjaylink is unable to find the probe by it's serial number when all
> network interfaces are down/disconnected. This makes it impossible to
> use OpenOCD on offline machines with several JLink probes connected.
> 
> Steps to reproduce:
> Put you computer offline (disconnect all Ethernet cables and turn
> WiFi off)
> Run the following script:
> 
> source [find interface/jlink.cfg]
> jlink serial <your_serial_here>
> source [find target/psoc6.cfg]
> init
> exit
> Observe the following error:
> 
> Error: Failed to send discovery message.
> Error: TCP/IP device discovery failed.
> Error: jaylink_discovery_scan() failed: input/output error.
> I've tracked the issue down to discovery_tcp_scan function which
> fails on offline machines (which is OK) but this error is treated as
> fatal in jaylink_discovery_scan so whole device discovery fails.
> 
> Bohdan
> 
> Sent from sourceforge.net because [email protected] 
> is subscribed to https://sourceforge.net/p/openocd/tickets/
> 
> To unsubscribe from further messages, a project admin can change
> settings at https://sourceforge.net/p/openocd/admin/tickets/options.
> Or, if this is a mailing list, you can unsubscribe from the mailing
> list.
> 
> _______________________________________________
> OpenOCD-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openocd-devel



_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to