DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th February 2015
mlesniewskister mlesniewskister is offline
Port Guard
 
Join Date: Sep 2014
Posts: 13
Default Using urndis and error

Hi All,

I have a system that I have converted over to OpenBSD and am attempting to use urndis for phone tethering to get internet access.

Full dmesg will be edited in to [0] when I can pull it from the laptop in a few hours. It is an Acer AO725 if you want some specs in the meantime.
The phone seems to attach correctly and a urndis0 interface is created. I also created a hostname.urndis0 with the line dhcp.
However when I run sh /etc/netstart to get a dhcp address it states: urndis0: no link.

The dmesg then has another line in it which says
Code:
urndis0: ctrl message error: unknown event 0x7
The phone is a Galaxy S4 running stock Samsung 4.4.2.
Has anyone had any experience in using urndis devices or this error?

(Side note, I originally tried this on an older Dell laptop which didn't even attach as a urndis interface. After some searching I came upon this [1] which states that some (old) chipsets may have issues with this. Would this be pertinent information to add to the man page?)

[0]:
Code:
OpenBSD 5.7-beta (GENERIC.MP) #860: Sun Feb 22 03:14:54 MST 2015
    todd@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error 80<clock_battery>
real mem = 1838936064 (1753MB)
avail mem = 1786126336 (1703MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe4800 (29 entries)
bios0: vendor Insyde Corp. version "V1.08" date 07/30/2013
bios0: Acer AO725
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP UEFI HPET APIC MCFG ASF! BOOT SLIC SPCR WDRT WDAT FPDT SSDT SSDT
acpi0: wakeup devices PB4_(S4) PB6_(S0) SPB0(S0) SPB1(S4) SPB2(S4) SPB3(S0) GEC_(S4) OHC1(S3) OHC2(S3) OHC3(S3) OHC4(S3) XHC0(S3) XHC1(S4) P2P_(S0)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD C-60 APU with Radeon(tm) HD Graphics, 998.33 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 16-way L2 cache
cpu0: 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.0.0.0.0, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD C-60 APU with Radeon(tm) HD Graphics, 998.19 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 16-way L2 cache
cpu1: 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 21, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 4
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PB4_)
acpiprt2 at acpi0: bus 2 (PB5_)
acpiprt3 at acpi0: bus -1 (PB6_)
acpiprt4 at acpi0: bus -1 (PB7_)
acpiprt5 at acpi0: bus -1 (SPB0)
acpiprt6 at acpi0: bus -1 (SPB1)
acpiprt7 at acpi0: bus -1 (SPB2)
acpiprt8 at acpi0: bus -1 (SPB3)
acpiprt9 at acpi0: bus 3 (P2P_)
acpiec0 at acpi0
acpicpu0 at acpi0: C2, PSS
acpicpu1 at acpi0: C2, PSS
acpitz0 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 model "AL12B32" serial 23547 type LION oem "SANYO"
acpibtn2 at acpi0: LID_
acpivideo0 at acpi0: VGA_
acpivout0 at acpivideo0: LCD_
cpu0: 998 MHz: speeds: 1000 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 14h Host" rev 0x00
radeondrm0 at pci0 dev 1 function 0 "ATI Radeon HD 6290" rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci0 dev 1 function 1 "ATI Radeon HD 6310 HD Audio" rev 0x00: msi
azalia0: no supported codecs
ppb0 at pci0 dev 4 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
re0 at pci1 dev 0 function 0 "Realtek 8101E" rev 0x05: RTL8105E (0x4080), msi, address 04:7d:7b:9e:11:90
rlphy0 at re0 phy 7: RTL8201E 10/100 PHY, rev. 2
ppb1 at pci0 dev 5 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci2 at ppb1 bus 2
"Atheros AR9485" rev 0x01 at pci2 dev 0 function 0 not configured
xhci0 at pci0 dev 16 function 0 "AMD Hudson-2 xHCI" rev 0x03: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "AMD xHCI root hub" rev 3.00/1.00 addr 1
ahci0 at pci0 dev 17 function 0 "AMD Hudson-2 SATA" rev 0x00: msi, AHCI 1.3
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, OCZ-VERTEX2, 1.11> SCSI3 0/direct fixed naa.5e83a97ff6dd8406
sd0: 57241MB, 512 bytes/sector, 117231408 sectors, thin
ohci0 at pci0 dev 18 function 0 "AMD Hudson-2 USB" rev 0x11: apic 4 int 18, version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "AMD Hudson-2 USB2" rev 0x11: apic 4 int 17
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "AMD EHCI root hub" rev 2.00/1.00 addr 1
ohci1 at pci0 dev 19 function 0 "AMD Hudson-2 USB" rev 0x11: apic 4 int 18, version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 "AMD Hudson-2 USB2" rev 0x11: apic 4 int 17
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 "AMD EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "AMD Hudson-2 SMBus" rev 0x14: polling
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-10600 SO-DIMM
azalia1 at pci0 dev 20 function 2 "AMD Hudson-2 HD Audio" rev 0x01: msi
azalia1: codecs: Realtek ALC269
audio0 at azalia1
pcib0 at pci0 dev 20 function 3 "AMD Hudson-2 LPC" rev 0x11
ppb2 at pci0 dev 20 function 4 "AMD Hudson-2 PCI" rev 0x40
pci3 at ppb2 bus 3
ohci2 at pci0 dev 20 function 5 "AMD Hudson-2 USB" rev 0x11: apic 4 int 18, version 1.0, legacy support
pchb1 at pci0 dev 24 function 0 "AMD AMD64 14h Link Cfg" rev 0x43
pchb2 at pci0 dev 24 function 1 "AMD AMD64 14h Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 14h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 14h Misc Cfg" rev 0x00
pchb4 at pci0 dev 24 function 4 "AMD AMD64 14h CPU Power" rev 0x00
pchb5 at pci0 dev 24 function 5 "AMD AMD64 14h Reserved" rev 0x00
pchb6 at pci0 dev 24 function 6 "AMD AMD64 14h NB Power" rev 0x00
pchb7 at pci0 dev 24 function 7 "AMD AMD64 14h Reserved" rev 0x00
usb3 at ohci0: USB revision 1.0
uhub3 at usb3 "AMD OHCI root hub" rev 1.00/1.00 addr 1
usb4 at ohci1: USB revision 1.0
uhub4 at usb4 "AMD OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pms0: Elantech Touchpad, version 3, firmware 0x550f00
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
usb5 at ohci2: USB revision 1.0
uhub5 at usb5 "AMD OHCI root hub" rev 1.00/1.00 addr 1
uvideo0 at uhub2 port 2 configuration 1 interface 0 "HD WebCam HD WebCam" rev 2.00/13.08 addr 2
video0 at uvideo0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (3226ace4d266302f.a) swap on sd0b dump on sd0b
radeondrm0: 1366x768
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
umodem0 at uhub1 port 4 configuration 2 interface 1 "SAMSUNG SAMSUNG_Android" rev 2.00/4.00 addr 2
umodem0: data interface 2, has no CM over data, has no break
umodem0: status change notification available
ucom0 at umodem0
ugen0 at uhub1 port 4 configuration 2 "SAMSUNG SAMSUNG_Android" rev 2.00/4.00 addr 2
ucom0 detached
umodem0 detached
ugen0 detached
urndis0 at uhub1 port 4 configuration 1 interface 0 "SAMSUNG SAMSUNG_Android" rev 2.00/2.28 addr 2
urndis0: using RNDIS, address f2:7a:b0:bf:b3:09
urndis0: ctrl message error: unknown event 0x7
urndis0 detached
umodem0 at uhub1 port 4 configuration 2 interface 1 "SAMSUNG SAMSUNG_Android" rev 2.00/4.00 addr 2
umodem0: data interface 2, has no CM over data, has no break
umodem0: status change notification available
ucom0 at umodem0
ugen0 at uhub1 port 4 configuration 2 "SAMSUNG SAMSUNG_Android" rev 2.00/4.00 addr 2
ucom0 detached
umodem0 detached
ugen0 detached
urndis0 at uhub1 port 4 configuration 1 interface 0 "SAMSUNG SAMSUNG_Android" rev 2.00/2.28 addr 2
urndis0: using RNDIS, address f2:7a:b0:bf:b3:09
urndis0: ctrl message error: unknown event 0x7
urndis0 detached
umodem0 at uhub1 port 4 configuration 2 interface 1 "SAMSUNG SAMSUNG_Android" rev 2.00/4.00 addr 2
umodem0: data interface 2, has no CM over data, has no break
umodem0: status change notification available
ucom0 at umodem0
ugen0 at uhub1 port 4 configuration 2 "SAMSUNG SAMSUNG_Android" rev 2.00/4.00 addr 2
ucom0 detached
umodem0 detached
ugen0 detached
[1]: http://marc.info/?l=openbsd-misc&m=134663379016710&w=2

Last edited by mlesniewskister; 26th February 2015 at 02:46 AM. Reason: Adding dmesg goodness
Reply With Quote
  #2   (View Single Post)  
Old 26th February 2015
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I don't think your misc@ reference applies in this situation. Your using amd64 and your uhub1 is ECHI (USB 2.0). In the last post in that thread, Jan (the OP_ had reported that it was reproducable on i386/USB 1.0

I've run urndis(4) in the past with android phones with i386/USB 2.0, so I think the problem you referenced is isolated to USB 1.

The error message is produced by src/sys/dev/sub/if_urndis.c. The five events that are managed are listed in the switch directly above. Those events (initialize, query, reset, keepalive, and set) are defined in if_urndisreg.h in the same directory. There is an x07 defined in that list:
Code:
/* 802.3 link-state or undefined message error. */
#define REMOTE_NDIS_INDICATE_STATUS_MSG    0x00000007
I interpret the error to mean that the phone is requesting a service the driver is not designed to provide.

Last edited by jggimi; 26th February 2015 at 03:37 AM. Reason: typo
Reply With Quote
  #3   (View Single Post)  
Old 26th February 2015
mlesniewskister mlesniewskister is offline
Port Guard
 
Join Date: Sep 2014
Posts: 13
Default

Well the misc@ post was in regards to a different laptop that I tried with an old chipset and USB 1.0 before this one, but ignore that for now as it's a separate issue and I don't want to add confusion.

Hmm, checking the .c file you mentioned I see the code (~line 239):
Code:
default:
	printf("%s: ctrl message error: unkown event 0x%x\n",
		DEVNAME(sc), letoh32(hdr->rm_type));
	rval = RNDIS_STATUS_FAILURE;
which to me indicates that it is just a generic unknown error and the format of that printf matches the dmesg output.
If it was the error as defined in the header, wouldn't it print out a different error message/format?
I'm not a programmer, and the little bit of C I studied before was basic and a long time ago so I am super rusty, so forgive me if I'm wrong.

However if it is the case that the phone is requesting something that the driver can't give, is there any way to find out that this is or to further debug or disable that from the phone side?
Reply With Quote
  #4   (View Single Post)  
Old 26th February 2015
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Quote:
Originally Posted by mlesniewskister View Post
Well the misc@ post was in regards to a different laptop that I tried with an old chipset and USB 1.0 before this one, but ignore that for now as it's a separate issue and I don't want to add confusion.

Hmm, checking the .c file you mentioned I see the code...which to me indicates that it is just a generic unknown error and the format of that printf matches the dmesg output.
If it was the error as defined in the header, wouldn't it print out a different error message/format?
I'm not a programmer, and the little bit of C I studied before was basic and a long time ago so I am super rusty, so forgive me if I'm wrong.
I'm not a C programmer either, but I have watched C programmers make presentations on Youtube.

The C switch/case logic permits the programmer to select from multiple possibilities, and is easier to understand than a long if...then ... else if ... then ... else if ... sequence. The default case is used for none-of-the-above logic.
Quote:
However if it is the case that the phone is requesting something that the driver can't give, is there any way to find out that this is or to further debug or disable that from the phone side?
I don't know anything about urndis(4), other than it just worked for me with my previous phone. My current phone is Android also, but I do not use it with NDIS at this time as my carrier would like to charge me for the privilege while I am using their stock ROM.

It could be that your phone, being newer, is using a newer specification of NDIS than the driver. Wikipedia says that the specification has reached 6.40 in 2012. This driver was written in 2010, and the spec level is not mentioned in if_urndisreg.h or if_urndis.c

You might ask on misc@ if anyone is using urndis(4) with your release of Android, and perhaps with your model of phone, since drivers deployed can vary by handset, wireless carrier (if they provide the ROM), and Android release.

Last edited by jggimi; 26th February 2015 at 10:44 PM. Reason: typo. I can't post without at least one.
Reply With Quote
  #5   (View Single Post)  
Old 26th February 2015
mlesniewskister mlesniewskister is offline
Port Guard
 
Join Date: Sep 2014
Posts: 13
Default

Yep, I have done that also, there are some pretty good talks on the 'net.

Yes, this I understand, I just figured if it had been set in the header then there would be a case statement for that specific hex value that provided a different error message.

Anyways, that's not important. Will do a little more research and see if I can find some tips in the dbsd/fbsd or netbsd sources if they have some updates for urndis or find if the spec has changed much. Then will ask misc@ if they have any ideas.

Thanks for the info!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
shc unistd.h:239: error: syntax error before '&' token laraaj OpenBSD General 3 11th September 2010 07:21 AM
help error darken FreeBSD General 1 21st September 2008 09:28 PM
error messages delboy FreeBSD Ports and Packages 16 6th June 2008 01:31 PM
VLC run error mfaridi OpenBSD Packages and Ports 14 29th May 2008 05:38 PM
error kde darken FreeBSD General 1 5th May 2008 08:45 PM


All times are GMT. The time now is 12:08 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick