kdschlosser / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
155 stars 33 forks source link

I have GREAT NEWS #76

Open kdschlosser opened 5 years ago

kdschlosser commented 5 years ago

OK so there was a conversation in another issue about Samsung and the SmartView application.

I was poking about the SmartView application and I happen to notice the OpenSource license. Now in most cases when you have a piece of software like that the licenses will only pertain to code that has been used inside of their application..

Now I do not really know what in the world possessed me to read the license, something did.. And I read it.. And I was correct in the license it coves 2 pieces of code that are OpenSource that were used in the SmartView application. Now.. to my astonishment so is the SmartView Application. I personally think someone screwed the pooch with this, and the SmartView application was not supposed to be included in that license. One of the user sent an e-mail off to Samsung (using the e-mail provide in the license) asking for a copy of the source code. and Samsung's response was a not so surprising no.

Now that response got me a little bit heated. And the license that is being used for SmartView is the Mozilla license. Now me knowing a little bit about the folks over at Mozilla and how they are with OpenSource licensing. and they are very passionate about OpenSource. and are also very strict in the use of their license. I also know that if push came to shove I would bring up the misuse of the license by Samsung with the folks over at Mozilla.. and I do think they would not be very happy about it.

Armed with that knowledge I decided to send an e-mail myself. outlining the license and the specific subset that they would be in violation of if they didn't fork over the code.

Here is the e-mail i sent.

To whom this may concern.

I am requesting a copy of the source code for the Samsung Smart View application version 1.6.0.5. I noticed that the software is using the MPL (Mozilla Public License) version 2.0. which under section 3.2.a of the license it states that you must make available the source code of the application to the recipients of the compiled program. I am a recipient of the compiled version of the application that was distributed by Samsung. So I would like to have a copy of the source code please.

Thanks again Kevin Schlosser

Very basic and very to the point.

and here is section 3.2 of the MPL

3.2. Distribution of Executable Form

If You distribute Covered Software in Executable Form then:

a. such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and

b. You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients’ rights in the Source Code Form under this License.

I sent this E-Mail on the 15th of January 2019

I was just thinking as I sat down to my PC that I had not heard back form them and It was about time for me to send another e-mail with a slight bit more "push" to it. Using the information I know about Mozilla possibly.. So I open up my e-mail and low and behold I got a response from them at 22:00 (GMT - 7) and here is that e-mail

[SAMSUNG OSRC COMMENTS DELIVERY NOTIFICATION]

Dear Kevin Schlosser,

Thank you for your continuous interest in our product. First of all, we apology for late response of your request.

We are preparing SmartView application's opensource package. Please wait a few more days to prepare opensource softwares. We'll let you know immediately when we're ready.

Please accept our apology for not being able to handle your request up to your satisfaction and don't hesitate to contact us if you have any other questions regarding Open Source Software.

Thank you.

Sincerely yours, Samsung OSRC Team

Now does anyone know why it took them 2 weeks to respond??.. well I am going to tell you.. My request along with the license for the SmartView app got sent over to their legal dept. and they had to assess whether or not my asking for the source code was within the terms of the license. Well guess what.. It is. Now I am sure there is going to be a heap of things removed from it. and the program is not actually going to compile properly once they send it to me (if they do). and that is going to be a whole other battle with them,. But the point is.. someone over at Samsung fucked up (sorry for the language only word in the English vocabulary that correctly describes what this person did). Now I am sure somebody is no longer going to have a job after this. I wouldn't want to be that person..

My hope is that they will not strip out to much of the code I am sure that the authentication pieces will be gone. I am hoping that the general communications with the TV's will still be there. including the websocket specific commands.

Hopefully we end up with a positive result from this. I am a tad excited.

matthieut59 commented 5 years ago

Yeah!

Regarding authentication, Smartview app is not working with new TV samsung, but Smarthing app is the new app. So not sure you will get more info on authentication with smartview :/

kdschlosser commented 5 years ago

I do not care about the authentication part. we have that working for all 3 variants I want to expand on functionality I am hoping that the source code will reveal more websocket structures. Any time an API is made that API will almost always follow some kind of a pattern. if you look at the current websocket API I can already see that if we request information using a specific "event" that same event is used in the response. that is a pattern. the command names or "events" will also follow a pattern. once we know enough of these events we will be able to see the pattern. it's how us humans work. it makes it easier for us to remember things.

They will most likely not hand us their API on a silver platter. but with some reading and really paying attention to coding styles and how things are named we may just be able to piece things together.

Samsung has a really large communication issue between departments. the developers that write the firmware I do not believe communicate the changes to the developers of the applications. They throw them under the bus in that respect.. let them fend for themselves. I almost think that the developers of say SmartView have almost the same kind of work we have. they have to reverse engineer everything. that s why it takes a horrendous amount of time for the applications to get fixed. and also why when new firmware comes out almost 99% of the time any kind of a connection from any other device (including their own devices) stops working.

kdschlosser commented 5 years ago

So this is some of the events, methods and remote types that we know of. I think there is one or 2 missing from this list

events ms.remote.imeUpdate ms.remote.touchEnable ms.remote.imeStart ms.voiceApp.hide ms.voiceApp.standby ed.edenApp.get ed.installedApp.get ms.channel.unauthorized ms.channel.connect

methods ms.remote.control ms.channel.emit

TypeOfRemote ProcessMouseDevice SendRemoteKey

raydog153 commented 5 years ago

@kdschlosser So I sent same type of email while back when you posted this originally. And I also got same exact email you got on Jan 17th. I didn't say anything because I didn't want to jinx it and wanted to wait until 100% had the sources. Keeping my fingers crossed.

BTW, I bricked my TV :( I finally got RS232 working on my 2008 model(even turning tv on works!). So my 10 year old set I could control better than my 4 year old set! So I attempted to get that working on my UN40H5203 model and I did!. But that was not good enough, now that I had serial access I was able to get into the 'Extended Service Menu' and I tried to re-enabled the stuff that Samsung disabled so that I could once again control my TV thru the network like I was able too when I bought it. No new ports were opened up, so I went in again, one more restart and now endless restart.

Anyway, I'm not going to be active much until I get this fixed...and super bowl is this weekend!

Since I have RS232 support working, should I create a python library for samsungctl to reference so we can support even more models? I also have a RS232 serial to Ethernet device I use for energy monitoring and trying to get that to work so that even thou it is RS232 I will be able to send commands over the network...still working on this piece.


Opensource Request | Opensource Request | Thu, Jan 17, 11:23 PM (12 days ago)
-- | -- | --
Opensource Request
[SAMSUNG OSRC COMMENTS DELIVERY NOTIFICATION]

Dear Ray Boutotte,

Thank you for your continuous interest in our product.
First of all, we apology for late response of your request.

We are preparing Smartview application's opensource package.
Please wait a few more days to prepare opensource softwares.
We'll let you know immediately when we're ready.

Please accept our apology for not being able to handle your request up to your satisfaction and
don't hesitate to contact us if you have any other questions regarding Open Source Software.

Thank you.

Sincerely yours,
Samsung OSRC Team
raydog153 commented 5 years ago

Your response seems identical to mine....word for word :(

vitalets commented 5 years ago

Interesting. And what about SmartThings app? =)

kdschlosser commented 5 years ago

you should send them an e-mail back. something along the lines of

Samsung OSRC Representative,

I sent in a request to obtain the source code for the SmartView application on [PUT DATE HERE] and I received a response e-mail on 17th of January 2019. That e-mail stated that the source code would be available in a few days. Today is now the 29th of January 2019, I would say more then a "few days" has passed.

According to section 3.2 paragraph A of the MPL (Mozilla Public License) v2.0 it states "You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner"

and the key phrase in that is "timely manner". Since my initial e-mail [NUMBER OF DAYS] have passed. I do not believe that anyone would find that to be timely. If I can get an update as to when the source code will be available that would be appreciated.

Thank You for you cooperation. [YOUR NAME]

I like that.. it's kind of pushy and not at the same time.

kdschlosser commented 5 years ago

IDK about the smart things application. I would have to read the license for it to see if there is any kind of a hole in it.

kdschlosser commented 5 years ago

The largest misunderstandings that people have about the ex-link jack on the Samsung TV's is that you can use a USB to serial adapter.

the ex-link port is RS232. RS232 is a transmission specification. not a protocol. it is not the same as TTL serial (USB to serial). rs232 uses a +- 12V signal with a sensitivity down to 6.5 volts i believe. TTL is either +- 3.3 volts or +- 5.0 volts. You will not do harm to the TV if you accidentally use a TTL adapter. but you can cook the TTL adapter if the TV happens to send anything out of the port.

not all Serial is RS232..

as far as bricking your TV.. check out the sammygo website they have all kinds of information on firmware hacking an fixing your boot loop issues.

raydog153 commented 5 years ago

Ya, pouring over the SammyGo site. I'm using proper RS232 to USB adapter and that is still working fine. I bricked TV due to changing service menu thru TV remote and mucking with settings.

I see boards are cheap so may just order new main board. Was hoping I could upgrade board but in reading looks like I need to go with same one. Hopefully it will have old firmware or I can put older version on.

Sent Samsung another email.

kdschlosser commented 5 years ago

what is the series of your TV??

well the whole model number if you do not mind...

kdschlosser commented 5 years ago

never mind i have it.

UN40H5203

kdschlosser commented 5 years ago

yeah they are cheap. 19.00 USD used and 50.00 USD new.

raydog153 commented 5 years ago

@kdschlosser I have not downloaded it yet, seems site is 1/2 working.

[SAMSUNG OSRC COMMENTS DELIVERY NOTIFICATION]

Dear Ray Boutotte,

Thank you for your interest in our product.
First of all, we apologize for late response for your request.

For your question, we have discussed with our software developers.

We found that MPL 2.0 Agreement was inserted incorrectly.
We are sorry for any inconvenience by this error.

We used the 'taglib' opensource. (MPL 1.1 License)

We are pleased to provide you the opensource code of Smartview Application.
Please visit Samsung Opensource Release Center(http://opensource.samsung.com) and Search your product's opensource package by typing your model group name : Smartview

You can download the opensource software used in this product.
If you have any other questions regarding Open Source Software, please do not hesitate to contact us.

Thank you.

Sincerely yours,
Samsung OSRC Team
kdschlosser commented 5 years ago

I got the same e-mail.

they are are still distributing SmartView with the MPL2.0 license.

They are in violation of FFmpeg's license, as well as taglib's license and OpenSSL's and also in violation of the MPL. I have already started notifying these organizations of the violation.

raydog153 commented 5 years ago

Good good...