Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Device Providers
26-01-2015, 09:59 AM
Post: #1
Device Providers
Hi,

I have not done much with ohNet recently but I have just tried to compile the latest version and noticed that some of the device providers seem to be missing for example there does not seem to be :

org.openhome.net.device.providers.DvProviderAvOpenhomeOrgVolume1
org.openhome.net.device.providers.DvProviderAvOpenhomeOrgRadio1
org.openhome.net.device.providers.DvProviderUpnpOrgAVTransport1
org.openhome.net.device.providers.DvProviderAvOpenhomeOrgInfo1
org.openhome.net.device.providers.DvProviderAvOpenhomeOrgPlaylist1
org.openhome.net.device.providers.DvProviderAvOpenhomeOrgReceiver1
org.openhome.net.device.providers.DvProviderUpnpOrgRenderingControl1
org.openhome.net.device.providers.DvProviderAvOpenhomeOrgTime1


Have these classes been moved to another location, I tried searching for them but could not find them..

I compile as a Java Lib and use the ohnet.jar for a renderer appliation..

Thanks,

Pete.
Find all posts by this user
26-01-2015, 10:01 AM
Post: #2
RE: Device Providers
(26-01-2015 09:59 AM)PeteManchester Wrote:  I have not done much with ohNet recently but I have just tried to compile the latest version and noticed that some of the device providers seem to be missing

Have these classes been moved to another location, I tried searching for them but could not find them..

Hi Pete

Generated code is now provided by a separate repo - ohNetGenerated. Anything previously included in ohNet should now be here.
Find all posts by this user
26-01-2015, 12:12 PM
Post: #3
RE: Device Providers
Thanks Simon..

I think I'm missing something, I can compile the old ohNet code, but when I try to compile ohNetGenerated after running 'go fetch --all [--debug]' I get the following errors:

Code:
root@rpistudy:/home/pi/ohNetGenerated# make JavaAll
CROSS_COMPILE:
Machine reported by compiler is: arm-linux-gnueabihf
Machine reported by uname is: Linux
Building for system Linux and architecture armhf
mkdir -p Generated
o Generated/Devices.mak OpenHome/Net/T4/Templates/DvUpnpMakeDevices.tt -a xml:OpenHome/Net/Service/Services.xml
make: o: Command not found
Common.mak:31: recipe for target 'Generated/Devices.mak' failed
make: [Generated/Devices.mak] Error 127 (ignored)
Attention: a makefile has been re-generated.
mkdir -p Generated
o Generated/Proxies.mak OpenHome/Net/T4/Templates/CpUpnpMakeProxies.tt -a xml:OpenHome/Net/Service/Services.xml
make: o: Command not found
Common.mak:26: recipe for target 'Generated/Proxies.mak' failed
make: [Generated/Proxies.mak] Error 127 (ignored)
Attention: a makefile has been re-generated.
make: *** No rule to make target 'dependencies/Linux-armhf/ohNet-Linux-armhf-Release/lib/ohnet.jar', needed by 'Build/Obj/Posix/Release/org/openhome/net/controlpoint/proxies/CpProxyUpnpOrgAVTransport1.class'.  Stop.
root@rpistudy:/home/pi/ohNetGenerated#

Any ideas what I might be missing..

I tried installing make again, but it still didn't work..

Thanks,

Pete.
Find all posts by this user
26-01-2015, 01:25 PM
Post: #4
RE: Device Providers
(26-01-2015 12:12 PM)PeteManchester Wrote:  Thanks Simon..

I think I'm missing something, I can compile the old ohNet code, but when I try to compile ohNetGenerated after running 'go fetch --all [--debug]' I get the following errors:

I can't reproduce these errors. Looking at the makefile, it seems you're trying to regenerate the (auto-generated) makefiles under Generated/. Rather than figuring out why this is happening, it might be easier to just allow it to work. Can you try adding -uset4=yes to your build command please?

Also, can I check that you fetch dependencies using one of
./go fetch --all
or
./go fetch --all --debug
? The [--debug] in README is intended to show that specifying debug is optional.
Find all posts by this user
26-01-2015, 01:49 PM
Post: #5
RE: Device Providers
Hi Simon,

Thanks for the suggestion, I tried ./go fetch --all and ./go fetch --all --debug

One thing I noticed is that it seems to download Linux-x86, is that correct, this is for a Raspberry Pi which is ARM rather than -x86 .

Code:
Fetching 'ohNet'
  from 'http://openhome.org/releases/artifacts/ohNet/ohNet-1.0.1278-Linux-x86-Debug.tar.gz' (web)

I tried adding the uset4=yes switch to the make command but it still failed..

Code:
make JavaAll uset4=yes




Code:
root@rpistudy:/home/pi# rm ohNetGenerated -r
root@rpistudy:/home/pi# clear
root@rpistudy:/home/pi# git clone https://github.com/openhome/ohNetGenerated.git
Cloning into 'ohNetGenerated'...
remote: Counting objects: 1181, done.
remote: Total 1181 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1181/1181), 1.19 MiB | 531 KiB/s, done.
Resolving deltas: 100% (793/793), done.
Checking out files: 100% (694/694), done.
root@rpistudy:/home/pi# ./go fetch --all --debug
-bash: ./go: No such file or directory
root@rpistudy:/home/pi# rm ohNetGenerated -r
root@rpistudy:/home/pi# git clone https://github.com/openhome/ohNetGenerated.git
Cloning into 'ohNetGenerated'...
remote: Counting objects: 1181, done.
remote: Total 1181 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1181/1181), 1.19 MiB | 483 KiB/s, done.
Resolving deltas: 100% (793/793), done.
Checking out files: 100% (694/694), done.
root@rpistudy:/home/pi# cd ohNetGenerated
root@rpistudy:/home/pi/ohNetGenerated# ./go fetch --all --debug
Fetching 'ohNet'
  from 'http://openhome.org/releases/artifacts/ohNet/ohNet-1.0.1278-Linux-x86-Debug.tar.gz' (web)
  unpacking to '/home/pi/ohNetGenerated/dependencies/Linux-x86'
  OK
root@rpistudy:/home/pi/ohNetGenerated# make JavaAll uset4=yes
CROSS_COMPILE:
Machine reported by compiler is: arm-linux-gnueabihf
Machine reported by uname is: Linux
Building for system Linux and architecture armhf
mkdir -p Build/Tools/
rsync OpenHome/Net/T4/UpnpServiceXml/UpnpServiceDescription.xsd Build/Tools/
mkdir -p Build/Tools/
rsync OpenHome/Net/T4/UpnpServiceXml/UpnpServiceTemplate.xsd Build/Tools/
mkdir -p Build/Tools/
dmcs -target:library -out:Build/Tools/UpnpServiceXml.dll OpenHome/Net/T4/UpnpServiceXml/AssemblyInfo.cs OpenHome/Net/T4/UpnpServiceXml/UpnpS                             erviceXml.cs
make: dmcs: Command not found
T4Linux.mak:62: recipe for target 'Build/Tools/UpnpServiceXml.dll' failed
make: *** [Build/Tools/UpnpServiceXml.dll] Error 127
root@rpistudy:/home/pi/ohNetGenerated#

Thanks again,

Pete.
Find all posts by this user
26-01-2015, 01:58 PM
Post: #6
RE: Device Providers
(26-01-2015 01:49 PM)PeteManchester Wrote:  Hi Simon,

Thanks for the suggestion, I tried ./go fetch --all and ./go fetch --all --debug

Each call to fetch dependencies will remove the previously fetch version of ohNet. If you most recently fetched debug dependencies, you'll need to do a debug build - by adding debug=1 to your command line.

(26-01-2015 01:49 PM)PeteManchester Wrote:  One thing I noticed is that it seems to download Linux-x86, is that correct, this is for a Raspberry Pi which is ARM rather than -x86 .

Code:
Fetching 'ohNet'
  from 'http://openhome.org/releases/artifacts/ohNet/ohNet-1.0.1278-Linux-x86-Debug.tar.gz' (web)

Good point. This'd normally be a major issue but I don't think its the cause of your problems here...

It looks like there's a bug in our dependency fetching script's platform detection. You can work around this by explicitly specifying which platform you'll later build for:
./go fetch --all --platform=Linux-ARM

I suspect this'll introduce another bug for you however - I think ohnet.jar is only built for Linux-x86. You'll need a local workaround for this - possibly manually copying ohnet.jar over fetched Linux-ARM dependencies.

(26-01-2015 01:49 PM)PeteManchester Wrote:  I tried adding the uset4=yes switch to the make command but it still failed..

Code:
make JavaAll uset4=yes
.....
make: dmcs: Command not found

dmcs is provided by mono. I guess you don't have it installed. Is it possible for you to install mono or should we look for a workaround?
Find all posts by this user
26-01-2015, 03:25 PM
Post: #7
RE: Device Providers
Hi Simon,

I installed mono but didn't seem to get much further..

Also it could not find a platform of 'Linux-ARM' or 'Linux-armhf' so I took a guess at 'Core-armv5'



Code:
root@rpistudy:/home/pi/ohNetGenerated# clear
root@rpistudy:/home/pi/ohNetGenerated# cd ..
root@rpistudy:/home/pi# rm ohNetG* -r
root@rpistudy:/home/pi# git clone https://github.com/openhome/ohNetGenerated.git
Cloning into 'ohNetGenerated'...
remote: Counting objects: 1181, done.
remote: Total 1181 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1181/1181), 1.19 MiB | 477 KiB/s, done.
Resolving deltas: 100% (793/793), done.
Checking out files: 100% (694/694), done.
root@rpistudy:/home/pi# cd ohNetG*
root@rpistudy:/home/pi/ohNetGenerated# ./go fetch --all --platform=Core-armv5
Fetching 'ohNet'
  from 'http://openhome.org/releases/artifacts/ohNet/ohNet-1.0.1278-Core-armv5-Release.tar.gz' (web)
  unpacking to '/home/pi/ohNetGenerated/dependencies/Core-armv5'
  OK
root@rpistudy:/home/pi/ohNetGenerated# make JavaAll uset4=yes
CROSS_COMPILE:
Machine reported by compiler is: arm-linux-gnueabihf
Machine reported by uname is: Linux
Building for system Linux and architecture armhf
mkdir -p Build/Tools/
rsync OpenHome/Net/T4/UpnpServiceXml/UpnpServiceDescription.xsd Build/Tools/
mkdir -p Build/Tools/
rsync OpenHome/Net/T4/UpnpServiceXml/UpnpServiceTemplate.xsd Build/Tools/
mkdir -p Build/Tools/
dmcs -target:library -out:Build/Tools/UpnpServiceXml.dll OpenHome/Net/T4/UpnpServiceXml/AssemblyInfo.cs OpenHome/Net/T4/UpnpServiceXml/UpnpServiceXml.cs
mkdir -p Build/Tools/
dmcs -target:library -out:Build/Tools/UpnpServiceMake.dll OpenHome/Net/T4/UpnpServiceMake/AssemblyInfo.cs OpenHome/Net/T4/UpnpServiceMake/UpnpServiceMake.cs
mkdir -p Build/Tools/
dmcs /t:library -out:Build/Tools/Mono.TextTemplating.dll OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/AssemblyInfo.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Microsoft.VisualStudio.TextTemplating/DirectiveProcessor.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Microsoft.VisualStudio.TextTemplating/DirectiveProcessorException.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Microsoft.VisualStudio.TextTemplating/RequiresProvidesDirectiveProcessor.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Microsoft.VisualStudio.TextTemplating/ToStringHelper.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Microsoft.VisualStudio.TextTemplating/ITextTemplatingEngineHost.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Microsoft.VisualStudio.TextTemplating/Engine.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Microsoft.VisualStudio.TextTemplating/TextTransformation.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/TemplatingEngine.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/CrossAppDomainAssemblyResolver.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/TemplateGenerator.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/Tokeniser.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/IExtendedTextTemplatingEngineHost.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/TemplateSettings.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/ParsedTemplate.cs OpenHome/Net/T4/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/CompiledTemplate.cs
mkdir -p Build/Tools/
dmcs /t:exe -out:Build/Tools/TextTransform.exe /r:Build/Tools/Mono.TextTemplating.dll OpenHome/Net/T4/TextTemplating/TextTransform/AssemblyInfo.cs OpenHome/Net/T4/TextTemplating/TextTransform/Options.cs OpenHome/Net/T4/TextTemplating/TextTransform/TextTransform.cs
mkdir -p Build/Tools/
dmcs /t:exe /out:Build/Tools/OhNetGen.exe OpenHome/Net/T4/OhNetGen.cs OpenHome/Net/T4/AssemblyInfo.cs
mkdir -p Generated
mono Build/Tools/TextTransform.exe -o Generated/Devices.mak OpenHome/Net/T4/Templates/DvUpnpMakeDevices.tt -a xml:OpenHome/Net/Service/Services.xml
Processing 'OpenHome/Net/T4/Templates/DvUpnpMakeDevices.tt'... completed successfully.
Attention: a makefile has been re-generated.
mkdir -p Generated
mono Build/Tools/TextTransform.exe -o Generated/Proxies.mak OpenHome/Net/T4/Templates/CpUpnpMakeProxies.tt -a xml:OpenHome/Net/Service/Services.xml
Processing 'OpenHome/Net/T4/Templates/CpUpnpMakeProxies.tt'... completed successfully.
Attention: a makefile has been re-generated.
mkdir -p Generated
mono Build/Tools/TextTransform.exe -o Generated/GenerateSourceFiles.mak OpenHome/Net/T4/Templates/UpnpMakeT4.tt -a xml:OpenHome/Net/Service/Services.xml
Processing 'OpenHome/Net/T4/Templates/UpnpMakeT4.tt'... completed successfully.
Attention: a makefile has been re-generated.
CROSS_COMPILE:
Machine reported by compiler is: arm-linux-gnueabihf
Machine reported by uname is: Linux
Building for system Linux and architecture armhf
make: *** No rule to make target 'dependencies/Linux-armhf/ohNet-Linux-armhf-Release/lib/ohnet.jar', needed by 'Build/Obj/Posix/Release/org/openhome/net/controlpoint/proxies/CpProxyUpnpOrgAVTransport1.class'.  Stop.
Find all posts by this user
27-01-2015, 01:15 PM
Post: #8
RE: Device Providers
(26-01-2015 03:25 PM)PeteManchester Wrote:  I installed mono but didn't seem to get much further..

Also it could not find a platform of 'Linux-ARM' or 'Linux-armhf' so I took a guess at 'Core-armv5'

I think we might be better retracing our steps to post #3. Since you're building platform-independent Java code, we could get away with building using x86 binaries. (You'll then need to manually patch in a suitable ARM build of libohNet.so)

I've found one error building Java from a clean checkout. This should be fixed now. All builds may still try to regenerate code; this'll require that mono is installed.

I also spotted an error in your build command. The correct target for make is JavaAll now (i.e. replace ohNetJavaAll with JavaAll)

This should allow you to build ohNetGenerated for Java. That said, I'd recommend you move away from this... In hindsight, a repo that publishes binaries for a subset of interesting services has been a bad idea. Many of our repos are trying to move away from this, either by generating code themselves or by copying the generated proxies/providers they need into their own repos and building them locally. If you're able to follow either of these approaches, it should avoid any similar problems in future.
Find all posts by this user
27-01-2015, 03:22 PM
Post: #9
RE: Device Providers
Hi Simon,



Quote:I've found one error building Java from a clean checkout. This should be fixed now. All builds may still try to regenerate code; this'll require that mono is installed.

I tried again with the new version but with no success.
Installing mono is not a big problem



Quote:I also spotted an error in your build command. The correct target for make is JavaAll now (i.e. replace ohNetJavaAll with JavaAll)

I have been using 'make JavaAll'

Quote:This should allow you to build ohNetGenerated for Java. That said, I'd recommend you move away from this... In hindsight, a repo that publishes binaries for a subset of interesting services has been a bad idea. Many of our repos are trying to move away from this, either by generating code themselves or by copying the generated proxies/providers they need into their own repos and building them locally. If you're able to follow either of these approaches, it should avoid any similar problems in future.

I'm not sure I understand your last statement, I would prefer to just download precompiled libraries from the artifacts, but I have not yet found any that seem to work.

I downloaded the archive ohNetGenerated-1.0.66-Linux-x86-Release.tar.gz,but in the ohnet-generated.jar file it is missing all the core libraries and:
org.openhome.net.device.DvDevice
org.openhome.net.device.IDvInvocation

On my raspi I can still compile the ohNet code, but I cannot yet compile the ohNetGenerated code. The advantage of compiling on my raspi is that I get libraries that work, the disadvantage is it takes so long..

Thanks,

Pete.
Find all posts by this user
27-01-2015, 04:11 PM
Post: #10
RE: Device Providers
(27-01-2015 03:22 PM)PeteManchester Wrote:  I downloaded the archive ohNetGenerated-1.0.66-Linux-x86-Release.tar.gz,but in the ohnet-generated.jar file it is missing all the core libraries and:
org.openhome.net.device.DvDevice
org.openhome.net.device.IDvInvocation

Core libraries would still come from ohNet. ohNetGenerated builds on top of this, adding providers for OpenHome services. Is it possible for you to fetch binaries for both ohNet and ohNetGenerated?
Find all posts by this user


Forum Jump: