Search my blog
Custom Search

Tuesday, May 2, 2023

Lenovo smart clock 2 setup issue (resolved)

 Issue:

During setup, after Lenovo smart clock 2 is connected to the Wifi network and prompts to continue on google home app, google home app keep prompting "your smart clock is set up successfully but can't be connected".  Phone's network is checked and confirmed to be the same wifi network with the clock and there's no AP isolation. 

On  Lenovo smart clock 2, IP address is shown and a ping from a PC shows that Ping has no problem to the IP address. 

After reboot the  Lenovo smart clock 2, it will ask you to link your account through google home app. However, from google home app, the clock device is not shown up at all (after you click "OK" on the screen that Google home complains that the clock cannot be connected). 


Solution: 

This issue is seen on my Pixel 6 Android phone (Android 11).

When I tried to setup again with my old Pixel 2 Android phone (Android 10), the setup went through and there's no issues at all. 


Conclusion:

This issue may have something to do with Android OS version. The device setup sequence may be changed in the new OS version and blocked the following steps. 


[Update 5/2/2023]

With Pixel 6, I was not able to see the settings after selecting Lenovo smart clock device. After clicking the gear icon, it didn't show anything.  but from Pixel 2, I am able to see the setting screen by clicking the gear icon.  However, after rebooting the Pixel 6, i was able to see the setting screen. So weird!



Friday, September 23, 2022

segmentation fault in scientific computing

1.over stacksize limit 2.big-endian/little-endian 3.different compiler 4.over open files limit 5.source code problem

安卓不能连接到公司WIFI (需要MAC地址注册的WIFI)

 症状: 

已经提供安卓的WIFI的MAC地址给公司注册,并正确注册。但是安卓还是不能连接到公司WIFI。 


原因:

自从安卓10.0版本,随机化MAC功能默认是开启的。即使公司注册了设备的WIFI的MAC地址,但是连接公司WIFI时候,使用的是随机的MAC地址,而不是设备的MAC地址。 


解决方法:

切换"Use randomized MAC"为“ use device MAC”。 

设置 -> 网路和因特网-> 因特网 -> 选择公司WIFI的SSID, 然后在“Privacey”选项下面,点击切换为"use device MAC"。


下图为安卓13.0的设置截图,供参考。


 

Android cannot connect to company WIFI which requires MAC address registration

 Issue: 

Company need device WIFI MAC address to allow WIFI connection. 

Android WIFI MAC is registered to company's database, but still connect to company WIFI. 


Cause:

In Android 10, MAC randomization is enabled by default for client mode, SoftAp, and Wi-Fi Direct. 

Though MAC address is registered, but when connecting to WIFI, Android is using a randomized MAC address instead of the WIFI network card's real MAC address (registered in database). 



Solution:

Turn off "randomized MAC" and use device MAC. 

Settings -> network & Internet -> Internet -> select the Wifi network SSID and switch to "use device MAC" under "Privacy". 

Reference screen shot on Android 13.0.





Tuesday, November 5, 2013

MongoDB fails to start as Windows Service on Windows 7

It took me half day to figure out the issue. 

The original command to run the mongod as service is as below.
mongod --logpath ".\logs.txt" --dbpath ".\db" --noauth --install --rest --journal

The scripts run without any problem if I remove "--install". This won't run as windows service.

However, as soon as I run with "--install" and tries to start from service control. The "mongdb" service keep switching between "started" and "starting" status.

The windows event view reports numerous errors as "the mongodb service is terminated and will be restarted".


Fix:
Do not use "relative path' in the parameters. 
For eample in my case:
mongod --logpath "C:\Mongo\logs.txt" --dbpath "C:\Mongo\db" --noauth --install --rest --journal

Reason:
When running as a service, the starting directory is not relative to the "mongod.exe" and thus the DB path cannot be found.



Saturday, February 4, 2012

【超实用】各种水果的正确吃法

【超实用】各种水果的正确吃法:


萝卜网



【关于吃猕猴桃的方法……】 我最开始吃猕猴桃就用手剥皮,像吃橘子似的,后来用刀切,像吃橙子似的, 现在才知道,原来上一刀、下一刀,然后用勺子转一圈就行了,


萝卜网


【关于樱桃快速去核的方法】 1、准备一根我们平时用的筷子; 2、将洗好的樱桃去掉樱桃把 ; 3、将粗的那面筷子头对准樱桃底部的正中央(不是有樱桃把的那一面); 4、微微使劲将筷子捅过去,这时你会发现樱桃核一下子就被捅出来了,不会带一点果肉,而且去核后的樱桃非常完整漂亮。


萝卜网


萝卜网


萝卜网


萝卜网


萝卜网


萝卜网



萝卜网


荔枝的中间有一条缝,只要沿着那个方向轻轻一咬,如果没洗嫌脏的话用手轻轻一捏也行,壳就会自动裂开了啊。

Saturday, December 4, 2010

新东方背单词粘贴乱码问题

问题:
日文XP操作系统,安装新东方背单词,区域和语言选项里面设置非unicode程序默认语言为汉语。这样可以防止一些不是unicode对应的应用可以正确的显示中文。
副作用是一些随机附带的日文非unicode软件不能正确显示日文(乱码),原因是日文编码的资源(菜单等)按照中文来解码的缘故。
问题是添加自定义注释的时候,从dict.cn拷贝的一些中文粘帖到新东方之后,显示为乱码。

可能的原因:
dict.cn编码为GBK中文编码,拷贝倒剪贴板之后被转换为unicode编码(windows XP内部编码),当粘帖到新东方的时候,由于新东方非unicode程序,默认按照GBK解码,结果变为乱码。过程如下:
1. dict.cn (gbk)  -> clipboard (unicode)  :内部自动转换(假设中文输入法关闭)
2. clipboard ->新东方:内部自动转换,但是默认加铁板是GBK编码,实际却是unicode。


解决办法(可行):
复制的时候打开中文输入法。dict.cn网站打开中文输入法既可。
上述步骤2应该没有变,步骤1可能多了一层转换,从而让步骤2的转换变成正常。 具体内部细节待考。