Skip to main content

 none
Philosophical questions RRS feed

All replies

  • Hi,

    It is not recommended to use the function which is not supported. Can you let us know what exact functions are you looking to enable and what are you trying to do with them? 

    Wednesday, September 4, 2019 10:08 AM
    Moderator
  • ioclt() is OK need for socket and uart available RX bytes

    open(path ...) is OK

    • read() if access is OK
    • write() EROFS

    opendir(path ...) is OK

    I want to use cURL with other certificates, but curl ask certificates paths


    Wednesday, September 4, 2019 10:35 AM
  • Send data to .... Amazon

    https://www.element14.com/community/servlet/JiveServlet/showImage/2-280494-760615/Azure-Amazon.jpg

    Log LISTDIR 

    Explore Azure Sphere  
    [OPEN DIR] /proc = 4  
      04-(D) .  
      04-(D) ..  
      04-(D) fs  
      04-(D) bus  
      04-(D) cpu  
      08-(F) fdt  
      04-(D) irq  
      08-(F) mtd  
      0A-(L) net  
      04-(D) sys  
      04-(D) tty  
      08-(F) kmsg  
      08-(F) misc  
      08-(F) stat  
      08-(F) iomem  
      08-(F) locks  
      08-(F) crypto  
      04-(D) driver  
      0A-(L) mounts  
      08-(F) uptime  
      08-(F) vmstat  
      08-(F) cgroups  
      08-(F) cmdline  
      08-(F) cpuinfo  
      08-(F) devices  
      08-(F) ioports  
      08-(F) loadavg  
      08-(F) meminfo  
      08-(F) version  
      08-(F) consoles  
      08-(F) softirqs  
      08-(F) zoneinfo  
      08-(F) buddyinfo  
      08-(F) diskstats  
      08-(F) interrupts  
      08-(F) kpagecount  
      08-(F) kpageflags  
      08-(F) partitions  
      08-(F) timer_list  
      0A-(L) device-tree  
      08-(F) execdomains  
      08-(F) filesystems  
      08-(F) kpagecgroup  
      08-(F) vmallocinfo  
      08-(F) pagetypeinfo  
      08-(F) sysrq-trigger  
      0A-(L) self  
      0A-(L) thread-self  
      04-(D) 41  

    Wednesday, September 4, 2019 3:35 PM
  • and MQTT to Google ... with unlocked wolfSLL

    https://www.youtube.com/watch?v=HCDTlCzEmw0&t=4s

    Sunday, September 8, 2019 6:28 AM
  • Tips and Tricks

    How to redirest stdout, stderr to uart

    void STD_TO_UART(int fd, void *file) {
      if (fd > 2) {
        int *p = (int *)((char *)file + 60); // offset to FILE->fd
        *p = fd;
      }
    }
    
    //usage: fd is uart
    STD_TO_UART(fd, stdout); // 1 for printf
    STD_TO_UART(fd, stderr); // 2 for Log_Debug()

    https://github.com/Wiz-IO/platform-azure/wiki/Redirect-STD


    Tuesday, September 10, 2019 10:24 AM
  • Friday, September 13, 2019 11:28 AM
  • Example Get Device ID ... Manufacturing_GetDeviceId(char * buffer, int size) // buffer size = 129

    or reversed function

    struct azure_sphere_get_security_state_result
    {
      uint32_t state;                     // Security state of device (return 0x04000000)
      uint8_t general_public_key[64];     // ECC General public key
      uint8_t attestation_public_key[64]; // Attestation public key (is used as DeviceID)
    };
    
    int get_security_state(struct azure_sphere_get_security_state_result *p)
    {
      if (NULL == p)
        return -1;
      struct azure_sphere_get_security_state_result d;
      int fd = open("/dev/pluton", 0x80000);
      if (fd < 0)
        return -1;
      int err = ioctl(fd, 0xC0847001, &d);
      if (0 == err)
        memcpy(p, &d, sizeof(d));
      else
        memset(p, 0, sizeof(d));
      close(fd);
      return err; // attestation_public_key[64] is Manufacturing_GetDeviceId()
    }


    Tuesday, September 17, 2019 10:36 AM
  • Example: Arduino - secured MQTT to AWS

    https://github.com/Wiz-IO/platform-azure/tree/master/Examples/exArduinoAmazon

    for Azure, Google ... etc clouds ... the example is similar

    Friday, September 20, 2019 12:44 PM
  • just experiment with javascript

    Tuesday, September 24, 2019 1:32 PM
  • SRC of upper (screenshot) experiment 

    https://github.com/Wiz-IO/platform-azure/tree/master/Examples/exArduinoJavascript

    can run as Linux and Arduino


    • Edited by WizIO.bg Thursday, September 26, 2019 3:32 PM
    Thursday, September 26, 2019 3:31 PM
  • Experiment: microPytnon

        Log_Debug("[PY] BEGIN\n\n");      
        int stack_dummy;  
        stack_top = (char*)&stack_dummy;  
        gc_init(heap, heap + sizeof(heap));  
        mp_init();  
        do_str("print('<python> Azure Sphere - Hello World')", MP_PARSE_SINGLE_INPUT);  
        do_str("for i in range(4):\r\n  print('<python> i =', i)", MP_PARSE_FILE_INPUT);  
        mp_deinit();  
        Log_Debug("\n[PY] END\n");  


    Friday, September 27, 2019 10:03 AM
  • Monday, September 30, 2019 11:38 AM
  • Microsoft does not recommend this solution.  This will void Microsoft app compat assurances and may have other unintended side effects. Microsoft will not provide technical support on a project that is using this published solution.
    Monday, October 21, 2019 4:53 PM
    Moderator
  • Thanks for support !!!
    Monday, October 21, 2019 5:31 PM
  • why?

    if I call Storage_OpenFileInImagePackage() you call syscall open()

    Tuesday, October 22, 2019 3:53 AM
  • Some very interesting experiments WizIO.

    I know what the official line is, but most makers and hobbyists just want to pull things apart.

    That is where innovation comes from after all (eg Kinect hacking).

    Antonio is right though, you can't ask them to officially support or encourage anything that makes THIS particular product less secure... He could have deleted your thread, but he hasn't.

     

    You've inspired me to have a play!

     

    Thanks,
    Pete


    #PEJL
    Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to TechNet Wiki, for future generations to benefit from! You'll never get archived again, and you could win weekly awards!

    Have you got what it takes to become this month's TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!


    Sunday, November 3, 2019 5:26 PM
    Moderator
  • Hi,

    Azure Sphere is a Linux ... I just asked if it was a problem ( look the begining )
    because there is no official regulation and restriction on how to use the Azure Sphere boards
    only recommendations... 
    then I send some "answers" - who is smart, knows how to use them...

    BTW: I am developer and as developer I will create software that will sell Microsoft products in bulk and services, right...
    so new Question: 
    Why Azure IoT Hub block demo accounts after one month?

    The IoT Hub Free Edition is intended to encourage proof of concept projects. It enables you to transmit up to a total of 8,000 messages per day, and register up to 500 device identities. The device identity limit is only present for the Free Edition.

    Azure Answer:Hence, request you to sign up for Pay-As-You-Go subscription for continues usage of Azure subscription and from my side as onetime goodwill will go ahead and give you a waiver of $200 on the first month invoice.  

    • Edited by WizIO.bg Sunday, November 3, 2019 7:35 PM
    Sunday, November 3, 2019 7:29 PM
  • By the way, not sure if it's still true today, but when you switch from the trial month to the PAYG subscription, it will be a different account. Therefore you would have to set your devices up again on the new account. You never used to be able to continue with the same configuration/devices, as they were associated to the trial subscription, as they are separate billing entities. Maybe still true today, which would also mean loss of service for any deployed devices. 

     

    On another note, a detailed breakdown of the security concerns for each unlocked function would a very valuable contribution. Not addressing something anyone can clearly do (once they inevitably look under the hood) is a dangerous approach. Those in the know should educate the rest of us Sphere newbros. I'd really appreciate an open, honest and detailed discussion on each lockdown. So we understand the reason and risks for each change to the official distribution. Is there already a published table showing feature vs capability vs risk?

    I'm sure we all agree, customisations and tweaking are going to be common, when the official line I read everywhere is "take it and adapt it" - regarding the statements around licencing and extensibility. As soon as a developer hits a wall, most will think "It's perfect, if I just unlock that one thing"... 

    Post again if anyone is knowledgeable enough to produce the breakdown. Publish for peer review, so any misunderstandings can be ironed out. I presume many will unlock features if it is blocking their development. It would be a responsible course of action, to raise awareness WHY things are the way they are. Some may just be to reduce size, many may expose vulnerabilities?

     

    Thanks,
    Pete


    #PEJL
    Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to TechNet Wiki, for future generations to benefit from! You'll never get archived again, and you could win weekly awards!

    Have you got what it takes to become this month's TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!


    Sunday, November 3, 2019 9:28 PM
    Moderator